Skip to content

Webhooks

Webhooks send an HTTP POST to your server when something happens on your SIPSTACK account. Use them instead of polling the API.

You can receive events for:

  • SMS messages: sent, delivered, failed, and received.
  • Calls: answered, missed, and outbound calls that did not connect.
  • Aura AI voice-agent calls: started and completed.
  • SMS opt-out and consent changes.
  • Campaign completion.
  • Messages in public team chat channels.
  • Flow events sent by webhook nodes in your Aura AI voice-agent flows: sales.lead and flow.*.

This page is the reference for every event: what triggers it, when it is sent, and every field in the body. It is written so that a developer or an AI coding agent can build an integration from this page alone.

  1. You register an endpoint URL and subscribe it to one or more events.
  2. When a subscribed event happens, SIPSTACK sends a POST request to your URL with a JSON body.
  3. Your server answers with any 2xx status within 10 seconds.
  4. If delivery fails, SIPSTACK retries. An endpoint that keeps failing is disabled automatically.

Creating a webhook endpoint requires a Flare plan, or Nova Pro or higher. Nova Core does not include webhooks.

Account owners can always manage webhooks. Other team members can manage them once an owner grants the Manage API Keys & Webhooks permission. That one permission covers the Switchboard page and the API.

Go to Account → Integrations → Webhooks. From there you can register an endpoint, choose its events, view its delivery log, and send a test event.

Authenticate with a portal session that carries the Manage API Keys & Webhooks permission (flare.api_keys.manage). See Authentication.

ActionEndpoint
List endpointsGET /v2/portal/webhooks
Create an endpointPOST /v2/portal/webhooks with { "url": "https://...", "events": ["call.completed"] }
Delete an endpointDELETE /v2/portal/webhooks/{id}
View delivery logGET /v2/portal/webhooks/{id}/deliveries
Send a test eventPOST /v2/portal/webhooks/{id}/test

Use an API key (x-api-key header) and the /api/v2/webhooks alias. This suits server-to-server setup.

ActionEndpoint
List endpointsGET /api/v2/webhooks
Create an endpointPOST /api/v2/webhooks with { "url": "https://...", "events": ["call.completed"] }
Delete an endpointDELETE /api/v2/webhooks/{id}
List valid event namesGET /api/v2/events
  • The events array selects which events the endpoint receives.
  • ["*"] subscribes to every event in the public catalog, including catalog events added later. It never includes internal platform events, which SIPSTACK never delivers to your endpoints.
  • An unknown event name is rejected with a 400 that lists the valid names.
  • GET /api/v2/events returns the live list of event names and descriptions.
  • The endpoint URL must be a public https:// URL.
  • The create response includes the endpoint’s signing secret. It is shown only once. Store it securely. You need it to verify signatures.

See the API Reference for full request and response shapes.

Every delivery is an HTTP POST with a JSON body.

HeaderValue
Content-Typeapplication/json
User-AgentSIPSTACK-Webhook/1.0
X-Webhook-EventThe event name, for example call.completed
X-Sipstack-TimestampThe time SIPSTACK signed this attempt, in Unix seconds (an integer). New on every attempt.
X-Sipstack-Signaturev1= followed by the lowercase hex HMAC-SHA256 of <timestamp>.<raw body>, keyed with your endpoint’s secret. New on every attempt. See Verifying signatures.
X-Webhook-SignatureDeprecated. sha256= followed by the hex HMAC-SHA256 of the raw body only. Still sent during a 90-day deprecation period. See The legacy signature header.
X-Idempotency-KeyThe body’s idempotency_key. Sent only on events whose body has one. The value is the same on every retry.

The body is a flat JSON object. It is not wrapped in a data object.

  • event is always the first key and holds the event name.
  • The event’s own fields follow at the top level.
  • Most events also include occurred_at and idempotency_key (see each event below).
{
"event": "message.delivered",
"messageId": 12345,
"status": "delivered",
"to": "+15555550100",
"from": "+15555550200",
"campaignId": null,
"direction": "outbound",
"body": "Running 10 minutes late, see you soon.",
"userId": "8f2c6d1a-3b4e-4f5a-9c7d-1e2f3a4b5c6d",
"userName": "Dana Rivera",
"extension": "101",
"occurred_at": "2026-11-20T15:04:05.123Z",
"idempotency_key": "message.delivered:12345"
}
FieldTypeMeaning
eventstringThe event name. Same value as the X-Webhook-Event header.
occurred_atstring (ISO-8601, UTC)When the event happened. For end-of-call events this is the time the call ended.
idempotency_keystringA stable key for this event. Use it to de-duplicate retries. Format: <event>:<id>.
  • Ignore fields you do not recognize. SIPSTACK adds new fields to existing events without notice. Existing fields keep their names.
  • Treat IDs (callId, messageId, and so on) as opaque strings or numbers. Do not parse them.
  • Phone numbers are sent as SIPSTACK received them, usually in E.164 format (+15555550100).
  • A field documented as nullable can be null. Check for null before you use it.
