Browse the docs

API reference

Webhooks

Your endpoints that receive the after-call data of the agents assigned to them.

List webhooks

GET/v1/webhooks
Bearer API key

List all after-call automation webhooks for the authenticated tenant. Filter on an entity to get only its webhooks.

Authorization

Authorizationstringrequired

Bearer <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.

example 550e8400-e29b-41d4-a716-446655440000
entityExternalIdstring

Return only the items of the entity with this external id. Send this or entityId, not both.

1 to 255 charactersexample club-42

Responses

Webhooks listed successfully

dataobject[]required
Show child attributes
idstring<uuid>required
example 550e8400-e29b-41d4-a716-446655440000
namestringrequired
example CRM sync
endpointUrlstring<uri>required
example https://example.com/hooks/callshift
entityIdstring<uuid> | nullrequired

The webhook's entity, or null when the webhook is shared.

example null
createdAtstringrequired
example 2026-01-01T00:00:00.000Z
updatedAtstring | nullrequired
example 2026-01-01T00:00:00.000Z

Invalid request body

successenum<boolean>required
Allowedfalse
errorobjectrequired
Show child attributes
nameenum<string>required
AllowedZodError
issuesobject[]required
Show child attributes
codestringrequired
example invalid_enum_value
pathstring | number[]required
messagestringrequired
example Invalid email

Unauthorized

errorstringrequired

Entity not found

errorstringrequired

Internal server error

errorstringrequired
GET
curl "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())
Response
{
  "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

POST/v1/webhooks
Bearer API key

Create an after-call automation webhook, in an entity or shared. Assign it to an agent to receive end-of-call events.

Authorization

Authorizationstringrequired

Bearer <API key>, a key created at app.callshift.ai/api-keys.

Body application/json

namestringrequired
1 to 255 charactersexample CRM sync
endpointUrlstring<uri>required
example https://example.com/hooks/callshift
entityIdstring<uuid> | null

The entity the item belongs to, or null to make it shared. Send this or entityExternalId, not both.

example 550e8400-e29b-41d4-a716-446655440000
entityExternalIdstring | null

Your external id of the entity the item belongs to, or null to make it shared. Send this or entityId, not both.

1 to 255 charactersexample club-42

Responses

Webhook created successfully

idstring<uuid>required
example 550e8400-e29b-41d4-a716-446655440000
namestringrequired
example CRM sync
endpointUrlstring<uri>required
example https://example.com/hooks/callshift
entityIdstring<uuid> | nullrequired

The webhook's entity, or null when the webhook is shared.

example null
createdAtstringrequired
example 2026-01-01T00:00:00.000Z
updatedAtstring | nullrequired
example 2026-01-01T00:00:00.000Z

Invalid request body

successenum<boolean>required
Allowedfalse
errorobjectrequired
Show child attributes
nameenum<string>required
AllowedZodError
issuesobject[]required
Show child attributes
codestringrequired
example invalid_enum_value
pathstring | number[]required
messagestringrequired
example Invalid email

Unauthorized

errorstringrequired

Entity not found

errorstringrequired

Internal server error

errorstringrequired
POST
curl -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())
Response
{
  "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

GET/v1/webhooks/{webhookId}
Bearer API key

Get a single after-call automation webhook by id.

Authorization

Authorizationstringrequired

Bearer <API key>, a key created at app.callshift.ai/api-keys.

Path parameters

webhookIdstring<uuid>required
example 550e8400-e29b-41d4-a716-446655440000

Responses

Webhook retrieved successfully

idstring<uuid>required
example 550e8400-e29b-41d4-a716-446655440000
namestringrequired
example CRM sync
endpointUrlstring<uri>required
example https://example.com/hooks/callshift
entityIdstring<uuid> | nullrequired

The webhook's entity, or null when the webhook is shared.

example null
createdAtstringrequired
example 2026-01-01T00:00:00.000Z
updatedAtstring | nullrequired
example 2026-01-01T00:00:00.000Z

Unauthorized

errorstringrequired

Webhook not found

errorstringrequired

Internal server error

errorstringrequired
GET
curl "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())
Response
{
  "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

PATCH/v1/webhooks/{webhookId}
Bearer API key

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

Authorizationstringrequired

Bearer <API key>, a key created at app.callshift.ai/api-keys.

Path parameters

webhookIdstring<uuid>required
example 550e8400-e29b-41d4-a716-446655440000

Body application/json

namestring
1 to 255 charactersexample CRM sync
endpointUrlstring<uri>
example https://example.com/hooks/callshift
entityIdstring<uuid> | null

The entity the item belongs to, or null to make it shared. Send this or entityExternalId, not both.

example 550e8400-e29b-41d4-a716-446655440000
entityExternalIdstring | null

Your external id of the entity the item belongs to, or null to make it shared. Send this or entityId, not both.

1 to 255 charactersexample club-42

Responses

Webhook updated successfully

idstring<uuid>required
example 550e8400-e29b-41d4-a716-446655440000
namestringrequired
example CRM sync
endpointUrlstring<uri>required
example https://example.com/hooks/callshift
entityIdstring<uuid> | nullrequired

The webhook's entity, or null when the webhook is shared.

example null
createdAtstringrequired
example 2026-01-01T00:00:00.000Z
updatedAtstring | nullrequired
example 2026-01-01T00:00:00.000Z

Invalid request body

successenum<boolean>required
Allowedfalse
errorobjectrequired
Show child attributes
nameenum<string>required
AllowedZodError
issuesobject[]required
Show child attributes
codestringrequired
example invalid_enum_value
pathstring | number[]required
messagestringrequired
example Invalid email

Unauthorized

errorstringrequired

Webhook or entity not found

errorstringrequired

The change would link items of two different entities. The error names them.

errorstringrequired

Internal server error

errorstringrequired
PATCH
curl -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())
Response
{
  "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

DELETE/v1/webhooks/{webhookId}
Bearer API key

Delete a webhook. Agents still referencing it will stop receiving end-of-call events.

Authorization

Authorizationstringrequired

Bearer <API key>, a key created at app.callshift.ai/api-keys.

Path parameters

webhookIdstring<uuid>required
example 550e8400-e29b-41d4-a716-446655440000

Responses

Webhook deleted successfully

No content.

Unauthorized

errorstringrequired

Webhook not found

errorstringrequired

Internal server error

errorstringrequired
DELETE
curl -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); // 204
import 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)  # 204
Response
No content
{
  "error": "Authentication error"
}
{
  "error": "Webhook not found"
}
{
  "error": "Internal server error"
}