curl -X POST "https://api.sitespeak.ai/v1/agency/webhooks" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks/sitespeak",
"events": ["lead.captured"]
}'
const response = await fetch('https://api.sitespeak.ai/v1/agency/webhooks', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://yourapp.com/webhooks/sitespeak',
events: ['lead.captured']
})
});
const data = await response.json();
console.log(data);
Agency
Create Webhook
Creates a webhook endpoint that receives signed event notifications
POST
/
v1
/
agency
/
webhooks
curl -X POST "https://api.sitespeak.ai/v1/agency/webhooks" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks/sitespeak",
"events": ["lead.captured"]
}'
const response = await fetch('https://api.sitespeak.ai/v1/agency/webhooks', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://yourapp.com/webhooks/sitespeak',
events: ['lead.captured']
})
});
const data = await response.json();
console.log(data);
Available on agency plans. The API token must belong to the agency owner.
The response includes the signing secret once. Store it immediately; it cannot be retrieved later. See Outbound Webhooks for the payload format, signature verification, and retry behavior.
Headers
| Name | Type | Description |
|---|---|---|
| Accept* | String | application/json |
| Authorization* | String | Bearer |
| Content-Type* | String | application/json |
Body Parameters
| Name | Type | Description |
|---|---|---|
| url* | String | The HTTPS endpoint to deliver events to. |
| events | Array | Event types to subscribe to: lead.captured, escalation.created. Omit to receive all events, including ones added later. |
curl -X POST "https://api.sitespeak.ai/v1/agency/webhooks" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks/sitespeak",
"events": ["lead.captured"]
}'
const response = await fetch('https://api.sitespeak.ai/v1/agency/webhooks', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://yourapp.com/webhooks/sitespeak',
events: ['lead.captured']
})
});
const data = await response.json();
console.log(data);
Response
- 201 Created
- 422 Validation Error
{
"webhook": {
"id": "4e1d795f-16b5-412a-b324-5f34779829a7",
"team_id": "92754e3f-c05a-401e-9436-112990d0ce04",
"url": "https://yourapp.com/webhooks/sitespeak",
"events": ["lead.captured"],
"active": true,
"created_at": "2026-08-18T11:41:52.000000Z",
"updated_at": "2026-08-18T11:41:52.000000Z"
},
"secret": "whsec_JIF5QiBtKjgDSvuGWifX6mtFICkIR1Y6mKDU1bot"
}
{
"message": "The url field must start with one of the following: https://.",
"errors": {
"url": ["The url field must start with one of the following: https://."]
}
}
Last modified on August 18, 2026
⌘I