EventProductFires whenTiming
message.sentFlare, Nova 1:1 textingThe carrier accepted an outbound messageReal time
message.deliveredFlare, Nova 1:1 textingThe carrier confirmed delivery to the handsetReal time
message.failedFlare, Nova 1:1 textingAn outbound message failed or was undeliverableReal time
message.receivedFlare, Nova 1:1 textingAn inbound SMS or MMS arrived on your numberReal time
campaign.completedFlareA campaign finished sendingReal time
call.completedNovaA call was answered and has ended (inbound or outbound)After the call, usually within about 15 minutes
call.missedNovaAn inbound call ended without being answeredAfter the call, usually within about 15 minutes
call.unansweredNovaAn outbound call ended without connectingAfter the call, usually within about 15 minutes
call.inboundNovaA call is arriving (before it is answered)Not yet available
call.ringingNovaA call started ringingNot yet available
call.answeredNovaA call was answeredNot yet available
call.hangupNovaA call endedNot yet available
aura.call.startedAuraAn Aura agent answered a callReal time
aura.call.completedAuraAn Aura agent call endedShortly after the call
contact.opted_outFlareA number was added to your SMS opt-out listWithin about a minute — rolling out
contact.opted_inFlareA number was removed from your SMS opt-out listWithin about a minute — rolling out
contact.consent_changedFlareA contact’s SMS consent changedWithin about a minute — rolling out
chat.message.createdTeam chatA message was posted in a public channelReal time
chat.message.updatedTeam chatA message in a public channel was editedReal time
chat.message.deletedTeam chatA message in a public channel was deletedReal time
sales.leadAuraAn Aura voice-agent flow captured a sales leadDuring the call
flow.callback_requestedAuraAn Aura voice-agent flow recorded that the caller asked for a callbackDuring the call
flow.message_takenAuraAn Aura voice-agent flow took a message for your teamDuring the call
flow.customAuraA custom milestone marked by a webhook node in an Aura voice-agent flowDuring the call
test—You asked SIPSTACK to send a test eventOn demand

“Rolling out” means you can subscribe now, but deliveries start only once SIPSTACK turns the feature on for the platform. Do not build a flow that depends on a rolling-out event until you see deliveries in your delivery log.

Each external call sends at most one end-of-call event. Which one depends on the direction and the result.

CallResultEventoutcome
InboundAnswered by a person, a voicemail box, or any other destinationcall.completedanswered
InboundNot answered (no answer or busy)call.missedmissed
OutboundAnswered (including by the far end’s voicemail)call.completedanswered
OutboundDid not connectcall.unansweredunanswered
Internal (extension to extension, or both ends on SIPSTACK)AnyNone—

Common goals:

You want to…Subscribe to
Log every call that connected, both directions, to a CRMcall.completed
Call back people who called you and got no answercall.missed
Track outbound calls that did not reach anyone, and whycall.unanswered
Log every external call attemptcall.completed, call.missed, and call.unanswered

Rules that apply to all three end-of-call events:

  • They are built from the call record after the call ends. They usually arrive within about 15 minutes of the call ending. They are not real-time.
  • occurred_at is the time the call ended, not the time the event was sent.
  • Calls where both ends are on SIPSTACK (internal or on-net calls) do not send any of these events.
  • If the caller hangs up while the outbound call is still ringing, the event is call.unanswered with reason no_answer.
  • If an outbound call is answered by the far end’s voicemail, the event is call.completed. The carrier does not tell SIPSTACK whether a person or a voicemail system answered.
  • An inbound call that a user declined does not send call.missed.
  • idempotency_key is <event>:<callId>. Retries of the same event carry the same key.

call.completed, call.missed, and call.unanswered carry the same fields. A field that is unknown for a call is null, never missing. call.unanswered adds one field, reason.

FieldTypeNullableMeaning
eventstringNocall.completed, call.missed, or call.unanswered
callIdstringNoUnique ID of the call. Opaque — do not parse it.
fromstringYesThe calling number. For outbound calls, this is the caller ID number SIPSTACK presented (your number).
tostringYesThe called number.
directionstringNoinbound or outbound.
outcomestringNoanswered (call.completed), missed (call.missed), or unanswered (call.unanswered).
dispositionstringYesThe raw call result, for example ANSWERED, NO ANSWER, BUSY, FAILED, CONGESTION. Prefer outcome and reason for logic.
durationnumberYesTotal call length in seconds, including ringing.
billsecnumberYesTalk time in seconds after the call was answered. 0 when the call was not answered.
extensionstringYesThe SIPSTACK Nova PBX extension number on the call, for example "101". Outbound (call.completed, call.unanswered): the extension that placed the call, even when several extensions share the same outbound caller ID number. Inbound call.completed: the extension that answered. call.missed: always null. Also null when SIPSTACK cannot attribute the call to one extension. See The extension field.
didstringYesYour SIPSTACK number on the call. Inbound: the number that was dialled (same as to). Outbound: the caller ID number (same as from).
startedAtstring (ISO-8601)YesWhen the call started.
answeredAtstring (ISO-8601)YesWhen the call was answered. null when it was never answered.
endedAtstring (ISO-8601)YesWhen the call ended. Same instant as occurred_at.
ringSecondsnumberYesSeconds of ringing. Answered calls: from startedAt to answeredAt. Unanswered calls: from startedAt to endedAt.
callerIdNamestringYesThe caller ID name supplied by the carrier. This is not a directory (CNAM) lookup. null when the caller withheld it or none was supplied.
sipCodenumberYesThe final SIP response code for the call, for example 200, 486, 603. Uses the carrier’s code when SIPSTACK has it.
sipReasonstringYesThe text that goes with sipCode, for example Busy Here.
reasonstringNocall.unanswered only. Why the call did not connect: no_answer, busy, failed, or declined. See the mapping below.
occurred_atstring (ISO-8601)NoWhen the call ended.
idempotency_keystringNo<event>:<callId>, for example call.completed:4f9c2a7e1b3d.

extension is the extension number only, for example "101". It is never the full SIP endpoint name.

Eventextension
call.completed, outboundThe extension that placed the call. This holds even when several extensions share one outbound caller ID number.
call.unansweredThe extension that placed the call.
call.completed, inboundThe extension that answered the call.
call.missedAlways null. Nobody answered.

extension is null when SIPSTACK cannot attribute the call to a single extension. For example:

  • The number rings straight to an external destination, with no Nova PBX extension involved.
  • The call was answered by voicemail, an auto attendant, or another destination that is not an extension.
  • In rare cases, the phone system’s record of the call was not available when the event was sent.

Treat extension as optional: a string or null. Do not use it to identify a user across systems. Extension numbers can be reassigned.

Trigger: a call was answered and has ended. Covers inbound and outbound calls.

When: after the call ends, from the finalized call record. Usually within about 15 minutes.

