Initiate an outbound call

In order to create an outbound call from a voice channel you can use this request. You can set a callFlow with commands to be executed after call is answered.

Call flow command initiate an outbound call

Check bellow the available commands when initiating an outbound call. In order to assess the options of each command, you may explore each command section.

type: string
enum:
  - hangup
  - playback
  - say
  - gather
  - record
  - bridge
  - pause

Create call

post

Create a channel call

Authorizations
Path parameters
workspaceIdstring · uuidRequired

The ID of the workspace

channelIdstring · uuidRequired

The ID for a channel

Body
fromstringOptional
tostringRequired
ringTimeoutinteger · min: 3 · max: 120OptionalDefault: 30
maxDurationinteger · min: 1OptionalDefault: 14400
sendKeysstring · max: 20OptionalPattern: ^[0-9*#]+$
recordbooleanOptional
recordStartstring · enumOptionalPossible values:
flowStartstring · enumOptionalPossible values:
stereobooleanOptional
scheduledForstring · date-timeOptional
tagsstring[] · max: 10Optional

Tags to associate with the call. Tags are converted to lower case and tags that do not exist are automatically created. You can view your created tags in the UI. You can specify up to 10 tags per call.

Responses
202
Call was accepted for processing
application/json
post
POST /workspaces/{workspaceId}/channels/{channelId}/calls HTTP/1.1
Host: 
Authorization: Bearer jwt
Content-Type: application/json
Accept: */*
Content-Length: 570

{
  "from": "text",
  "to": "text",
  "ringTimeout": 30,
  "maxDuration": 14400,
  "sendKeys": "text",
  "record": true,
  "recordStart": "record-from-answer",
  "flowStart": "from-answer",
  "stereo": true,
  "callFlow": [
    {
      "command": "hangup",
      "conditions": [
        {
          "variable": "keys",
          "operator": "eq",
          "value": "text"
        }
      ],
      "options": {
        "media": [
          "text"
        ],
        "loop": 1,
        "timeout": 1,
        "pauseMilliseconds": 1
      }
    }
  ],
  "scheduledFor": "2025-07-15T14:29:49.245Z",
  "notification": {
    "url": "text"
  },
  "amdSettings": {
    "enabled": false,
    "wordCount": 5,
    "speechTimeout": 3,
    "speechLocale": "en-US",
    "beepTimeout": 30,
    "ifMachineNotifyAfter": "wordCount"
  },
  "tags": [
    "text"
  ]
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "channelId": "123e4567-e89b-12d3-a456-426614174000",
  "from": "text",
  "to": "text",
  "originator": {
    "contact": {
      "id": "text",
      "identifierKey": "text",
      "identifierValue": "text"
    },
    "number": {
      "type": "pstn",
      "number": "text",
      "anonymous": true,
      "callerIdName": "text",
      "identity": "text",
      "countryIsoCode": "text",
      "pstnNumberType": "text"
    }
  },
  "receiver": {
    "contact": {
      "id": "text",
      "identifierKey": "text",
      "identifierValue": "text"
    },
    "number": {
      "type": "pstn",
      "number": "text",
      "anonymous": true,
      "callerIdName": "text",
      "identity": "text",
      "countryIsoCode": "text",
      "pstnNumberType": "text"
    }
  },
  "parentId": "123e4567-e89b-12d3-a456-426614174000",
  "direction": "incoming",
  "status": "accepted",
  "reason": "text",
  "type": "pstn",
  "duration": 1,
  "hangupCauseCode": 1,
  "hangupSource": "callee",
  "hangupSipCode": "text",
  "createdAt": "2025-07-15T14:29:49.245Z",
  "updatedAt": "2025-07-15T14:29:49.245Z",
  "ringingAt": "2025-07-15T14:29:49.245Z",
  "answeredAt": "2025-07-15T14:29:49.245Z",
  "endedAt": "2025-07-15T14:29:49.245Z",
  "scheduledFor": "2025-07-15T14:29:49.245Z",
  "callFlow": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "commands": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "callId": "123e4567-e89b-12d3-a456-426614174000",
        "callFlowId": "123e4567-e89b-12d3-a456-426614174000",
        "status": "text",
        "command": "text",
        "conditions": [
          {
            "variable": "keys",
            "operator": "eq",
            "value": "text"
          }
        ]
      }
    ]
  },
  "notification": {
    "url": "text"
  },
  "qualityInsights": {
    "mos": "text",
    "pdd": "text"
  },
  "sipInsights": {
    "hangupSipCode": "text",
    "edgeRegion": "text",
    "providerName": "text",
    "userAgent": "text",
    "remoteSignallingIp": "text",
    "remoteMediaIp": "text"
  },
  "amdResult": {
    "result": "human",
    "speech": "text",
    "locale": "text"
  },
  "sipType": "elastic",
  "tags": [
    "text"
  ]
}

Example 1: Initiate an outbound call, play an announcement and hangup

curl -X POST "https://api.bird.com/workspaces/:workspaceId/channels/:channelId/calls" \
     -H 'Authorization: Bearer {Token}'

Example 2: Initiate an outbound call with TTS

curl -X POST "https://api.bird.com/workspaces/:workspaceId/channels/:channelId/calls \
     -H 'Authorization: Bearer {Token}'

Last updated

Was this helpful?