Callsv4

Transfer a call

POST/calls/{callId}/transfer

Move a connected call to another handler, or to the phone number to, which takes it off Blooio once that number answers. A call a Blooio agent handed off can be transferred too. A transfer that fails partway, or a number that doesn't answer, leaves the call waiting for a teammate, as a handed-off call does. OAuth apps need calls:write.

Path parameters

callIdRequiredstring

Call id (call_...).

Headers

AuthorizationRequiredstring

Your API key, sent as a bearer token: Authorization: Bearer <api_key>. Editing this stays in sync with the API key box on the right.

Bearer

Body parameters

JSON
tooptionalstring

Transfer the call to this phone number (E.164). It leaves Blooio's handlers once the number answers; if it doesn't, the call waits for a teammate.

handleroptionalCallHandlerRequest

Who 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"
urloptionalstring

stream only, required: a wss:// URL.

auth_tokenoptionalstring

stream only: sent as Authorization: Bearer <auth_token> when Blooio connects to url. Kept with the live call only and never returned.

Returns

dataoptionalCall
call_idRequiredstring

Call id (call_...).

channel_idRequiredstring

The Blooio Voice channel (ch_...) the call is on.

directionRequiredstring
"inbound""outbound"
fromRequiredstring

Caller, in E.164 format. A withheld caller ID is the carrier's text instead, such as anonymous, with no contact_id.

toRequiredstring

Callee, in E.164 format.

contact_idRequiredstring | null

The contact on the other end (ct_...).

contactRequiredContactSummary | null

The person on the other end, with their name when one is on file. A number already saved as a contact on another channel is that contact. null when the caller withheld their number.

ContactSummary
contact_idRequiredstring | null

The contact (ct_...). null when no contact record matches the identifier.

identifierRequiredstring

The contact's identifier (phone number, email, or handle).

nameRequiredstring | null

The contact's name. null when none is on file. On a webhook it is a snapshot from when the event happened; read the contact for current details.

null
statusRequiredstring

queued 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 | null

Who 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"
urloptionalstring

stream only: the WebSocket URL the audio streams to.

tooptionalstring

phone only: the number the call was transferred to.

null
answered_by_user_idRequiredstring | null

The dashboard user holding the call on their softphone.

hangup_causeRequiredstring | null

The carrier's hangup cause, e.g. normal_clearing.

errorRequiredCallError | null
CallError
codeRequiredstring
messageRequiredstring
null
created_atRequiredinteger

Epoch ms.

answered_atRequiredinteger | null

Epoch ms.

ended_atRequiredinteger | null

Epoch ms.

is_recordedRequiredboolean

Whether the call is recorded from answer, because the organization had call recording on. Its recording is at GET /calls/{call_id}/recording once call.recording.ready fires.

Response codes

200The call
400`invalid_call_id`, `invalid_body` (send exactly one of `to` and `handler`), or `invalid_field`.
401Your API key is missing or invalid. Pass it as a bearer token.
404`call_not_found`.
409`call_ended`, `call_not_connected`, `call_not_in_progress`, `call_transferred` (already on a phone), `call_handler_changed` (someone else answered or moved the call meanwhile), or `agent_unavailable`.
422`call_command_rejected`: the carrier refused the command.
502`upstream_unavailable`: the carrier network couldn't be reached. Retry with backoff.

Sends a live request with your values and shows the real response below. Your key is stored only in this browser.

Request
curl -X POST https://api.blooio.com/v4/calls/obj_a1b2c3d4/transfer \
Body object
Response objectexample
{  "data": {    "call_id": "obj_a1b2c3d4",    "channel_id": "ch_a1b2c3d4",    "direction": "inbound",    "from": "+15551234567",    "to": "+15551234567",    "contact_id": "ct_a1b2c3d4",    "contact": {      "contact_id": "ct_a1b2c3d4",      "identifier": "+15551234567",      "name": "Jane Doe"    },    "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,    "is_recorded": true  }}