Notes:

  • An inbound call counts as answered when any destination picks it up, including a voicemail box or a forward.
  • An outbound call answered by the far end’s voicemail is sent as call.completed.
  • Internal and on-net calls never send this event.

Inbound example:

{
"event": "call.completed",
"callId": "4f9c2a7e1b3d4c5e8a9b0c1d2e3f4a5b",
"from": "+15555550123",
"to": "+15555550100",
"direction": "inbound",
"outcome": "answered",
"disposition": "ANSWERED",
"duration": 187,
"billsec": 172,
"extension": "102",
"did": "+15555550100",
"startedAt": "2026-11-20T14:58:12.000Z",
"answeredAt": "2026-11-20T14:58:27.000Z",
"endedAt": "2026-11-20T15:01:19.000Z",
"ringSeconds": 15,
"callerIdName": "JANE EXAMPLE",
"sipCode": 200,
"sipReason": "OK",
"occurred_at": "2026-11-20T15:01:19.000Z",
"idempotency_key": "call.completed:4f9c2a7e1b3d4c5e8a9b0c1d2e3f4a5b"
}

Outbound example:

{
"event": "call.completed",
"callId": "9a8b7c6d5e4f40312a1b2c3d4e5f6a7b",
"from": "+15555550100",
"to": "+15555550188",
"direction": "outbound",
"outcome": "answered",
"disposition": "ANSWERED",
"duration": 94,
"billsec": 81,
"extension": "101",
"did": "+15555550100",
"startedAt": "2026-11-20T16:10:03.000Z",
"answeredAt": "2026-11-20T16:10:16.000Z",
"endedAt": "2026-11-20T16:11:37.000Z",
"ringSeconds": 13,
"callerIdName": null,
"sipCode": 200,
"sipReason": "OK",
"occurred_at": "2026-11-20T16:11:37.000Z",
"idempotency_key": "call.completed:9a8b7c6d5e4f40312a1b2c3d4e5f6a7b"
}

Trigger: an inbound call ended without being answered. The call record shows no answer or busy.

When: after the call ends, from the finalized call record. Usually within about 15 minutes.

Notes:

  • Inbound only. An outbound call that does not connect sends call.unanswered instead.
  • A call that a user declined does not send call.missed.
  • extension and answeredAt are always null. billsec is 0.
  • call.missed has no reason field. Use disposition (NO ANSWER, RINGNOANSWER, or BUSY) if you need the detail.
{
"event": "call.missed",
"callId": "1c2d3e4f5a6b47788990aabbccddeeff",
"from": "+15555550145",
"to": "+15555550100",
"direction": "inbound",
"outcome": "missed",
"disposition": "NO ANSWER",
"duration": 32,
"billsec": 0,
"extension": null,
"did": "+15555550100",
"startedAt": "2026-11-20T17:20:00.000Z",
"answeredAt": null,
"endedAt": "2026-11-20T17:20:32.000Z",
"ringSeconds": 32,
"callerIdName": "ACME PLUMBING",
"sipCode": 480,
"sipReason": "Temporarily Unavailable",
"occurred_at": "2026-11-20T17:20:32.000Z",
"idempotency_key": "call.missed:1c2d3e4f5a6b47788990aabbccddeeff"
}

Trigger: an outbound call ended without connecting.

When: after the call ends, from the finalized call record. Usually within about 15 minutes.

Notes:

  • Outbound only. Internal and on-net calls never send this event.
  • extension is the extension that placed the call, for example "101", or null when SIPSTACK cannot attribute the call to one extension.
  • answeredAt is null. billsec is 0.
  • reason tells you why the call did not connect.
reasonMeaning
no_answerThe far end rang but nobody answered, or the caller hung up while it was ringing.
busyThe far end was busy.
declinedThe far end rejected the call.
failedThe call could not be completed for another reason, such as an invalid number, a network error, or a timeout.

SIPSTACK uses the final SIP response code from the carrier when it has one. Otherwise it uses the call’s disposition.

Final SIP codereason
486 Busy Here, 600 Busy Everywherebusy
603 Declinedeclined
480 Temporarily Unavailable, 408 Request Timeout, 487 Request Terminated (caller hung up while ringing)no_answer
Any other 4xx, 5xx, or 6xx code, or a timeoutfailed
disposition (used when there is no SIP code)reason
BUSYbusy
NO ANSWER, RINGNOANSWER, CANCELno_answer
FAILED, CONGESTION, CHANUNAVAIL, or anything elsefailed
{
"event": "call.unanswered",
"callId": "7e6d5c4b3a2948576655443322110000",
"from": "+15555550100",
"to": "+15555550177",
"direction": "outbound",
"outcome": "unanswered",
"reason": "busy",
"disposition": "BUSY",
"duration": 6,
"billsec": 0,
"extension": "103",
"did": "+15555550100",
"startedAt": "2026-11-20T18:02:41.000Z",
"answeredAt": null,
"endedAt": "2026-11-20T18:02:47.000Z",
"ringSeconds": 6,
"callerIdName": null,
"sipCode": 486,
"sipReason": "Busy Here",
"occurred_at": "2026-11-20T18:02:47.000Z",
"idempotency_key": "call.unanswered:7e6d5c4b3a2948576655443322110000"
}

When live, these events are sent within moments of the PBX seeing the change, for example so a CRM can show a caller’s record while the phone rings. They come from the PBX, not the call record, so they carry fewer fields than the end-of-call events.

Fields on all four real-time events:

FieldTypeNullableMeaning
eventstringNoThe event name
callIdstringNoUnique ID of the call. Opaque.
fromstringYesThe calling number
tostringYesThe called number
directionstringYesinbound, outbound, or internal
extensionstring—The extension involved. Present only when known.
channelstring—The PBX channel name. Present only when known.
occurred_atstring (ISO-8601)NoWhen the PBX saw the change
idempotency_keystringNo<event>:<callId>

Trigger: a call is arriving on one of your numbers, before it is answered. Not yet available.

