Create routing form response and get available slots
curl --request POST \
--url https://api.cal.com/v2/teams/{teamId}/routing-forms/{routingFormId}/responses \
--header 'Authorization: <authorization>'import requests
url = "https://api.cal.com/v2/teams/{teamId}/routing-forms/{routingFormId}/responses"
headers = {"Authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<authorization>'}};
fetch('https://api.cal.com/v2/teams/{teamId}/routing-forms/{routingFormId}/responses', 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/teams/{teamId}/routing-forms/{routingFormId}/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cal.com/v2/teams/{teamId}/routing-forms/{routingFormId}/responses"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<authorization>")
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/teams/{teamId}/routing-forms/{routingFormId}/responses")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/teams/{teamId}/routing-forms/{routingFormId}/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"eventTypeId": 123,
"routing": {
"teamMemberIds": [
101,
102
],
"queuedResponseId": "123",
"responseId": 123,
"teamMemberEmail": "john.doe@example.com",
"skipContactOwner": true,
"crmAppSlug": "salesforce",
"crmOwnerRecordType": "Account",
"crmRecordOwnerFallbackTeamMemberIds": [
103,
104
],
"crmRecordOwnerFallbackMode": "relationship"
},
"routingCustomMessage": "This is a custom message.",
"routingExternalRedirectUrl": "https://example.com/",
"slots": {}
}
}Routing Forms
Create routing form response and get available slots
Only available for teams that are not part of an organization - for a team within an organization use the organization team endpoint instead. Required membership role: team member. PBAC permission: routingForm.create. Learn more about API access control at https://cal.com/docs/api-reference/v2/access-control. If accessed using an OAuth access token, the TEAM_ROUTING_FORM_WRITE scope is required.
POST
/
v2
/
teams
/
{teamId}
/
routing-forms
/
{routingFormId}
/
responses
Create routing form response and get available slots
curl --request POST \
--url https://api.cal.com/v2/teams/{teamId}/routing-forms/{routingFormId}/responses \
--header 'Authorization: <authorization>'import requests
url = "https://api.cal.com/v2/teams/{teamId}/routing-forms/{routingFormId}/responses"
headers = {"Authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<authorization>'}};
fetch('https://api.cal.com/v2/teams/{teamId}/routing-forms/{routingFormId}/responses', 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/teams/{teamId}/routing-forms/{routingFormId}/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cal.com/v2/teams/{teamId}/routing-forms/{routingFormId}/responses"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<authorization>")
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/teams/{teamId}/routing-forms/{routingFormId}/responses")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/teams/{teamId}/routing-forms/{routingFormId}/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"eventTypeId": 123,
"routing": {
"teamMemberIds": [
101,
102
],
"queuedResponseId": "123",
"responseId": 123,
"teamMemberEmail": "john.doe@example.com",
"skipContactOwner": true,
"crmAppSlug": "salesforce",
"crmOwnerRecordType": "Account",
"crmRecordOwnerFallbackTeamMemberIds": [
103,
104
],
"crmRecordOwnerFallbackMode": "relationship"
},
"routingCustomMessage": "This is a custom message.",
"routingExternalRedirectUrl": "https://example.com/",
"slots": {}
}
}Headers
Path Parameters
Query Parameters
Time starting from which available slots should be checked.
Must be in UTC timezone as ISO 8601 datestring.
You can pass date without hours which defaults to start of day or specify hours:
2024-08-13 (will have hours 00:00:00 aka at very beginning of the date) or you can specify hours manually like 2024-08-13T09:00:00Z
Example:
"2033-09-05"
Time until which available slots should be checked.
Must be in UTC timezone as ISO 8601 datestring.
You can pass date without hours which defaults to end of day or specify hours:
2024-08-20 (will have hours 23:59:59 aka at the very end of the date) or you can specify hours manually like 2024-08-20T18:00:00Z
Example:
"2033-09-06"
Was this page helpful?