curl --request PATCH \
--url https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/{workflowId} \
--header 'Content-Type: application/json' \
--data '
{
"name": "Platform Test Workflow",
"activation": {
"isActiveOnAllEventTypes": false,
"activeOnEventTypeIds": [
698191
]
},
"trigger": {
"offset": {
"value": 24,
"unit": "hour"
},
"type": "beforeEvent"
},
"steps": [
{
"action": "email_address",
"stepNumber": 1,
"recipient": "attendee",
"template": "reminder",
"sender": "<string>",
"verifiedEmailId": "31214",
"includeCalendarEvent": true,
"message": {
"subject": "Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com",
"html": "<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>"
},
"id": 67244
}
]
}
'{
"status": "success",
"data": [
{
"id": 101,
"name": "Platform Test Workflow",
"type": "event-type",
"activation": {
"isActiveOnAllEventTypes": false,
"activeOnEventTypeIds": [
698191,
698192
]
},
"trigger": {
"type": "beforeEvent",
"offset": {
"value": 24,
"unit": "hour"
}
},
"steps": [
{
"id": 67244,
"stepNumber": 1,
"recipient": "const",
"template": "reminder",
"sender": "Cal.com Notifications",
"message": {
"subject": "Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com",
"html": "<p>Reminder for {EVENT_NAME}.</p>",
"text": "Reminder for {EVENT_NAME}."
},
"action": "email_host",
"email": 31214,
"phone": "<string>",
"phoneRequired": true,
"includeCalendarEvent": true
}
],
"userId": 2313,
"teamId": 4214321,
"createdAt": "2024-05-12T10:00:00.000Z",
"updatedAt": "2024-05-12T11:30:00.000Z"
}
]
}curl --request PATCH \
--url https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/{workflowId} \
--header 'Content-Type: application/json' \
--data '
{
"name": "Platform Test Workflow",
"activation": {
"isActiveOnAllEventTypes": false,
"activeOnEventTypeIds": [
698191
]
},
"trigger": {
"offset": {
"value": 24,
"unit": "hour"
},
"type": "beforeEvent"
},
"steps": [
{
"action": "email_address",
"stepNumber": 1,
"recipient": "attendee",
"template": "reminder",
"sender": "<string>",
"verifiedEmailId": "31214",
"includeCalendarEvent": true,
"message": {
"subject": "Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com",
"html": "<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>"
},
"id": 67244
}
]
}
'{
"status": "success",
"data": [
{
"id": 101,
"name": "Platform Test Workflow",
"type": "event-type",
"activation": {
"isActiveOnAllEventTypes": false,
"activeOnEventTypeIds": [
698191,
698192
]
},
"trigger": {
"type": "beforeEvent",
"offset": {
"value": 24,
"unit": "hour"
}
},
"steps": [
{
"id": 67244,
"stepNumber": 1,
"recipient": "const",
"template": "reminder",
"sender": "Cal.com Notifications",
"message": {
"subject": "Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com",
"html": "<p>Reminder for {EVENT_NAME}.</p>",
"text": "Reminder for {EVENT_NAME}."
},
"action": "email_host",
"email": 31214,
"phone": "<string>",
"phoneRequired": true,
"includeCalendarEvent": true
}
],
"userId": 2313,
"teamId": 4214321,
"createdAt": "2024-05-12T10:00:00.000Z",
"updatedAt": "2024-05-12T11:30:00.000Z"
}
]
}For non-platform customers - value must be Bearer <token> where <token> is api key prefixed with cal_
For platform customers - OAuth client secret key
For platform customers - OAuth client ID
Name of the workflow
"Platform Test Workflow"
Activation settings for the workflow
Show child attributes
Trigger configuration for the event-type workflow, allowed triggers are beforeEvent,eventCancelled,newEvent,afterEvent,rescheduleEvent,afterHostsCalVideoNoShow,afterGuestsCalVideoNoShow,bookingRejected,bookingRequested,bookingPaymentInitiated,bookingPaid,bookingNoShowUpdated
Show child attributes
Trigger type for the workflow
beforeEvent "beforeEvent"
Steps to execute as part of the event-type workflow, allowed steps are email_host,email_attendee,email_address,sms_attendee,sms_number,whatsapp_attendee,whatsapp_number,cal_ai_phone_call
Show child attributes
Action to perform, send an email to a specific email address
email_host, email_attendee, email_address, sms_attendee, sms_number, whatsapp_attendee, whatsapp_number, cal_ai_phone_call "email_address"
Step number in the workflow sequence
1
Recipient type
const, attendee, email, phone_number "attendee"
Template type for the step
reminder, custom, rescheduled, completed, rating, cancelled "reminder"
Displayed sender name.
Email address if recipient is EMAIL, required for action EMAIL_ADDRESS
"31214"
Whether to include a calendar event in the notification, can be included with actions email_host, email_attendee, email_address
true
Message content for this step
Show child attributes
Subject of the message
"Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com"
HTML content of the message (used for Emails)
"<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>"
Unique identifier of the step you want to update, if adding a new step do not provide this id
67244
Indicates the status of the response
success, error "success"
workflow
Show child attributes
Unique identifier of the workflow
101
Name of the workflow
"Platform Test Workflow"
type of the workflow
event-type "event-type"
Activation settings for the workflow
Show child attributes
Whether the workflow is active for all event types associated with the team/user
false
List of Event Type IDs the workflow is specifically active on (if not active on all)
[698191, 698192]Trigger configuration
Show child attributes
Trigger type for the workflow
beforeEvent, eventCancelled, newEvent, afterEvent, rescheduleEvent, afterHostsCalVideoNoShow, afterGuestsCalVideoNoShow, bookingRejected, bookingRequested, bookingPaymentInitiated, bookingPaid, bookingNoShowUpdated "beforeEvent"
Steps comprising the workflow
Show child attributes
Unique identifier of the step
67244
Step number in the workflow sequence
1
Intended recipient type
const, attendee, email, phone_number "const"
Template type used
reminder, custom, rescheduled, completed, rating, cancelled "reminder"
Displayed sender name used for this step
"Cal.com Notifications"
Message content for this step
Show child attributes
Subject of the message
"Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com"
HTML content of the message
"<p>Reminder for {EVENT_NAME}.</p>"
Text content of the message (used for SMS/WhatsApp)
"Reminder for {EVENT_NAME}."
Action to perform
email_host, email_attendee, email_address, sms_attendee, sms_number, whatsapp_attendee, whatsapp_number, cal_ai_phone_call "email_host"
Verified Email if action is EMAIL_ADDRESS
31214
Verified Phone if action is SMS_NUMBER or WHATSAPP_NUMBER
whether or not the attendees are required to provide their phone numbers when booking
true
Whether a calendar event (.ics) was included (for email actions)
true
ID of the user who owns the workflow (if not team-owned)
2313
ID of the team owning the workflow
4214321
Timestamp of creation
"2024-05-12T10:00:00.000Z"
Timestamp of last update
"2024-05-12T11:30:00.000Z"
Was this page helpful?