Fields: the real-time fields above.

{
"event": "call.inbound",
"callId": "1732118400.1234",
"from": "+15555550123",
"to": "+15555550100",
"direction": "inbound",
"extension": "1001",
"occurred_at": "2026-11-20T15:00:00.000Z",
"idempotency_key": "call.inbound:1732118400.1234"
}

Trigger: a call started ringing. Not yet available.

Fields: the real-time fields above. The body has the same shape as the call.inbound example, with "event": "call.ringing".

Trigger: a call was answered. Not yet available.

Fields: the real-time fields above. The body has the same shape as the call.inbound example, with "event": "call.answered".

Trigger: a call ended. Sent for every direction, including internal calls. Not yet available.

Extra fields:

FieldTypeNullableMeaning
answeredbooleanNoWhether the call was answered
durationnumberYesTotal call length in seconds
billsecnumberYesTalk time in seconds
dispositionstringYesThe raw call result, for example ANSWERED
outcomestringYesdeclined when a user declined the call; otherwise null
{
"event": "call.hangup",
"callId": "1732118400.1234",
"from": "+15555550123",
"to": "+15555550100",
"direction": "inbound",
"extension": "1001",
"answered": true,
"duration": 187,
"billsec": 172,
"disposition": "ANSWERED",
"outcome": null,
"occurred_at": "2026-11-20T15:03:07.000Z",
"idempotency_key": "call.hangup:1732118400.1234"
}

If you subscribe to both call.hangup and the end-of-call events, you receive two signals for the same call. Handle the end of a call once, keyed on the call, and treat whichever arrives second as a duplicate.

message.sent, message.delivered, and message.failed carry the same fields. They fire for outbound messages sent from Flare (conversations and campaigns) and for 1:1 texts your team sends from Nova numbers, for example from Pulse.

FieldTypeNullableMeaning
eventstringNoThe event name
messageIdnumber or stringNoID of the message
statusstringNoThe new status: sent, delivered, failed, or undelivered
tostringNoThe recipient’s number
fromstringNoYour sending number
campaignIdnumber or stringYesThe campaign the message belongs to. null for a conversational message.
directionstringNoAlways outbound.
bodystringNoThe message text. An empty string for a picture or file sent without text. Not included if your account has HIPAA mode on.
userIdstringYesID of the SIPSTACK user who sent the message. null when no user sent it, for example a message sent with an API key, an auto-response, or a campaign with no sender recorded.
userNamestringYesThat user’s name. null when userId is null or the user has no name set.
extensionstringYesThe Nova PBX extension number linked to that user, for example "101". null when the user has no extension, or has more than one.
occurred_atstring (ISO-8601)NoWhen SIPSTACK processed the status change
idempotency_keystringNo<event>:<messageId>

If your account has HIPAA mode on, message events don’t include the message body.

extension is the extension number only, never the SIP endpoint name. It is the extension linked to the user when the event is sent. Extensions can be reassigned, so use userId, not extension, to match a user across messages.

A message usually produces message.sent and then message.delivered or message.failed. The second event can arrive within seconds of the first, and events are not guaranteed to arrive in order. Use status and occurred_at rather than arrival order.

Trigger: the carrier accepted an outbound message for delivery. For a message between two SIPSTACK numbers, which is delivered inside SIPSTACK without a carrier, it fires when the message is handed to the receiving number. It fires once per message. Fields: message status fields.

{
"event": "message.sent",
"messageId": 12345,
"status": "sent",
"to": "+15555550100",
"from": "+15555550200",
"campaignId": null,
"direction": "outbound",
"body": "Running 10 minutes late, see you soon.",
"userId": "8f2c6d1a-3b4e-4f5a-9c7d-1e2f3a4b5c6d",
"userName": "Dana Rivera",
"extension": "101",
"occurred_at": "2026-11-20T15:04:01.000Z",
"idempotency_key": "message.sent:12345"
}

Trigger: the carrier confirmed the message reached the handset. Fields: message status fields.

{
"event": "message.delivered",
"messageId": 12345,
"status": "delivered",
"to": "+15555550100",
"from": "+15555550200",
"campaignId": null,
"direction": "outbound",
"body": "Running 10 minutes late, see you soon.",
"userId": "8f2c6d1a-3b4e-4f5a-9c7d-1e2f3a4b5c6d",
"userName": "Dana Rivera",
"extension": "101",
"occurred_at": "2026-11-20T15:04:05.000Z",
"idempotency_key": "message.delivered:12345"
}

Trigger: an outbound message failed to send or was undeliverable. status is failed or undelivered. Fields: message status fields.

{
"event": "message.failed",
"messageId": 12346,
"status": "undelivered",
"to": "+15555550101",
"from": "+15555550200",
"campaignId": 42,
"direction": "outbound",
"body": "Spring sale: 20% off this weekend. Reply STOP to opt out.",
"userId": null,
"userName": null,
"extension": null,
"occurred_at": "2026-11-20T15:05:10.000Z",
"idempotency_key": "message.failed:12346"
}

Trigger: an inbound SMS or MMS arrived on one of your numbers.

FieldTypeNullableMeaning
eventstringNomessage.received
messageIdnumber or stringNoID of the message
fromstringNoThe sender’s number
tostringNoYour number that received it
bodystringNoThe message text. Not included if your account has HIPAA mode on.
directionstringNoAlways inbound.
userIdstringYesID of the SIPSTACK user the number is assigned to, when the number routes texts to one user. null when texts go to a shared team inbox.
userNamestringYesThat user’s name. null when userId is null or the user has no name set.
extensionstringYesThe Nova PBX extension number linked to that user, for example "101". null when the user has no extension, or has more than one.
aura_capturebooleanNotrue when the text is a caller’s reply to an Aura agent that asked them, during a call, to text their email address. These replies are saved to the conversation but skip your auto-replies and team notifications. false for every other text.
occurred_atstring (ISO-8601)NoWhen SIPSTACK received the message
idempotency_keystringNomessage.received:<messageId>
{
"event": "message.received",
"messageId": 12400,
"from": "+15555550123",
"to": "+15555550200",
"body": "Is my appointment still at 3pm?",
"direction": "inbound",
"userId": "8f2c6d1a-3b4e-4f5a-9c7d-1e2f3a4b5c6d",
"userName": "Dana Rivera",
"extension": "101",
"aura_capture": false,
"occurred_at": "2026-11-20T15:06:00.000Z",
"idempotency_key": "message.received:12400"
}

