curl --request POST \
--url https://app.thinnest.ai/api/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent": "ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34",
"url": "https://crm.sunrisedental.in/hooks/agent",
"events": [
"call.analysed",
"lead.captured"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent: 'ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34',
url: 'https://crm.sunrisedental.in/hooks/agent',
events: ['call.analysed', 'lead.captured']
})
};
fetch('https://app.thinnest.ai/api/v1/webhooks', 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"
payload = {
"agent": "ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34",
"url": "https://crm.sunrisedental.in/hooks/agent",
"events": ["call.analysed", "lead.captured"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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",
"lead.captured"
],
"enabled": true,
"delivery": {
"failuresInARow": 0,
"lastStatus": null,
"lastError": null,
"lastSentAt": null
},
"createdAt": "2026-10-06T09:41:00.210Z",
"signingSecret": "q7Vb2LmX9cTz4RkP1sWd8HfN3yJe6GaU"
}Create Webhook
Adds an endpoint for one agent’s events — or, from a developer workspace, with includeCustomers: true, one endpoint for every agent in every one of your customers, each delivery’s data carrying the workspaceId it is about. The response carries signingSecret once: store it to verify x-thinnest-signature on every delivery, because it is never shown again. url is an https:// address or an email address (a helpdesk that opens tickets by mail gets one email per event); addresses inside our own network are refused. A build key may do this.
curl --request POST \
--url https://app.thinnest.ai/api/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent": "ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34",
"url": "https://crm.sunrisedental.in/hooks/agent",
"events": [
"call.analysed",
"lead.captured"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent: 'ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34',
url: 'https://crm.sunrisedental.in/hooks/agent',
events: ['call.analysed', 'lead.captured']
})
};
fetch('https://app.thinnest.ai/api/v1/webhooks', 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"
payload = {
"agent": "ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34",
"url": "https://crm.sunrisedental.in/hooks/agent",
"events": ["call.analysed", "lead.captured"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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",
"lead.captured"
],
"enabled": true,
"delivery": {
"failuresInARow": 0,
"lastStatus": null,
"lastError": null,
"lastSentAt": null
},
"createdAt": "2026-10-06T09:41:00.210Z",
"signingSecret": "q7Vb2LmX9cTz4RkP1sWd8HfN3yJe6GaU"
}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
Which events to send. Leave it out for every event, now and as new ones are added (the endpoint then reads ["*"]); naming all of them means the same.
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", "lead.captured"]
Response
The endpoint, with its signing secret shown this once.
A new endpoint, with its signing secret.
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"]