Skip to content

Account & webhooks

Account info, plus the account-default webhook URLs (one per purpose: voice_inbound, voice_outbound, status), the shared fallback behaviour, and the signing secret. See the webhooks guide for how these fit together.

GET /account/

Returns { uuid, name, wallet_balance, status }, where status is active or suspended.

GET /account/webhooks

Returns the WebhookConfig object.

POST /account/webhooks

Set an account-default webhook URL (for one purpose) and/or the fallback behaviour. Only the fields you send are changed. Send url to set that purpose’s default, or omit it to change only the fallback.

Field Type Required Default Description
purpose string Optional voice_inbound Which purpose url applies to: voice_inbound, voice_outbound, or status.
url string, nullable Optional null Default webhook for purpose. Blank string clears it; omit to leave unchanged.
fallback_mode string, nullable Optional null message, play, or drop. Omit to leave the fallback unchanged.
fallback_value string Optional "" Text for message, or audio URL for play.

Returns the WebhookConfig object.

Terminal window
curl https://api.sautipbx.com/api/account/webhooks \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{ "purpose": "voice_inbound",
"url": "https://yourapp.com/handle-call",
"fallback_mode": "message",
"fallback_value": "Sorry, we cannot take your call right now." }'

GET /account/webhooks/secret

Returns { signing_secret: string }. Used to verify webhook signatures.

POST /account/webhooks/secret/rotate

Rotate the signing secret. Returns { signing_secret: string }.

Field Type Description
endpoints object Account-default URL per purpose, keyed by purpose (voice_inbound, voice_outbound, status). Empty string = none set.
fallback_mode string message · play · drop.
fallback_value string Message text or audio URL for the fallback.
numbers array Per-number overrides: { number, purpose, url }.