cURL
curl --request PATCH \
--url https://api.comm.com/api/v1/webhooks/calls/{call} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_lead": true,
"is_answered": true,
"is_answer_machine": true,
"is_sale": true
}
'import requests
url = "https://api.comm.com/api/v1/webhooks/calls/{call}"
payload = {
"is_lead": True,
"is_answered": True,
"is_answer_machine": True,
"is_sale": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_lead: true, is_answered: true, is_answer_machine: true, is_sale: true})
};
fetch('https://api.comm.com/api/v1/webhooks/calls/{call}', 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.comm.com/api/v1/webhooks/calls/{call}",
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([
'is_lead' => true,
'is_answered' => true,
'is_answer_machine' => true,
'is_sale' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.comm.com/api/v1/webhooks/calls/{call}"
payload := strings.NewReader("{\n \"is_lead\": true,\n \"is_answered\": true,\n \"is_answer_machine\": true,\n \"is_sale\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.comm.com/api/v1/webhooks/calls/{call}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_lead\": true,\n \"is_answered\": true,\n \"is_answer_machine\": true,\n \"is_sale\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comm.com/api/v1/webhooks/calls/{call}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_lead\": true,\n \"is_answered\": true,\n \"is_answer_machine\": true,\n \"is_sale\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"team_id": "<string>",
"contact_id": "<string>",
"meta": [
"<unknown>"
],
"is_processed": true,
"number_id": "<string>",
"to_number": 123,
"call_agent_id": "<string>",
"events_count": "<string>",
"tool_logs_count": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_at_formatted": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"agent_id": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"voice_campaign_id": "<string>",
"voice_campaign_send_id": "<string>",
"is_answer_machine": true,
"is_answered": true,
"is_lead": true,
"is_sale": true,
"is_picked_up": true,
"chat": "<string>",
"status": "<string>",
"call_outcome": "<string>",
"call_source": "<string>",
"scheduled_at": "<string>",
"lead_submitted_at": "<string>",
"country_id": 123,
"created_at_tz": "<string>",
"date_key": "<string>",
"timezone": "<string>",
"vapi_ended_reason": "<string>",
"call_outcome_logs": [
{
"id": "<string>",
"team_id": "<string>",
"call_id": "<string>",
"call_outcome_classifier_id": "<string>",
"call_outcome_classifier_run_id": "<string>",
"initial_call_outcome": "<string>",
"new_call_outcome": "<string>",
"status": "<string>",
"failure_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Calls
Patch v1webhookscalls
PATCH
/
v1
/
webhooks
/
calls
/
{call}
cURL
curl --request PATCH \
--url https://api.comm.com/api/v1/webhooks/calls/{call} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_lead": true,
"is_answered": true,
"is_answer_machine": true,
"is_sale": true
}
'import requests
url = "https://api.comm.com/api/v1/webhooks/calls/{call}"
payload = {
"is_lead": True,
"is_answered": True,
"is_answer_machine": True,
"is_sale": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_lead: true, is_answered: true, is_answer_machine: true, is_sale: true})
};
fetch('https://api.comm.com/api/v1/webhooks/calls/{call}', 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.comm.com/api/v1/webhooks/calls/{call}",
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([
'is_lead' => true,
'is_answered' => true,
'is_answer_machine' => true,
'is_sale' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.comm.com/api/v1/webhooks/calls/{call}"
payload := strings.NewReader("{\n \"is_lead\": true,\n \"is_answered\": true,\n \"is_answer_machine\": true,\n \"is_sale\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.comm.com/api/v1/webhooks/calls/{call}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_lead\": true,\n \"is_answered\": true,\n \"is_answer_machine\": true,\n \"is_sale\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comm.com/api/v1/webhooks/calls/{call}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_lead\": true,\n \"is_answered\": true,\n \"is_answer_machine\": true,\n \"is_sale\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"team_id": "<string>",
"contact_id": "<string>",
"meta": [
"<unknown>"
],
"is_processed": true,
"number_id": "<string>",
"to_number": 123,
"call_agent_id": "<string>",
"events_count": "<string>",
"tool_logs_count": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_at_formatted": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"agent_id": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"voice_campaign_id": "<string>",
"voice_campaign_send_id": "<string>",
"is_answer_machine": true,
"is_answered": true,
"is_lead": true,
"is_sale": true,
"is_picked_up": true,
"chat": "<string>",
"status": "<string>",
"call_outcome": "<string>",
"call_source": "<string>",
"scheduled_at": "<string>",
"lead_submitted_at": "<string>",
"country_id": 123,
"created_at_tz": "<string>",
"date_key": "<string>",
"timezone": "<string>",
"vapi_ended_reason": "<string>",
"call_outcome_logs": [
{
"id": "<string>",
"team_id": "<string>",
"call_id": "<string>",
"call_outcome_classifier_id": "<string>",
"call_outcome_classifier_run_id": "<string>",
"initial_call_outcome": "<string>",
"new_call_outcome": "<string>",
"status": "<string>",
"failure_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The call ID
Response
CallResource
Show child attributes
Show child attributes
⌘I