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.
Account info
Section titled “Account info”GET /account/
Returns { uuid, name, wallet_balance, status }, where status is active or suspended.
Get webhook config
Section titled “Get webhook config”GET /account/webhooks
Returns the WebhookConfig object.
Set webhook config
Section titled “Set webhook config”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.
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." }'const res = await fetch("https://api.sautipbx.com/api/account/webhooks", { method: "POST", headers: { Authorization: "Bearer sk_live_...", "Content-Type": "application/json", }, body: JSON.stringify({ purpose: "voice_inbound", url: "https://yourapp.com/handle-call", fallback_mode: "message", fallback_value: "Sorry, we cannot take your call right now.", }),});import requests
res = requests.post( "https://api.sautipbx.com/api/account/webhooks", headers={"Authorization": "Bearer sk_live_..."}, json={ "purpose": "voice_inbound", "url": "https://yourapp.com/handle-call", "fallback_mode": "message", "fallback_value": "Sorry, we cannot take your call right now.", },)Get the signing secret
Section titled “Get the signing secret”GET /account/webhooks/secret
Returns { signing_secret: string }. Used to verify webhook signatures.
Rotate the signing secret
Section titled “Rotate the signing secret”POST /account/webhooks/secret/rotate
Rotate the signing secret. Returns { signing_secret: string }.
The WebhookConfig object
Section titled “The WebhookConfig object”| 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 }. |