Place a call
/callsCall to from one of the organization's Blooio Voice numbers. The call starts ringing; when the callee answers, handler takes its audio and call.answered fires. With an agent handler, the Blooio agent that owns from talks to the callee. OAuth apps need calls:write.
Headers
AuthorizationRequiredstringYour API key, sent as a bearer token: Authorization: Bearer <api_key>. Editing this stays in sync with the API key box on the right.
Body parameters
JSONfromRequiredstringOne of the organization's Blooio Voice numbers, in E.164 format.
toRequiredstringThe number to call, in E.164 format.
handlerRequiredCallHandlerRequestWho takes the call's audio once it's answered. stream: Blooio opens a WebSocket to url and speaks the Blooio media stream protocol (base64 PCMU at 8 kHz both ways; see the Blooio Voice guide); a socket that closes or sends a frame the protocol doesn't define ends the call with handler_disconnected. agent: the Blooio agent that owns the call's number talks to the caller. softphone: the dashboard user making the request takes it in their browser (dashboard only).
handlerRequiredCallHandlerRequestWho takes the call's audio once it's answered. stream: Blooio opens a WebSocket to url and speaks the Blooio media stream protocol (base64 PCMU at 8 kHz both ways; see the Blooio Voice guide); a socket that closes or sends a frame the protocol doesn't define ends the call with handler_disconnected. agent: the Blooio agent that owns the call's number talks to the caller. softphone: the dashboard user making the request takes it in their browser (dashboard only).
typeRequiredstring"stream""agent""softphone"urloptionalstringstream only, required: a wss:// URL.
auth_tokenoptionalstringstream only: sent as Authorization: Bearer <auth_token> when Blooio connects to url. Kept with the live call only and never returned.
Returns
dataoptionalCall
dataoptionalCallcall_idRequiredstringCall id (call_...).
channel_idRequiredstringThe Blooio Voice channel (ch_...) the call is on.
directionRequiredstring"inbound""outbound"fromRequiredstringCaller, in E.164 format. A withheld caller ID is the carrier's text instead, such as anonymous, with no contact_id.
toRequiredstringCallee, in E.164 format.
contact_idRequiredstring | nullThe contact on the other end (ct_...).
statusRequiredstringqueued while the dial is placed, ringing, in_progress once answered, then completed. A call that ends unanswered is missed; one whose dial was refused is failed.
"queued""ringing""in_progress""completed""missed""failed"handlerRequiredCallHandler | nullWho has the call's audio; null until it's answered, and while a call the agent handed off waits for a teammate.
handlerRequiredCallHandler | nullWho has the call's audio; null until it's answered, and while a call the agent handed off waits for a teammate.
CallHandler
typeRequiredstring"stream""softphone""agent""phone"urloptionalstringstream only: the WebSocket URL the audio streams to.
tooptionalstringphone only: the number the call was transferred to.
answered_by_user_idRequiredstring | nullThe dashboard user holding the call on their softphone.
hangup_causeRequiredstring | nullThe carrier's hangup cause, e.g. normal_clearing.
errorRequiredCallError | null
errorRequiredCallError | nullCallError
codeRequiredstringmessageRequiredstringcreated_atRequiredintegerEpoch ms.
answered_atRequiredinteger | nullEpoch ms.
ended_atRequiredinteger | nullEpoch ms.
Response codes
Sends a live request with your values and shows the real response below. Your key is stored only in this browser.
curl -X POST https://api.blooio.com/v4/calls \{ "data": { "call_id": "obj_a1b2c3d4", "channel_id": "ch_a1b2c3d4", "direction": "inbound", "from": "+15551234567", "to": "+15551234567", "contact_id": "ct_a1b2c3d4", "status": "queued", "handler": { "type": "stream", "url": "https://example.com", "to": "+15551234567" }, "answered_by_user_id": "obj_a1b2c3d4", "hangup_cause": "string", "error": { "code": "string", "message": "Hello from Blooio!" }, "created_at": 0, "answered_at": 0, "ended_at": 0 }}