Trigger: a messaging campaign finished handing all its messages to the carrier. Delivery receipts can still arrive after this event.

FieldTypeNullableMeaning
eventstringNocampaign.completed
campaignIdstringNoID of the campaign
namestringNoThe campaign name
messagesSentnumberNoNumber of messages sent
occurred_atstring (ISO-8601)NoWhen the campaign completed
idempotency_keystringNocampaign.completed:<campaignId>
{
"event": "campaign.completed",
"campaignId": "42",
"name": "November appointment reminders",
"messagesSent": 250,
"occurred_at": "2026-11-20T16:00:00.000Z",
"idempotency_key": "campaign.completed:42"
}

These events come from Aura agent calls. They are separate from the events a flow sends (see Flow events).

Trigger: an Aura agent answered a call and began handling it.

FieldTypeNullableMeaning
eventstringNoaura.call.started
callIdstringNoID of the call
agentIdstringNoID of the Aura agent
agentNamestringNoThe agent’s name
fromstringNoThe calling number
tostringNoThe called number
directionstringNoinbound or outbound
startedAtstring (ISO-8601)NoWhen the agent started handling the call
occurred_atstring (ISO-8601)NoWhen the event was created
idempotency_keystringNoaura.call.started:<callId>
{
"event": "aura.call.started",
"callId": "a1b2c3d4e5f60718293a4b5c6d7e8f90",
"agentId": "3d1f6b2a-9c4e-4a7b-8e21-5f0c9d3a7b16",
"agentName": "Front desk",
"from": "+15555550123",
"to": "+15555550100",
"direction": "inbound",
"startedAt": "2026-11-20T15:10:00.000Z",
"occurred_at": "2026-11-20T15:10:00.120Z",
"idempotency_key": "aura.call.started:a1b2c3d4e5f60718293a4b5c6d7e8f90"
}

Trigger: an Aura agent call ended. Includes the outcome and the post-call summary.

FieldTypeNullableMeaning
eventstringNoaura.call.completed
callIdstringNoID of the call
agentIdstringNoID of the Aura agent
agentNamestringNoThe agent’s name
fromstringNoThe calling number
tostringNoThe called number
directionstringNoinbound or outbound
billsecnumberNoSeconds the agent was on the call
outcomestringNoHow the call ended: completed, transferred, hangup, caller_hangup, or error
transferTargetstringYesWhere the call was transferred. null when it was not transferred.
summarystringYesA short AI summary of the call. null when no summary was produced.
sentimentstringYesThe caller’s overall sentiment, for example Positive. null when not produced.
extractedFieldsobjectYesValues the agent was configured to collect, keyed by field name. null when none.
occurred_atstring (ISO-8601)NoWhen the event was created
idempotency_keystringNoaura.call.completed:<callId>
{
"event": "aura.call.completed",
"callId": "a1b2c3d4e5f60718293a4b5c6d7e8f90",
"agentId": "3d1f6b2a-9c4e-4a7b-8e21-5f0c9d3a7b16",
"agentName": "Front desk",
"from": "+15555550123",
"to": "+15555550100",
"direction": "inbound",
"billsec": 142,
"outcome": "transferred",
"transferTarget": "1001",
"summary": "Caller asked to reschedule Friday's appointment and was transferred to the front desk.",
"sentiment": "Positive",
"extractedFields": { "preferred_day": "Monday" },
"occurred_at": "2026-11-20T15:12:25.000Z",
"idempotency_key": "aura.call.completed:a1b2c3d4e5f60718293a4b5c6d7e8f90"
}

These events keep a CRM or your own suppression list in step with SIPSTACK’s SMS opt-out list and consent records.

Every consent event carries these fields:

FieldTypeNullableMeaning
eventstringNoThe event name
event_idstring (UUID)NoUnique ID for this change. Your de-duplication key.
phone_numberstringNoThe number, in E.164 format
contact_idsarray of string (UUID)NoYour contacts with this number. Can be empty or list several.
methodstringNoHow the change was made: sms, web, admin, api, system, and others
actorobjectYesWho made it: { "type": "recipient" | "user" | "api_key" | "system" | "integration" }. An integration actor also has provider. null when unknown.
occurred_atstring (ISO-8601)NoWhen the change happened
idempotency_keystringNo<event>:<event_id>

Rules:

  • Opt-out events are per number, not per contact. One number shared by three contacts sends one contact.opted_out that lists all three IDs in contact_ids.
  • Opting out a number that is already on the list sends nothing.
  • Payloads never include message text (including the STOP message), opt-out reasons, or notes.
  • Consent events are delivered within about a minute of the change.
  • Events for different numbers can arrive out of order. Compare occurred_at if order matters.

Trigger: a number was added to your SMS opt-out list. The recipient texted STOP, the number was opted out in the portal or through the API, or a message hard-bounced. Fields: consent event fields.

{
"event": "contact.opted_out",
"event_id": "3f6c1a2e-8b4d-4c1e-9f0a-5d2b7e9c1a44",
"phone_number": "+15555550100",
"contact_ids": ["2489e9ad-2ee2-4e00-8ec9-32d5f69181c0"],
"method": "sms",
"actor": { "type": "recipient" },
"occurred_at": "2026-11-20T14:03:12.418Z",
"idempotency_key": "contact.opted_out:3f6c1a2e-8b4d-4c1e-9f0a-5d2b7e9c1a44"
}

