curl --request POST \
--url https://api.cal.com/v2/workflows \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'cal-api-version: <cal-api-version>' \
--data '
{
"name": "Platform Test Workflow",
"activation": {
"isActiveOnAllEventTypes": false,
"activeOnEventTypeIds": [
698191
]
},
"trigger": {
"offset": {
"value": 24,
"unit": "hour"
},
"type": "beforeEvent"
},
"steps": [
{
"action": "paths",
"paths": [
{
"name": "Enterprise leads",
"id": "3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01",
"matches": "all",
"conditions": []
}
],
"pathId": "8b2f0c31-4a6d-4f89-b1c5-6d0e8a4f2b73"
}
]
}
'import requests
url = "https://api.cal.com/v2/workflows"
payload = {
"name": "Platform Test Workflow",
"activation": {
"isActiveOnAllEventTypes": False,
"activeOnEventTypeIds": [698191]
},
"trigger": {
"offset": {
"value": 24,
"unit": "hour"
},
"type": "beforeEvent"
},
"steps": [
{
"action": "paths",
"paths": [
{
"name": "Enterprise leads",
"id": "3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01",
"matches": "all",
"conditions": []
}
],
"pathId": "8b2f0c31-4a6d-4f89-b1c5-6d0e8a4f2b73"
}
]
}
headers = {
"cal-api-version": "<cal-api-version>",
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'cal-api-version': '<cal-api-version>',
Authorization: '<authorization>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Platform Test Workflow',
activation: {isActiveOnAllEventTypes: false, activeOnEventTypeIds: [698191]},
trigger: {offset: {value: 24, unit: 'hour'}, type: 'beforeEvent'},
steps: [
{
action: 'paths',
paths: [
{
name: 'Enterprise leads',
id: '3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01',
matches: 'all',
conditions: []
}
],
pathId: '8b2f0c31-4a6d-4f89-b1c5-6d0e8a4f2b73'
}
]
})
};
fetch('https://api.cal.com/v2/workflows', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cal.com/v2/workflows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Platform Test Workflow',
'activation' => [
'isActiveOnAllEventTypes' => false,
'activeOnEventTypeIds' => [
698191
]
],
'trigger' => [
'offset' => [
'value' => 24,
'unit' => 'hour'
],
'type' => 'beforeEvent'
],
'steps' => [
[
'action' => 'paths',
'paths' => [
[
'name' => 'Enterprise leads',
'id' => '3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01',
'matches' => 'all',
'conditions' => [
]
]
],
'pathId' => '8b2f0c31-4a6d-4f89-b1c5-6d0e8a4f2b73'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"cal-api-version: <cal-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cal.com/v2/workflows"
payload := strings.NewReader("{\n \"name\": \"Platform Test Workflow\",\n \"activation\": {\n \"isActiveOnAllEventTypes\": false,\n \"activeOnEventTypeIds\": [\n 698191\n ]\n },\n \"trigger\": {\n \"offset\": {\n \"value\": 24,\n \"unit\": \"hour\"\n },\n \"type\": \"beforeEvent\"\n },\n \"steps\": [\n {\n \"action\": \"paths\",\n \"paths\": [\n {\n \"name\": \"Enterprise leads\",\n \"id\": \"3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01\",\n \"matches\": \"all\",\n \"conditions\": []\n }\n ],\n \"pathId\": \"8b2f0c31-4a6d-4f89-b1c5-6d0e8a4f2b73\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cal-api-version", "<cal-api-version>")
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cal.com/v2/workflows")
.header("cal-api-version", "<cal-api-version>")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Platform Test Workflow\",\n \"activation\": {\n \"isActiveOnAllEventTypes\": false,\n \"activeOnEventTypeIds\": [\n 698191\n ]\n },\n \"trigger\": {\n \"offset\": {\n \"value\": 24,\n \"unit\": \"hour\"\n },\n \"type\": \"beforeEvent\"\n },\n \"steps\": [\n {\n \"action\": \"paths\",\n \"paths\": [\n {\n \"name\": \"Enterprise leads\",\n \"id\": \"3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01\",\n \"matches\": \"all\",\n \"conditions\": []\n }\n ],\n \"pathId\": \"8b2f0c31-4a6d-4f89-b1c5-6d0e8a4f2b73\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/workflows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cal-api-version"] = '<cal-api-version>'
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Platform Test Workflow\",\n \"activation\": {\n \"isActiveOnAllEventTypes\": false,\n \"activeOnEventTypeIds\": [\n 698191\n ]\n },\n \"trigger\": {\n \"offset\": {\n \"value\": 24,\n \"unit\": \"hour\"\n },\n \"type\": \"beforeEvent\"\n },\n \"steps\": [\n {\n \"action\": \"paths\",\n \"paths\": [\n {\n \"name\": \"Enterprise leads\",\n \"id\": \"3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01\",\n \"matches\": \"all\",\n \"conditions\": []\n }\n ],\n \"pathId\": \"8b2f0c31-4a6d-4f89-b1c5-6d0e8a4f2b73\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"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": "notifications@example.com",
"phone": "<string>",
"phoneRequired": true,
"includeCalendarEvent": true,
"skipNoShowAttendees": false,
"autoTranslateEnabled": false,
"sourceLocale": "en",
"pathId": "3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01"
}
],
"userId": 2313,
"teamId": 4214321,
"createdAt": "2024-05-12T10:00:00.000Z",
"updatedAt": "2024-05-12T11:30:00.000Z"
}
}Create a workflow
Create an event-type workflow owned by the authenticated user. Not available to third-party OAuth access tokens.
curl --request POST \
--url https://api.cal.com/v2/workflows \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'cal-api-version: <cal-api-version>' \
--data '
{
"name": "Platform Test Workflow",
"activation": {
"isActiveOnAllEventTypes": false,
"activeOnEventTypeIds": [
698191
]
},
"trigger": {
"offset": {
"value": 24,
"unit": "hour"
},
"type": "beforeEvent"
},
"steps": [
{
"action": "paths",
"paths": [
{
"name": "Enterprise leads",
"id": "3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01",
"matches": "all",
"conditions": []
}
],
"pathId": "8b2f0c31-4a6d-4f89-b1c5-6d0e8a4f2b73"
}
]
}
'import requests
url = "https://api.cal.com/v2/workflows"
payload = {
"name": "Platform Test Workflow",
"activation": {
"isActiveOnAllEventTypes": False,
"activeOnEventTypeIds": [698191]
},
"trigger": {
"offset": {
"value": 24,
"unit": "hour"
},
"type": "beforeEvent"
},
"steps": [
{
"action": "paths",
"paths": [
{
"name": "Enterprise leads",
"id": "3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01",
"matches": "all",
"conditions": []
}
],
"pathId": "8b2f0c31-4a6d-4f89-b1c5-6d0e8a4f2b73"
}
]
}
headers = {
"cal-api-version": "<cal-api-version>",
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'cal-api-version': '<cal-api-version>',
Authorization: '<authorization>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Platform Test Workflow',
activation: {isActiveOnAllEventTypes: false, activeOnEventTypeIds: [698191]},
trigger: {offset: {value: 24, unit: 'hour'}, type: 'beforeEvent'},
steps: [
{
action: 'paths',
paths: [
{
name: 'Enterprise leads',
id: '3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01',
matches: 'all',
conditions: []
}
],
pathId: '8b2f0c31-4a6d-4f89-b1c5-6d0e8a4f2b73'
}
]
})
};
fetch('https://api.cal.com/v2/workflows', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cal.com/v2/workflows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Platform Test Workflow',
'activation' => [
'isActiveOnAllEventTypes' => false,
'activeOnEventTypeIds' => [
698191
]
],
'trigger' => [
'offset' => [
'value' => 24,
'unit' => 'hour'
],
'type' => 'beforeEvent'
],
'steps' => [
[
'action' => 'paths',
'paths' => [
[
'name' => 'Enterprise leads',
'id' => '3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01',
'matches' => 'all',
'conditions' => [
]
]
],
'pathId' => '8b2f0c31-4a6d-4f89-b1c5-6d0e8a4f2b73'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"cal-api-version: <cal-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cal.com/v2/workflows"
payload := strings.NewReader("{\n \"name\": \"Platform Test Workflow\",\n \"activation\": {\n \"isActiveOnAllEventTypes\": false,\n \"activeOnEventTypeIds\": [\n 698191\n ]\n },\n \"trigger\": {\n \"offset\": {\n \"value\": 24,\n \"unit\": \"hour\"\n },\n \"type\": \"beforeEvent\"\n },\n \"steps\": [\n {\n \"action\": \"paths\",\n \"paths\": [\n {\n \"name\": \"Enterprise leads\",\n \"id\": \"3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01\",\n \"matches\": \"all\",\n \"conditions\": []\n }\n ],\n \"pathId\": \"8b2f0c31-4a6d-4f89-b1c5-6d0e8a4f2b73\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cal-api-version", "<cal-api-version>")
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cal.com/v2/workflows")
.header("cal-api-version", "<cal-api-version>")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Platform Test Workflow\",\n \"activation\": {\n \"isActiveOnAllEventTypes\": false,\n \"activeOnEventTypeIds\": [\n 698191\n ]\n },\n \"trigger\": {\n \"offset\": {\n \"value\": 24,\n \"unit\": \"hour\"\n },\n \"type\": \"beforeEvent\"\n },\n \"steps\": [\n {\n \"action\": \"paths\",\n \"paths\": [\n {\n \"name\": \"Enterprise leads\",\n \"id\": \"3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01\",\n \"matches\": \"all\",\n \"conditions\": []\n }\n ],\n \"pathId\": \"8b2f0c31-4a6d-4f89-b1c5-6d0e8a4f2b73\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/workflows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cal-api-version"] = '<cal-api-version>'
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Platform Test Workflow\",\n \"activation\": {\n \"isActiveOnAllEventTypes\": false,\n \"activeOnEventTypeIds\": [\n 698191\n ]\n },\n \"trigger\": {\n \"offset\": {\n \"value\": 24,\n \"unit\": \"hour\"\n },\n \"type\": \"beforeEvent\"\n },\n \"steps\": [\n {\n \"action\": \"paths\",\n \"paths\": [\n {\n \"name\": \"Enterprise leads\",\n \"id\": \"3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01\",\n \"matches\": \"all\",\n \"conditions\": []\n }\n ],\n \"pathId\": \"8b2f0c31-4a6d-4f89-b1c5-6d0e8a4f2b73\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"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": "notifications@example.com",
"phone": "<string>",
"phoneRequired": true,
"includeCalendarEvent": true,
"skipNoShowAttendees": false,
"autoTranslateEnabled": false,
"sourceLocale": "en",
"pathId": "3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01"
}
],
"userId": 2313,
"teamId": 4214321,
"createdAt": "2024-05-12T10:00:00.000Z",
"updatedAt": "2024-05-12T11:30:00.000Z"
}
}Headers
Must be set to 2026-09-22 to use this version of the workflow endpoints.
"2026-09-22"
value must be Bearer <token> where <token> is api key prefixed with cal_, managed user access token, or OAuth access token
Body
Name of the workflow
"Platform Test Workflow"
Activation settings for the workflow
Show child attributes
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
- Before Event
- After Event
- Event Cancelled
- New Event
- Event Rescheduled
- After Guest No-Show
- After Host No-Show
- Booking Rejected
- Booking Requested
- Booking Paid
- Booking Payment Initiated
- Booking No-Show Updated
Show child attributes
Show child attributes
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,paths,filter
1- Paths
- Filter
- Email Address
- Email Attendee
- Email Host
- WhatsApp Attendee
- WhatsApp Number
- SMS Number
- SMS Attendee
Show child attributes
Show child attributes
Was this page helpful?