Skip to main content
POST
Place an outbound call.

Authorizations

Authorization
string
header
required

A person's session: Authorization: Bearer <ID token>, the ID token the Sendblue sign-in issues. The person acts in their company's root account with the role of their seat.

Headers

Idempotency-Key
string
required

A value unique to this intended write, 1 to 128 visible ASCII characters. A repeat with the same key returns the original result.

Required string length: 1 - 128
Pattern: ^[\x21-\x7E]+$

Body

application/json
to
string
required

A phone number in E.164 form.

Pattern: ^\+[1-9][0-9]{6,14}$
Example:

"+14155550100"

from
string
required

A number the account owns.

Pattern: ^\+[1-9][0-9]{6,14}$
Example:

"+14155550100"

twiml
string

The TwiML document to run when the call is answered.

Maximum string length: 4000
url
string<uri>

Where to fetch the TwiML document when the call is answered.

method
enum<string>
Available options:
GET,
POST
fallback_url
string<uri>
fallback_method
enum<string>
Available options:
GET,
POST
timeout_seconds
integer

How long to let the call ring. Default 60.

Required range: 5 <= x <= 120
time_limit_seconds
integer

The longest the answered call may last. Default 14400.

Required range: 30 <= x <= 14400
status_callback
string<uri>
status_callback_method
enum<string>
Available options:
GET,
POST
status_callback_events
enum<string>[]
Available options:
initiated,
ringing,
answered,
completed
machine_detection
enum<string>

Answering-machine detection. Billed per call when enabled.

Available options:
enable,
detect_message_end
async_machine_detection
boolean

Run the document at once and report the verdict to machine_detection_callback.

machine_detection_callback
string<uri>
machine_detection_callback_method
enum<string>
Available options:
GET,
POST
machine_detection_timeout_seconds
integer
Required range: 3 <= x <= 59
record
boolean

Record the call from answer to hangup.

recording_channels
enum<string>
Available options:
mono,
dual
recording_track
enum<string>
Available options:
inbound,
outbound,
both
recording_status_callback
string<uri>
recording_status_callback_method
enum<string>
Available options:
GET,
POST
recording_status_callback_events
enum<string>[]
Available options:
in_progress,
completed,
absent

Response

The call was accepted and queued for dialing.

id
string
required
direction
enum<string>
required

outbound_dial is a leg a <Dial> created; its parent_call_id names the call that dialed it.

Available options:
inbound,
outbound_api,
outbound_dial
status
enum<string> | null
required

Null while the carrier's evidence about the call is contradictory.

Available options:
queued,
ringing,
in_progress,
completed,
busy,
failed,
no_answer,
canceled
to
string
required
from
string
required
parent_call_id
string | null
required
answered_by
string | null
required

The answering-machine detection verdict, when detection was requested.

started_at
string<date-time> | null
required
ended_at
string<date-time> | null
required
duration_seconds
integer | null
required
price
object | null
required
Example:
created_at
string<date-time>
required

RFC 3339, UTC.

updated_at
string<date-time>
required

RFC 3339, UTC.