Trigger: a number was removed from your SMS opt-out list. The recipient texted START, or the number was opted back in in the portal or through the API.

Extra field:

FieldTypeNullableMeaning
previous_opt_out_methodsarray of stringNoHow the number had been opted out
{
"event": "contact.opted_in",
"event_id": "9b2d4f61-0c3a-4e8b-a1d7-6f5e2c8b3a90",
"phone_number": "+15555550100",
"contact_ids": ["2489e9ad-2ee2-4e00-8ec9-32d5f69181c0"],
"method": "sms",
"actor": { "type": "recipient" },
"previous_opt_out_methods": ["sms"],
"occurred_at": "2026-11-20T09:41:57.006Z",
"idempotency_key": "contact.opted_in:9b2d4f61-0c3a-4e8b-a1d7-6f5e2c8b3a90"
}

Trigger: a contact’s SMS consent status or consent basis changed (implied, express, or none).

Extra fields:

FieldTypeNullableMeaning
consent_statusobjectNo{ "from": "<old>", "to": "<new>" }
consent_methodstringYesHow consent was obtained, for example web_form
consent_obtained_atstring (ISO-8601)YesWhen consent was obtained
implied_consent_basisstring—Present only when the change involves implied consent
implied_consent_basis_datestring—Present only when the change involves implied consent
channelstringYesWhere the change came from, for example api_contact_update
{
"event": "contact.consent_changed",
"event_id": "c7a85e13-4d2f-4b6a-8e19-0f3d5a7b2c68",
"phone_number": "+15555550100",
"contact_ids": ["2489e9ad-2ee2-4e00-8ec9-32d5f69181c0"],
"method": "api",
"actor": { "type": "api_key" },
"consent_status": { "from": "implied", "to": "express" },
"consent_method": "web_form",
"consent_obtained_at": "2026-11-20T13:55:00.000Z",
"channel": "api_contact_update",
"occurred_at": "2026-11-20T13:55:02.731Z",
"idempotency_key": "contact.consent_changed:c7a85e13-4d2f-4b6a-8e19-0f3d5a7b2c68"
}

To backfill or reconcile, poll GET /api/v2/opt-outs?since= for the current opt-out list and GET /api/v2/contacts?updated_since= for changed contacts (including is_opted_out). A number that is opted back in leaves the opt-out list, so use the contact.opted_in event or is_opted_out on the contact to see removals. See the API Reference.

These events fire for messages in public team chat channels only. Messages in private channels and direct messages never send an event. A flow cannot send these events.

chat.message.created, chat.message.updated, and chat.message.deleted carry the same fields:

FieldTypeNullableMeaning
eventstringNoThe event name
message_idstring (UUID)NoID of the message
channel_idstring (UUID)NoID of the channel
channel_namestringYesThe channel name
sender_kindstringNouser (a person), integration (an incoming webhook), or system (a SIPSTACK system post)
sender_user_idstringYesThe sender’s user ID. Set only when sender_kind is user.
sender_namestringNoThe person’s name, the incoming webhook’s name, or SIPSTACK
bodystringNoThe message text. Empty for chat.message.deleted.
parent_message_idstringYesThe parent message, for a thread reply. null otherwise.
created_atstring (ISO-8601)NoWhen the message was posted
edited_atstring (ISO-8601)YesWhen the message was last edited. null if never edited.
occurred_atstring (ISO-8601)NoWhen the change happened
idempotency_keystringNo<event>:<message_id>. For chat.message.updated it also includes the edit time, so each edit has its own key.

Trigger: a message was posted in a public channel. Fields: chat message fields.

{
"event": "chat.message.created",
"message_id": "5b0d2a4e-7c1f-4e8a-9d3b-2f6a1c8e4b70",
"channel_id": "0f8e2c6a-3b5d-4a1e-8c7f-9d2b4e6a1c30",
"channel_name": "dispatch",
"sender_kind": "integration",
"sender_user_id": null,
"sender_name": "Build monitor",
"body": "Build 42 passed",
"parent_message_id": null,
"created_at": "2026-11-19T15:04:05.000Z",
"edited_at": null,
"occurred_at": "2026-11-19T15:04:05.012Z",
"idempotency_key": "chat.message.created:5b0d2a4e-7c1f-4e8a-9d3b-2f6a1c8e4b70"
}

Trigger: a message in a public channel was edited. The body has the new body and edited_at. Fields: chat message fields.

Trigger: a message in a public channel was deleted. body is an empty string. Fields: chat message fields.

Aura AI voice-agent flows can include webhook nodes. When a call reaches a webhook node, SIPSTACK sends the node’s event to your subscribed endpoints, with the payload you defined in the flow.

A webhook node can send only these flow events:

EventWhenPayload fields
sales.leadA lead-qualifier flow captured a sales leadDefined by the flow. See sales.lead
flow.callback_requestedAn Aura AI voice agent’s flow recorded that the caller asked for a callbackDefined by the flow
flow.message_takenAn Aura AI voice agent’s flow took a message for your teamDefined by the flow
flow.customA custom milestone marked by a webhook node in one of your Aura AI voice-agent flowsDefined by the flow
  • You cannot save a flow whose webhook node uses any other event name.
  • A flow can never send a platform event (call.*, message.*, contact.*, aura.*, campaign.*, chat.* or test). A platform event you receive always came from SIPSTACK itself.
  • Testing a flow in the Switchboard flow builder never sends webhooks. The builder simulates each webhook node as a success, so the test continues down the success path.

Every flow event carries the fields your flow defines, plus these system fields. The flow cannot override them:

