API reference
Webhooks
Your endpoints that receive the after-call data of the agents assigned to them.
/v1/webhooksPOST/v1/webhooksGET/v1/webhooks/{webhookId}PATCH/v1/webhooks/{webhookId}DELETE/v1/webhooks/{webhookId}List webhooks
/v1/webhooksList all after-call automation webhooks for the authenticated tenant. Filter on an entity to get only its webhooks.
Authorization
AuthorizationstringrequiredBearer <API key>, a key created at app.callshift.ai/api-keys.
Query parameters
entityIdstring<uuid>Return only the items of this entity. Send this or entityExternalId, not both.
entityExternalIdstringReturn only the items of the entity with this external id. Send this or entityId, not both.
Responses
Webhooks listed successfully
dataobject[]requiredShow child attributes
idstring<uuid>requirednamestringrequiredendpointUrlstring<uri>requiredentityIdstring<uuid> | nullrequiredThe webhook's entity, or null when the webhook is shared.
createdAtstringrequiredupdatedAtstring | nullrequiredInvalid request body
successenum<boolean>requiredfalseerrorobjectrequiredShow child attributes
nameenum<string>requiredZodErrorissuesobject[]requiredShow child attributes
codestringrequiredpathstring | number[]requiredmessagestringrequiredUnauthorized
errorstringrequiredEntity not found
errorstringrequiredInternal server error
errorstringrequiredcurl "https://api.callshift.ai/v1/webhooks" \
-H "Authorization: Bearer $CALLSHIFT_API_KEY"const res = await fetch("https://api.callshift.ai/v1/webhooks", {
headers: {
Authorization: `Bearer ${process.env.CALLSHIFT_API_KEY}`,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://api.callshift.ai/v1/webhooks",
headers={"Authorization": f"Bearer {os.environ['CALLSHIFT_API_KEY']}"},
)
print(res.json()){
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "CRM sync",
"endpointUrl": "https://example.com/hooks/callshift",
"entityId": null,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
]
}{
"success": false,
"error": {
"name": "ZodError",
"issues": [
{
"code": "invalid_enum_value",
"path": [
"contacts",
0,
"email"
],
"message": "Invalid email"
}
]
}
}{
"error": "Authentication error"
}{
"error": "Entity not found"
}{
"error": "Internal server error"
}Create a webhook
/v1/webhooksCreate an after-call automation webhook, in an entity or shared. Assign it to an agent to receive end-of-call events.
Authorization
AuthorizationstringrequiredBearer <API key>, a key created at app.callshift.ai/api-keys.
Body application/json
namestringrequiredendpointUrlstring<uri>requiredentityIdstring<uuid> | nullThe entity the item belongs to, or null to make it shared. Send this or entityExternalId, not both.
entityExternalIdstring | nullYour external id of the entity the item belongs to, or null to make it shared. Send this or entityId, not both.
Responses
Webhook created successfully
idstring<uuid>requirednamestringrequiredendpointUrlstring<uri>requiredentityIdstring<uuid> | nullrequiredThe webhook's entity, or null when the webhook is shared.
createdAtstringrequiredupdatedAtstring | nullrequiredInvalid request body
successenum<boolean>requiredfalseerrorobjectrequiredShow child attributes
nameenum<string>requiredZodErrorissuesobject[]requiredShow child attributes
codestringrequiredpathstring | number[]requiredmessagestringrequiredUnauthorized
errorstringrequiredEntity not found
errorstringrequiredInternal server error
errorstringrequiredcurl -X POST "https://api.callshift.ai/v1/webhooks" \
-H "Authorization: Bearer $CALLSHIFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "CRM sync",
"endpointUrl": "https://example.com/hooks/callshift?token=YOUR_SECRET"
}'const res = await fetch("https://api.callshift.ai/v1/webhooks", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CALLSHIFT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "CRM sync",
"endpointUrl": "https://example.com/hooks/callshift?token=YOUR_SECRET"
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://api.callshift.ai/v1/webhooks",
headers={"Authorization": f"Bearer {os.environ['CALLSHIFT_API_KEY']}"},
json={
"name": "CRM sync",
"endpointUrl": "https://example.com/hooks/callshift?token=YOUR_SECRET",
},
)
print(res.json()){
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "CRM sync",
"endpointUrl": "https://example.com/hooks/callshift",
"entityId": null,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}{
"success": false,
"error": {
"name": "ZodError",
"issues": [
{
"code": "invalid_enum_value",
"path": [
"contacts",
0,
"email"
],
"message": "Invalid email"
}
]
}
}{
"error": "Authentication error"
}{
"error": "Entity not found"
}{
"error": "Internal server error"
}Get a webhook
/v1/webhooks/{webhookId}Get a single after-call automation webhook by id.
Authorization
AuthorizationstringrequiredBearer <API key>, a key created at app.callshift.ai/api-keys.
Path parameters
webhookIdstring<uuid>requiredResponses
Webhook retrieved successfully
idstring<uuid>requirednamestringrequiredendpointUrlstring<uri>requiredentityIdstring<uuid> | nullrequiredThe webhook's entity, or null when the webhook is shared.
createdAtstringrequiredupdatedAtstring | nullrequiredUnauthorized
errorstringrequiredWebhook not found
errorstringrequiredInternal server error
errorstringrequiredcurl "https://api.callshift.ai/v1/webhooks/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer $CALLSHIFT_API_KEY"const res = await fetch("https://api.callshift.ai/v1/webhooks/550e8400-e29b-41d4-a716-446655440000", {
headers: {
Authorization: `Bearer ${process.env.CALLSHIFT_API_KEY}`,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://api.callshift.ai/v1/webhooks/550e8400-e29b-41d4-a716-446655440000",
headers={"Authorization": f"Bearer {os.environ['CALLSHIFT_API_KEY']}"},
)
print(res.json()){
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "CRM sync",
"endpointUrl": "https://example.com/hooks/callshift",
"entityId": null,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}{
"error": "Authentication error"
}{
"error": "Webhook not found"
}{
"error": "Internal server error"
}Update a webhook
/v1/webhooks/{webhookId}Update the name, endpoint URL or entity of a webhook. Moving it to an entity is refused while an agent of another entity sends to it.
Authorization
AuthorizationstringrequiredBearer <API key>, a key created at app.callshift.ai/api-keys.
Path parameters
webhookIdstring<uuid>requiredBody application/json
namestringendpointUrlstring<uri>entityIdstring<uuid> | nullThe entity the item belongs to, or null to make it shared. Send this or entityExternalId, not both.
entityExternalIdstring | nullYour external id of the entity the item belongs to, or null to make it shared. Send this or entityId, not both.
Responses
Webhook updated successfully
idstring<uuid>requirednamestringrequiredendpointUrlstring<uri>requiredentityIdstring<uuid> | nullrequiredThe webhook's entity, or null when the webhook is shared.
createdAtstringrequiredupdatedAtstring | nullrequiredInvalid request body
successenum<boolean>requiredfalseerrorobjectrequiredShow child attributes
nameenum<string>requiredZodErrorissuesobject[]requiredShow child attributes
codestringrequiredpathstring | number[]requiredmessagestringrequiredUnauthorized
errorstringrequiredWebhook or entity not found
errorstringrequiredThe change would link items of two different entities. The error names them.
errorstringrequiredInternal server error
errorstringrequiredcurl -X PATCH "https://api.callshift.ai/v1/webhooks/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer $CALLSHIFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"endpointUrl": "https://example.com/hooks/callshift-v2?token=YOUR_SECRET"
}'const res = await fetch("https://api.callshift.ai/v1/webhooks/550e8400-e29b-41d4-a716-446655440000", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.CALLSHIFT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"endpointUrl": "https://example.com/hooks/callshift-v2?token=YOUR_SECRET"
}),
});
const data = await res.json();import os
import requests
res = requests.patch(
"https://api.callshift.ai/v1/webhooks/550e8400-e29b-41d4-a716-446655440000",
headers={"Authorization": f"Bearer {os.environ['CALLSHIFT_API_KEY']}"},
json={
"endpointUrl": "https://example.com/hooks/callshift-v2?token=YOUR_SECRET",
},
)
print(res.json()){
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "CRM sync",
"endpointUrl": "https://example.com/hooks/callshift",
"entityId": null,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}{
"success": false,
"error": {
"name": "ZodError",
"issues": [
{
"code": "invalid_enum_value",
"path": [
"contacts",
0,
"email"
],
"message": "Invalid email"
}
]
}
}{
"error": "Authentication error"
}{
"error": "Webhook or entity not found"
}{
"error": "The change would link items of two different entities. The error names them"
}{
"error": "Internal server error"
}Delete a webhook
/v1/webhooks/{webhookId}Delete a webhook. Agents still referencing it will stop receiving end-of-call events.
Authorization
AuthorizationstringrequiredBearer <API key>, a key created at app.callshift.ai/api-keys.
Path parameters
webhookIdstring<uuid>requiredResponses
Webhook deleted successfully
No content.
Unauthorized
errorstringrequiredWebhook not found
errorstringrequiredInternal server error
errorstringrequiredcurl -X DELETE "https://api.callshift.ai/v1/webhooks/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer $CALLSHIFT_API_KEY"const res = await fetch("https://api.callshift.ai/v1/webhooks/550e8400-e29b-41d4-a716-446655440000", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.CALLSHIFT_API_KEY}`,
},
});
console.log(res.status); // 204import os
import requests
res = requests.delete(
"https://api.callshift.ai/v1/webhooks/550e8400-e29b-41d4-a716-446655440000",
headers={"Authorization": f"Bearer {os.environ['CALLSHIFT_API_KEY']}"},
)
print(res.status_code) # 204No content{
"error": "Authentication error"
}{
"error": "Webhook not found"
}{
"error": "Internal server error"
}