Skip to content

Webhooks

Assistant request

The webhook OnCore sends to your server when a call starts.

When a call starts, OnCore POSTs an assistant-request event to your server. It carries the same identifiers the end-of-call report will use, so it's the moment to pre-load customer context — look the caller up in your CRM, warm caches, or open a record you'll complete when the call ends.

Delivery#

Sent as an HTTP POST with a JSON body to your configured webhook URL (the assistant's serverUrl if set, otherwise your tenant-level server URL), verified with the plaintext x-sadie-core-secret header — see the webhooks overview. Deliveries are not retried; the call proceeds regardless of your response.

Payload#

FieldTypeDescription
typestringAlways assistant-request
timestampnumberUnix time in milliseconds when the event was produced
statusstringCall status at the time of the event (e.g. ringing)
customer_numberstringThe caller's number
tenant_idstringYour tenant
assistant_idstringThe assistant answering the call
call_idstringUnique call identifier — matches the call_id in the end-of-call report
restaurant_numberstringThe OnCore number that was called
call_sourcestringHow the call arrived: "webrtc", "pstn", or "whatsapp". May be absent
Example payload
{
  "type": "assistant-request",
  "timestamp": 1753872000000,
  "status": "ringing",
  "customer_number": "+15555550111",
  "tenant_id": "0195f1e2-1111-7000-8000-000000000000",
  "assistant_id": "0195f1e2-2222-7000-8000-000000000000",
  "call_id": "0195f1e2-3333-7000-8000-000000000000",
  "restaurant_number": "+15555550123",
  "call_source": "pstn"
}

Responding#

Respond with a 2xx quickly. Your JSON response body can optionally customize the call that is starting:

Response fieldDescription
data.custom_promptsArray of { title, content } prompt sections to inject for this call
data.overrides.first_messageOverride the assistant's greeting for this call
data.overrides.prompt_variablesMap of variable values substituted into the prompt
data.overrides.voice_id / transcriber_id / model_idSwap the voice, transcriber, or model for this call

TODO — verify

The response fields above are read on call start only (they are ignored on end-of-call deliveries). The exact precedence and application semantics of each override are still being verified — confirm behavior in a test call before relying on them in production.