FieldTypeNullableMeaning
sourcestringNoAlways "aura_flow"
idempotency_keystringNo<event>:<call id>:<node id>:<n>. Also sent as the X-Idempotency-Key header. n counts how many times this call has reached the node, starting at 1. If a flow loops back through the same node, each pass gets its own key. Retries of one delivery keep the same key.
occurred_atstring (ISO-8601)NoWhen the node ran
callobjectNoThe call that reached the node: { "id", "from", "to", "agentId" }
{
"event": "flow.callback_requested",
"name": "Dana Reyes",
"best_time": "after 3pm",
"source": "aura_flow",
"idempotency_key": "flow.callback_requested:1732114800.42:node_7:1",
"occurred_at": "2026-11-20T15:04:05.012Z",
"call": {
"id": "1732114800.42",
"from": "+14165550100",
"to": "+16135550200",
"agentId": "4c1e9f0a-5d2b-4e9c-8a44-3f6c1a2e8b4d"
}
}

In this example, name and best_time come from the flow. The other fields come from SIPSTACK.

Trigger: a lead-qualifier flow captured a sales lead.

FieldTypeNullableMeaning
eventstringNosales.lead
(flow fields)——The fields you defined in the flow’s webhook node. The Sales Lead Qualifier template sends name, company, need, timeline, and contact.
source, idempotency_key, occurred_at, call—NoThe system fields every flow event carries. See Flow events.
{
"event": "sales.lead",
"name": "Jane Example",
"company": "Example Dental",
"need": "Phone system for 3 locations",
"timeline": "Next month",
"contact": "jane@example.com",
"source": "aura_flow",
"idempotency_key": "sales.lead:1732118400.5678:node_3:1",
"occurred_at": "2026-11-20T15:04:05.012Z",
"call": {
"id": "1732118400.5678",
"from": "+15555550123",
"to": "+15555550100",
"agentId": "3d1f6b2a-9c4e-4a7b-8e21-5f0c9d3a7b16"
}
}

Trigger: you called POST /v2/portal/webhooks/{id}/test, or sent a test event from the Webhooks page in Switchboard.

The test event goes only to the endpoint you tested, whichever events it subscribes to. No other endpoint receives it.

FieldTypeNullableMeaning
eventstringNotest
messagestringNoThis is a test webhook delivery
occurred_atstring (ISO-8601)NoWhen the test was requested
idempotency_keystringNotest:<id of the endpoint you tested>:<random id>. Each test has a new key, so your receiver never drops a second test as a duplicate.
{
"event": "test",
"message": "This is a test webhook delivery",
"occurred_at": "2026-11-20T15:00:00.000Z",
"idempotency_key": "test:17:0b6f3c2e-9a41-4d7e-8c15-2f4a6e1d9b30"
}

Verify every request before you trust the body. A valid signature proves the request came from SIPSTACK and was not changed. The timestamp check stops an attacker from recording a real delivery and sending it to you again later (a replay).

Each delivery carries two headers:

  • X-Sipstack-Timestamp: the Unix time, in seconds, when SIPSTACK signed this attempt.
  • X-Sipstack-Signature: v1= followed by the lowercase hex HMAC-SHA256 of the signed payload, keyed with your endpoint’s signing secret.

The signed payload is the timestamp, a dot (.), and the raw request body:

<X-Sipstack-Timestamp>.<raw request body>

To verify a request:

  1. Read both headers. If either is missing, reject the request.
  2. Check the timestamp. If it is more than 5 minutes (300 seconds) from your server’s current time, in either direction, reject the request. Keep your server clock in sync (NTP).
  3. Compute the HMAC-SHA256 of <timestamp>.<raw body> with your signing secret, as lowercase hex, and add the v1= prefix.
  4. Compare your value with X-Sipstack-Signature using a constant-time comparison. If they differ, reject the request.

Reject a failed check with 401. Do not process the body.

Each retry is signed again at the time it is sent. On every attempt:

  • X-Sipstack-Timestamp and X-Sipstack-Signature are new.
  • The body is byte-for-byte the same as the first attempt.
  • X-Idempotency-Key is the same as the first attempt.

So a retry that arrives 6 minutes after the first attempt still passes the 5-minute check. Do not use the signature or the timestamp to spot a repeat. De-duplicate on X-Idempotency-Key (see Idempotency and de-duplication).

