curl --request PATCH \
--url https://app.thinnest.ai/api/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"events": [
"call.analysed",
"call.completed",
"lead.captured"
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true, events: ['call.analysed', 'call.completed', 'lead.captured']})
};
fetch('https://app.thinnest.ai/api/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/webhooks/{id}"
payload = {
"enabled": True,
"events": ["call.analysed", "call.completed", "lead.captured"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "wh_e1c5a7d2-9b3f-4c86-a0e4-5d2b7f913c08",
"agent": "ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34",
"includeCustomers": false,
"url": "https://crm.sunrisedental.in/hooks/agent",
"events": [
"call.analysed",
"call.completed",
"lead.captured"
],
"enabled": true,
"delivery": {
"failuresInARow": 0,
"lastStatus": 500,
"lastError": null,
"lastSentAt": "2026-10-06T09:12:03.551Z"
},
"createdAt": "2026-09-17T09:41:00.210Z"
}Update Webhook
Changes an endpoint’s url, events or enabled; fields you leave out are kept. Switching an endpoint back on (enabled: true) forgives its past failures, so after an outage: fix the receiver, catch up from the API on what it missed, then PATCH { "enabled": true }. The agent an endpoint belongs to cannot be changed. A build key may do this.
curl --request PATCH \
--url https://app.thinnest.ai/api/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"events": [
"call.analysed",
"call.completed",
"lead.captured"
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true, events: ['call.analysed', 'call.completed', 'lead.captured']})
};
fetch('https://app.thinnest.ai/api/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/webhooks/{id}"
payload = {
"enabled": True,
"events": ["call.analysed", "call.completed", "lead.captured"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "wh_e1c5a7d2-9b3f-4c86-a0e4-5d2b7f913c08",
"agent": "ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34",
"includeCustomers": false,
"url": "https://crm.sunrisedental.in/hooks/agent",
"events": [
"call.analysed",
"call.completed",
"lead.captured"
],
"enabled": true,
"delivery": {
"failuresInARow": 0,
"lastStatus": 500,
"lastError": null,
"lastSentAt": "2026-10-06T09:12:03.551Z"
},
"createdAt": "2026-09-17T09:41:00.210Z"
}Authorizations
Headers
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Body
Send at least one field.
The events to send from now on. Naming every event means every event, now and as new ones are added.
1An event a webhook endpoint can subscribe to.
lead.captured, conversation.escalated, conversation.resolved, call.completed, call.analysed, campaign.finished, contact.opted_out, call.problem, contact.erased, byok.changed [
"call.analysed",
"call.completed",
"lead.captured"
]
Response
The endpoint as it now is.
An endpoint an agent's events are sent to.
The events it receives. ["*"] means every event, now and as new ones are added.
*, lead.captured, conversation.escalated, conversation.resolved, call.completed, call.analysed, campaign.finished, contact.opted_out, call.problem, contact.erased, byok.changed ["call.analysed", "lead.captured"]