SENDO OUTBOUND VOICE API
Originate outbound phone calls and process their audio.
Originate an Outbound Call
This endpoint starts an outbound call to a destination number. Optionally, it can also start transcription, media forking, or call recording once the call is answered, by including mediaProcessing in the request.
Required Headers
| Field | Type | Description | Default Value | Optional | Example |
|---|---|---|---|---|---|
| x-tenant-id | string | Selects which tenant configuration handles the call. | none | No | your-tenant-id |
Required attributes
| Field | Type | Description | Default Value | Optional | Example |
|---|---|---|---|---|---|
| to | string | The destination phone number (B number). | none | No | +50584533001 |
| from | string | The originating phone number (A number). | none | No | +593967793436 |
| statusCallback | string | URL that receives call status event notifications. | none | Yes | https://yourdomain.com/api/call-events |
| statusCallbackEvent | array | Call events to notify. Possible values: initiated, ringing, answered, completed. | none | Yes | ["initiated", "answered", "completed"] |
| statusCallbackMethod | string | HTTP method used to call statusCallback. Possible values: get, post. Only applied when statusCallback is also set, otherwise defaults to post. | post | Yes | post |
| timeout | integer | Seconds to wait for the call to be answered. | none | Yes | 30 |
| timeLimit | integer | Maximum duration, in seconds, allowed for the call. | none | Yes | 3600 |
| url | string | URL with call handling instructions. | none | Yes | https://yourdomain.com/api/call-instructions |
| mediaProcessing | object | Starts transcription, media forking, or recording once the call answers. See Media Processing | none | Yes |
Request body.
curl --location 'https://api.sendo.cloud/api/v1/voice_outbound/call'
--header 'x-tenant-id: your-tenant-id'
--header 'Content-Type: application/json'
--data-raw '{"to": "+50584533001","from": "+593967793436","statusCallback": "https://yourdomain.com/api/call-events","statusCallbackEvent": ["initiated","answered","completed"],"statusCallbackMethod": "post","timeout": 30,"timeLimit": 3600}'
| Code | Description |
|---|---|
| 200 | Call accepted, FSM started |
{
"account_sid": "your-tenant-id",
"direction": "outbound-api",
"sid": "c3b1e2a0-1234-4a5b-8c9d-0e1f2a3b4c5d"
}
Server responses.
Media Processing
mediaProcessing is optional and accepts exactly one of the following types, selected by the type field: transcription, media_fork, or recording. Sending an unrecognized type, or an invalid combination of fields for the chosen type, results in a 400 response with no body.
| Field | Type | Description | Default Value | Optional | Example |
|---|---|---|---|---|---|
| type | string | Must be `transcription`. | none | No | transcription |
| ws_uri | string | WebSocket URI that receives this call's live transcripts, instead of the default publisher. | none | Yes | wss://your-host/transcripts |
NOTE: The speech-to-text provider is selected by the backend and cannot be set by the caller. A request that includes a
providerfield is rejected with 400.
curl --location 'https://api.sendo.cloud/api/v1/voice_outbound/call'
--header 'x-tenant-id: your-tenant-id'
--header 'Content-Type: application/json'
--data-raw '{"to": "+50584533001","from": "+593967793436","mediaProcessing": {"type":"transcription","ws_uri":"wss://your-host/transcripts"}}'
| Code | Description |
|---|---|
| 200 | Call accepted, FSM started |
{
"account_sid": "your-tenant-id",
"direction": "outbound-api",
"sid": "c3b1e2a0-1234-4a5b-8c9d-0e1f2a3b4c5d"
}
The platform can send this call’s forked media using different protocols and formats. A profile is where you specify which one to use — either by name (profile_name), referencing one preconfigured on the platform, or inline (profile), defining it directly in the request.
| Field | Type | Description | Default Value | Optional | Example |
|---|---|---|---|---|---|
| type | string | Must be `media_fork`. | none | No | media_fork |
| profile_name | string | Name of a preconfigured media fork profile to use. | none | Yes | default-fork-profile |
| profile | object | Inline media fork profile definition. | none | Yes | |
| ws_uri | string | WebSocket URI to receive the forked audio. | none | Yes | wss://your-host/media |
| legs | array | Which call legs to fork. Possible values: caller, callee. | none | Yes | ["caller", "callee"] |
curl --location 'https://api.sendo.cloud/api/v1/voice_outbound/call'
--header 'x-tenant-id: your-tenant-id'
--header 'Content-Type: application/json'
--data-raw '{"to": "+50584533001","from": "+593967793436","mediaProcessing": {"type":"media_fork","profile_name":"default-fork-profile","ws_uri":"wss://your-host/media","legs":["caller","callee"]}}'
| Code | Description |
|---|---|
| 200 | Call accepted, FSM started |
{
"account_sid": "your-tenant-id",
"direction": "outbound-api",
"sid": "c3b1e2a0-1234-4a5b-8c9d-0e1f2a3b4c5d"
}
| Field | Type | Description | Default Value | Optional | Example |
|---|---|---|---|---|---|
| type | string | Must be `recording`. | none | No | recording |
| recordingChannels | string | Only `dual` (both legs mixed) is supported. Omit this field to use the supported default. | dual | Yes | dual |
| recordingTracks | string | Only `both` is supported. Omit this field to use the supported default. | both | Yes | both |
NOTE: Any
recordingChannels/recordingTrackscombination other thandual+bothis rejected with 400. Omit both fields to use the only supported combination.
curl --location 'https://api.sendo.cloud/api/v1/voice_outbound/call'
--header 'x-tenant-id: your-tenant-id'
--header 'Content-Type: application/json'
--data-raw '{"to": "+50584533001","from": "+593967793436","mediaProcessing": {"type":"recording"}}'
| Code | Description |
|---|---|
| 200 | Call accepted, FSM started |
{
"account_sid": "your-tenant-id",
"direction": "outbound-api",
"sid": "c3b1e2a0-1234-4a5b-8c9d-0e1f2a3b4c5d"
}
Call Status
This endpoint is not available yet. Every request currently returns 400.
Required attributes
| Field | Type | Description | Default Value | Optional | Example |
|---|---|---|---|---|---|
| request_id | string | Identifier of the call to query. | none | No | c3b1e2a0-1234-4a5b-8c9d-0e1f2a3b4c5d |
Request body.
curl --location 'https://api.sendo.cloud/api/v1/voice_outbound/call_status'
--header 'x-tenant-id: your-tenant-id'
--header 'Content-Type: application/json'
--data-raw '{"request_id": "c3b1e2a0-1234-4a5b-8c9d-0e1f2a3b4c5d"}'
| Code | Description |
|---|---|
| 400 | Always — this endpoint is not implemented yet. |
{}