const crypto = require('crypto');
const express = require('express');
const app = express();
const TOLERANCE_SECONDS = 300;
function verifySipstackWebhook(rawBody, timestampHeader, signatureHeader, secret) {
if (!timestampHeader || !signatureHeader) return false;
if (!/^\d+$/.test(timestampHeader)) return false;
const timestamp = Number(timestampHeader);
const now = Math.floor(Date.now() / 1000);
if (Math.abs(now - timestamp) > TOLERANCE_SECONDS) return false;
const signedPayload = Buffer.concat([Buffer.from(`${timestampHeader}.`, 'utf8'), rawBody]);
const expected = 'v1=' + crypto.createHmac('sha256', secret).update(signedPayload).digest('hex');
const a = Buffer.from(signatureHeader, 'utf8');
const b = Buffer.from(expected, 'utf8');
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
// express.raw() keeps the body as bytes. Verify against those bytes,
// not a re-serialized copy of the parsed JSON.
app.post('/webhook', express.raw({ type: 'application/json' }), (req, res) => {
const ok = verifySipstackWebhook(
req.body,
req.get('x-sipstack-timestamp'),
req.get('x-sipstack-signature'),
process.env.SIPSTACK_WEBHOOK_SECRET,
);
if (!ok) {
return res.status(401).send('Invalid signature');
}
const event = JSON.parse(req.body.toString('utf8'));
// Respond fast, then process in the background (queue, job, etc.).
res.status(200).send('OK');
handleEvent(event);
});
import hashlib
import hmac
import json
import os
import time
from flask import Flask, abort, request
app = Flask(__name__)
SECRET = os.environ["SIPSTACK_WEBHOOK_SECRET"].encode()
TOLERANCE_SECONDS = 300
def verify_sipstack_webhook(raw: bytes, timestamp: str, signature: str) -> bool:
if not timestamp or not signature or not timestamp.isdigit():
return False
if abs(int(time.time()) - int(timestamp)) > TOLERANCE_SECONDS:
return False
signed_payload = timestamp.encode() + b"." + raw
expected = "v1=" + hmac.new(SECRET, signed_payload, hashlib.sha256).hexdigest()
return hmac.compare_digest(signature, expected)
@app.post("/webhook")
def webhook():
raw = request.get_data() # raw bytes, before any JSON parsing
ok = verify_sipstack_webhook(
raw,
request.headers.get("X-Sipstack-Timestamp", ""),
request.headers.get("X-Sipstack-Signature", ""),
)
if not ok:
abort(401)
event = json.loads(raw)
# Respond fast, then process in the background.
return "OK", 200

If you use the @sipstack/sdk package for Node.js, call verifyWebhook(rawBody, headers, secret). Pass the raw body and the request headers. When X-Sipstack-Timestamp is present, it checks only the timestamped v1= signature, with a 5-minute tolerance. constructEvent(rawBody, headers, secret) runs the same check, then parses the body, and throws if the signature does not match. To pass the two header values yourself, use verifyTimestampedSignature(rawBody, timestamp, signature, secret). verifySignature checks only the legacy body-only header.

import express from "express";
import { verifyWebhook } from "@sipstack/sdk";
const app = express();
app.post("/webhook", express.raw({ type: "application/json" }), (req, res) => {
if (!verifyWebhook(req.body, req.headers, process.env.SIPSTACK_WEBHOOK_SECRET)) {
return res.status(401).end();
}
const event = JSON.parse(req.body.toString("utf8"));
res.status(200).end();
});

Older integrations verify X-Webhook-Signature. Its value is sha256= followed by the hex HMAC-SHA256 of the raw body only. It has no timestamp, so it does not protect you against replays.

  • SIPSTACK still sends X-Webhook-Signature on platform webhook deliveries, next to the new headers, during a 90-day deprecation period.
  • After that period, SIPSTACK stops sending it. We notify endpoint owners before it is removed.
  • Webhooks sent by Aura AI voice agents (post-call, flow, and escalation webhooks) never carry it. They only use the timestamped headers.

Migrate now. Switch your verifier to X-Sipstack-Timestamp and X-Sipstack-Signature. Both headers are sent today with the same secret, so you can deploy the new check without changing anything in SIPSTACK.

Some webhooks are sent by an Aura AI voice agent, not by a platform webhook endpoint:

  • The webhook post-call action (sent when a call ends).
  • A Send message node in a flow with the webhook channel (sent during the call).
  • The escalation webhook (sent when the agent escalates by webhook).

These use the same X-Sipstack-Timestamp and X-Sipstack-Signature headers and the same check as above. The secret is the agent’s webhook signing secret, not an endpoint secret. Each agent has one signing secret for all of its webhooks. SIPSTACK creates it when you save an agent that has a webhook, and shows it once. To get a new one, rotate it in the agent’s settings. The old secret stops working right away.

See Building & Editing Agents for the per-webhook transcript setting.

A valid signature proves SIPSTACK sent the request. It does not tell you who wrote the payload. Check the event name too:

  • Platform events (call.*, message.*, contact.*, aura.*, campaign.*, chat.*, test) always come from SIPSTACK itself. A flow can never send them.
  • Flow events (sales.lead, flow.*) come from a webhook node in one of your Aura AI voice-agent flows. Anyone who can edit your flows controls their payload fields. Treat those fields as input from that person. The system fields (source, idempotency_key, occurred_at, call) are always set by SIPSTACK.
  • Internal platform events are never delivered to your endpoints, even with a ["*"] subscription.
  • Your endpoint must answer with a 2xx status within 10 seconds. Answer first, then process the event in the background.
  • A non-2xx status, a timeout, or a connection error counts as a failed attempt.
  • A failed delivery is retried up to 2 more times. Attempt 2 is about 1 minute after the first failure. Attempt 3 is about 5 minutes after attempt 2. That is at most 3 attempts per event.
  • Redirects are not followed. A 3xx status counts as a failure.
  • Every attempt is logged with the event type, HTTP status, response time, and attempt number. Read the log with GET /v2/portal/webhooks/{id}/deliveries.
  • If you delete or disable an endpoint while retries are pending, the pending retries are skipped.
  • When an event fails all 3 attempts, the endpoint’s failure count goes up by one. After 10 events in a row fail all their attempts, the endpoint is disabled automatically. Any successful delivery resets the count to zero.
  • To recover from auto-disable, fix your server, then recreate the endpoint or contact support. Use the delivery log to find events you missed.
  • Events are not guaranteed to arrive in order. Use occurred_at to order them.

Delivery is at-least-once. Your endpoint can receive the same event more than once, for example after a timeout on a request you actually processed.

  • De-duplicate on idempotency_key (also sent as the X-Idempotency-Key header). Store keys you have processed and skip repeats.
  • For contact consent events you can also use event_id.
  • Flow events always carry an idempotency_key. It is new on each pass through a webhook node, so a flow that loops back through the same node sends a new key each time.

Use this list when you build or review an integration, by hand or with an AI coding agent:

  1. Create the endpoint with an explicit events list. Store the signing secret from the create response.
  2. Read the raw body. Check that X-Sipstack-Timestamp and X-Sipstack-Signature are present, that the timestamp is within 5 minutes, and that the v1= signature matches (constant-time). Reject a failed check with 401. Do not build new code on the deprecated X-Webhook-Signature.
  3. Answer 200 within 10 seconds. Do slow work in the background.
  4. Branch on the event field (or the X-Webhook-Event header).
  5. De-duplicate on idempotency_key (X-Idempotency-Key). Retries carry a new timestamp and signature, so never de-duplicate on those.
  6. Ignore fields you do not recognize. Check nullable fields for null.
  7. For calls, subscribe to call.completed, call.missed, and call.unanswered as needed. Do not depend on the real-time call events until they are live.
  8. Send a test event and confirm it appears in your logs and in the delivery log.

The event catalog grows with the platform. If you need an event that is not listed, tell support.