Update routing form response
curl --request PATCH \
--url https://api.cal.com/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"response": {}
}'import requests
url = "https://api.cal.com/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId}"
payload = { "response": {} }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({response: {}})
};
fetch('https://api.cal.com/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId}', 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/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'response' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$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/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId}"
payload := strings.NewReader("{\n \"response\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.cal.com/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"response\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"response\": {}\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": 123,
"formId": "<string>",
"formFillerId": "<string>",
"routedToBookingUid": "<string>",
"response": {
"f00b26df-f54b-4985-8d98-17c5482c6a24": {
"label": "participant",
"value": "mamut"
}
},
"createdAt": "2023-11-07T05:31:56Z"
}
}Routing Forms
Update routing form response
Required membership role: org admin. PBAC permission: routingForm.update. Learn more about API access control at https://cal.com/docs/api-reference/v2/access-control. If accessed using an OAuth access token, the ORG_ROUTING_FORM_WRITE scope is required.
PATCH
/
v2
/
organizations
/
{orgId}
/
routing-forms
/
{routingFormId}
/
responses
/
{responseId}
Update routing form response
curl --request PATCH \
--url https://api.cal.com/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"response": {}
}'import requests
url = "https://api.cal.com/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId}"
payload = { "response": {} }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({response: {}})
};
fetch('https://api.cal.com/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId}', 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/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'response' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$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/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId}"
payload := strings.NewReader("{\n \"response\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.cal.com/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"response\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"response\": {}\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": 123,
"formId": "<string>",
"formFillerId": "<string>",
"routedToBookingUid": "<string>",
"response": {
"f00b26df-f54b-4985-8d98-17c5482c6a24": {
"label": "participant",
"value": "mamut"
}
},
"createdAt": "2023-11-07T05:31:56Z"
}
}Headers
value must be Bearer <token> where <token> is api key prefixed with cal_
Body
application/json
The updated response data
Was this page helpful?
⌘I