Keystone Developers
Open Keystone
API reference

Webhooks and callbacks

Voice (Retell)

2 endpoints.

POST/api/v1/voice/retell/events

Retell Call Events

Retell call-lifecycle webhook: every ended/analyzed call becomes a contact + call record (see ingest.py for the notification posture).

``call_ended`` writes the base record; ``call_analyzed`` upserts the summary and the post-call capture onto the same row (idempotent by provider call id). The capture is the post-call analysis (``call_analysis.custom_analysis_data`` — whole-transcript extraction), only present on ``call_analyzed``. Always 200 — Retell retries 5xxs and duplicates are wasted work.

Authentication

x-retell-signature header.

Responses

200Successful Response
application/jsonobject
  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/voice/retell/inbound

Retell Inbound Webhook

Resolve dialed number → business, stamped on the call as its metadata.

Authentication

x-retell-signature header.

Request bodyrequired

application/jsonInboundWebhookRequest
FieldTypeDescription
eventrequiredstring
call_inboundInboundCallPayload | null
InboundCallPayload fields
FieldTypeDescription
from_numberstring | null
to_numberstring | null
agent_idstring | null
custom_sip_headersobject | null
object | null fields

Map of string to string

Responses

200Successful Response
application/jsonInboundWebhookResponse
FieldTypeDescription
call_inboundInboundCallResponsedefault {}
InboundCallResponse fields
FieldTypeDescription
rejectboolean | null
override_agent_idstring | null
dynamic_variablesobject | null
object | null fields

Map of string to string

metadataobject | null
object | null fields

Map of string to string

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.