↑ ↓ to navigate · ↵ to open
Documentation menu
Reference
Resources
Account
Realtime
More
API reference
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.
Returns { uuid: string, name: string, wallet_balance: string, status: string }, where status is active or suspended.
Returns the WebhookConfig object.
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 it 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://sauti-pbx.services.co.ke/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://sauti-pbx.services.co.ke/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://sauti-pbx.services.co.ke/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.',
},
)Returns { signing_secret: string } — used to verify webhook signatures.
Rotate the signing secret; the old one stops verifying immediately. Returns { signing_secret: string }.
The WebhookConfig object
| Field | Type | Description |
|---|---|---|
| endpoints | object | Account-default URL per purpose, keyed by purpose value (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 }. |