Update a webhook destination
curl --request PATCH \
--url https://us.api.hellotars.com/api/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedUpdatedAt": 123,
"name": "<string>",
"url": "<string>",
"sources": "all",
"events": [],
"timeoutMs": 15500,
"enabled": true
}
'import requests
url = "https://us.api.hellotars.com/api/v1/webhooks/{id}"
payload = {
"expectedUpdatedAt": 123,
"name": "<string>",
"url": "<string>",
"sources": "all",
"events": [],
"timeoutMs": 15500,
"enabled": 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({
expectedUpdatedAt: 123,
name: '<string>',
url: '<string>',
sources: 'all',
events: [],
timeoutMs: 15500,
enabled: true
})
};
fetch('https://us.api.hellotars.com/api/v1/webhooks/{id}', 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://us.api.hellotars.com/api/v1/webhooks/{id}",
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([
'expectedUpdatedAt' => 123,
'name' => '<string>',
'url' => '<string>',
'sources' => 'all',
'events' => [
],
'timeoutMs' => 15500,
'enabled' => 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://us.api.hellotars.com/api/v1/webhooks/{id}"
payload := strings.NewReader("{\n \"expectedUpdatedAt\": 123,\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"sources\": \"all\",\n \"events\": [],\n \"timeoutMs\": 15500,\n \"enabled\": 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://us.api.hellotars.com/api/v1/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expectedUpdatedAt\": 123,\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"sources\": \"all\",\n \"events\": [],\n \"timeoutMs\": 15500,\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.api.hellotars.com/api/v1/webhooks/{id}")
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 \"expectedUpdatedAt\": 123,\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"sources\": \"all\",\n \"events\": [],\n \"timeoutMs\": 15500,\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"updatedAt": 123
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}Webhooks
Update a webhook destination
Update a destination with an optimistic concurrency token from its last read.
PATCH
/
api
/
v1
/
webhooks
/
{id}
Update a webhook destination
curl --request PATCH \
--url https://us.api.hellotars.com/api/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedUpdatedAt": 123,
"name": "<string>",
"url": "<string>",
"sources": "all",
"events": [],
"timeoutMs": 15500,
"enabled": true
}
'import requests
url = "https://us.api.hellotars.com/api/v1/webhooks/{id}"
payload = {
"expectedUpdatedAt": 123,
"name": "<string>",
"url": "<string>",
"sources": "all",
"events": [],
"timeoutMs": 15500,
"enabled": 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({
expectedUpdatedAt: 123,
name: '<string>',
url: '<string>',
sources: 'all',
events: [],
timeoutMs: 15500,
enabled: true
})
};
fetch('https://us.api.hellotars.com/api/v1/webhooks/{id}', 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://us.api.hellotars.com/api/v1/webhooks/{id}",
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([
'expectedUpdatedAt' => 123,
'name' => '<string>',
'url' => '<string>',
'sources' => 'all',
'events' => [
],
'timeoutMs' => 15500,
'enabled' => 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://us.api.hellotars.com/api/v1/webhooks/{id}"
payload := strings.NewReader("{\n \"expectedUpdatedAt\": 123,\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"sources\": \"all\",\n \"events\": [],\n \"timeoutMs\": 15500,\n \"enabled\": 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://us.api.hellotars.com/api/v1/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expectedUpdatedAt\": 123,\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"sources\": \"all\",\n \"events\": [],\n \"timeoutMs\": 15500,\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.api.hellotars.com/api/v1/webhooks/{id}")
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 \"expectedUpdatedAt\": 123,\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"sources\": \"all\",\n \"events\": [],\n \"timeoutMs\": 15500,\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"updatedAt": 123
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}Supply expectedUpdatedAt and at least one editable field. A stale token returns 409 conflict.
An unchanged patch returns the current updatedAt without an audit event. Source and event changes apply to later occurrences.
Related pages
Authorizations
An API key (tars_sk_…) sent as Authorization: Bearer <key>. Each operation names the permission it needs. Create keys in Settings → Integrations → API keys.
Path Parameters
The id.
Required string length:
1 - 128Body
application/json
The destination fields to change, with the updatedAt you last read.
The destination's updatedAt from the last list, create or update response.
Maximum string length:
80A public https URL.
Maximum string length:
2048Where events come from: "all", or the chat agents, voice agents and campaigns to receive events from.
Minimum array length:
1Available options:
conversation.started, conversation.ended, conversation.analyzed, call.transcript_updated, call.transfer_ringing, call.transfer_connected, call.transfer_bridged, call.transfer_failed, call.transfer_cancelled, call.guardrail_triggered, call.sms_sent, call.continued_in_chat, handoff.requested, handoff.accepted, handoff.unmet, handoff.completed, campaign.message_sent, campaign.message_delivered, campaign.message_read, campaign.message_replied, campaign.message_failed, campaign.completed, contact.created, contact.updated Required range:
1000 <= x <= 30000⌘I
