Webhooks
Every call, message, line, SIM bank and trunk change as an event, posted to your URL.
Webhooks post each event to a URL of yours as it happens. Add one under Webhooks in the dashboard, or through the API. Webhooks come with the Team plan (up to 10) and the Business plan (up to 50).
Add a webhook
Choose the URL, the topics (or * for all) and a secret, so you can check that a delivery came from simtrunk.
curl https://api.simtrunk.com/v1/webhooks \ -H "Authorization: Bearer $SIMTRUNK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com/simtrunk", "topics": ["simtrunk.call.missed", "simtrunk.sms.received"], "secret": "…"}'GET /v1/webhooks/{id}/deliveries lists a webhook's deliveries, and POST /v1/notify/test sends a simtrunk.test event. The key needs webhooks:write (and settings:write for the test).
The event
Every event has the same envelope; data holds the topic's own fields.
| Field | Type | What |
|---|---|---|
id | string | The event's ID: the same event delivered again has the same ID. |
event | string | The topic. |
title | string | The event in words. |
time | timestamp | When it happened (RFC 3339, UTC). |
line | string (optional) | The line's ID, for a line's event. |
line_name | string (optional) | The line's display name. |
body | string (optional) | The event's text, for a person (an SMS, a USSD answer). |
fields | object (optional) | What a person reads of it, by label. |
data | object (optional) | The topic's own fields (below). |
{ "id": "evt_…", "event": "simtrunk.sms.received", "title": "SMS received", "time": "2026-12-01T09:30:00Z", "line": "ln_…", "line_name": "Sales", "body": "Is the shop open today?", "data": { "message_id": 42, "direction": "in", "peer": "+243900000000", "text": "Is the shop open today?" }}Topics
Calls
| Topic | When |
|---|---|
simtrunk.call.incoming | Incoming call ringing |
simtrunk.call.outgoing | Outgoing call started |
simtrunk.call.answered | Call answered |
simtrunk.call.ended | Call ended |
simtrunk.call.missed | Missed call |
simtrunk.call.failed | Outgoing call failed |
SMS and USSD
| Topic | When |
|---|---|
simtrunk.sms.received | SMS received |
simtrunk.sms.sent | SMS sent |
simtrunk.sms.failed | SMS failed |
simtrunk.ussd.sent | USSD sent |
simtrunk.ussd.answered | USSD answered |
simtrunk.ussd.failed | USSD failed |
simtrunk.ussd.network | USSD from the network |
Lines
| Topic | When |
|---|---|
simtrunk.line.created | Line created |
simtrunk.line.updated | Line updated |
simtrunk.line.deleted | Line deleted |
simtrunk.line.enabled | Line enabled |
simtrunk.line.disabled | Line disabled |
simtrunk.line.registered | Line registered to the network |
simtrunk.line.unregistered | Line lost its registration |
simtrunk.line.down | Line down |
simtrunk.line.recovered | Line recovered |
SIM banks, SIMs and devices
| Topic | When |
|---|---|
simtrunk.bank.added | SIM bank added |
simtrunk.bank.updated | SIM bank updated |
simtrunk.bank.removed | SIM bank removed |
simtrunk.bank.enrolled | SIM bank enrolled |
simtrunk.bank.connected | SIM bank connected |
simtrunk.bank.disconnected | SIM bank disconnected |
simtrunk.sim.inserted | SIM inserted |
simtrunk.sim.removed | SIM removed |
simtrunk.device.added | Reader or modem added |
simtrunk.device.removed | Reader or modem removed |
eSIM profiles
| Topic | When |
|---|---|
simtrunk.esim.profile.enabled | eSIM profile enabled |
simtrunk.esim.profile.disabled | eSIM profile disabled |
simtrunk.esim.profile.downloaded | eSIM profile downloaded |
simtrunk.esim.profile.download_failed | eSIM download failed |
simtrunk.esim.profile.deleted | eSIM profile deleted |
SIP trunks
| Topic | When |
|---|---|
simtrunk.trunk.created | Trunk created |
simtrunk.trunk.updated | Trunk updated |
simtrunk.trunk.deleted | Trunk deleted |
simtrunk.trunk.registered | Trunk registered |
simtrunk.trunk.registration_failed | Trunk registration failed |
SIP users and phones
| Topic | When |
|---|---|
simtrunk.sip_user.created | SIP user created |
simtrunk.sip_user.deleted | SIP user deleted |
simtrunk.sip_user.device.registered | Phone registered |
simtrunk.sip_user.device.unregistered | Phone unregistered |
Your account
| Topic | When |
|---|---|
simtrunk.settings.updated | Settings changed |
simtrunk.tenant.suspended | Account suspended |
simtrunk.tenant.resumed | Account resumed |
simtrunk.test | Test event |
The fields of each topic are in the dashboard and at GET /v1/notify/topics.
How is this guide?
Last updated on