curl --request PATCH \
--url https://{host}/api/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"events": [],
"headers": {},
"name": "<string>",
"rotate_secret": true,
"url": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
events: [],
headers: {},
name: '<string>',
rotate_secret: true,
url: '<string>'
})
};
fetch('https://{host}/api/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/webhooks/{id}"
payload = {
"enabled": True,
"events": [],
"headers": {},
"name": "<string>",
"rotate_secret": True,
"url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"created_at": "2023-11-07T05:31:56Z",
"disabled_reason": "<string>",
"enabled": true,
"events": [
"call.started"
],
"failing_since": "2023-11-07T05:31:56Z",
"header_names": [
"<string>"
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"secret": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Update a webhook
curl --request PATCH \
--url https://{host}/api/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"events": [],
"headers": {},
"name": "<string>",
"rotate_secret": true,
"url": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
events: [],
headers: {},
name: '<string>',
rotate_secret: true,
url: '<string>'
})
};
fetch('https://{host}/api/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/webhooks/{id}"
payload = {
"enabled": True,
"events": [],
"headers": {},
"name": "<string>",
"rotate_secret": True,
"url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"created_at": "2023-11-07T05:31:56Z",
"disabled_reason": "<string>",
"enabled": true,
"events": [
"call.started"
],
"failing_since": "2023-11-07T05:31:56Z",
"header_names": [
"<string>"
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"secret": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Authorizations
Every request sends Authorization: Bearer <token>. The token is either a panel session (a JWT from /auth/login, 12 hours) or an API key ft_<id>_<secret>. An API key is accepted only from an address on its IP allowlist (403 ip_not_allowed otherwise; 403 ip_allowlist_required for an old key that has none), is limited to its rate per minute (429 rate_limited with Retry-After; X-RateLimit-Limit/Remaining/Reset on every response), and at most 60 call placements a minute.
Path Parameters
Body
call.started, call.ringing, call.answered, call.ended, call.missed, voicemail.received, recording.ready, conversation.completed, callback.requested, ticket.created, ticket.updated, contact.created, campaign.contact.completed, campaign.completed, csat.submitted Merged: a value sets, null removes, unmentioned headers keep their value.
Show child attributes
Show child attributes
Make a new secret, returned once; the old one stops working at once.
Response
OK
Call events posted to your URL. Every request carries X-FireTone-Signature: t=,v1=<hex HMAC-SHA256(secret, "t.body")>, X-FireTone-Event and X-FireTone-Delivery. Header values and the secret are never returned.
Why the webhook was switched off. Switching it back on clears it.
call.started, call.ringing, call.answered, call.ended, call.missed, voicemail.received, recording.ready, conversation.completed, callback.requested, ticket.created, ticket.updated, contact.created, campaign.contact.completed, campaign.completed, csat.submitted Deliveries have failed without a success since then; three days of it switches the webhook off.
The signing secret. Only on the create and rotate responses: shown once.