LogoLogo
No-code docsResources
  • 🖥️Welcome to the Bird API Docs
  • API Access
    • Access Policies
    • Access Roles
    • API Authorization
    • Common API usage
  • Conversations API
    • API reference
      • Channel configuration
        • Get conversations configuration
        • Update conversations configuration
      • Conversations messaging
        • Create conversation message
        • List conversation messages
        • Get conversation message
        • Update conversation message
        • Delete conversation message
        • Create pre-signed upload
      • Conversations management
        • Create conversation
        • List conversations
        • Get conversation
        • Update conversation
        • Delete conversation
      • Conversation Participants
        • Add participant to conversation
        • List participants
        • Get participant by ID
        • Get participant by identifier key and value
        • Update participant by ID
        • Update participant by identifier key and value
        • Delete participant
        • List participant conversations by ID
        • List participant conversations by identifier key and value
      • Workspace settings
        • Get antispam setting
        • Update antispam setting
        • Create allow/block rule
        • Get allow/block rule
        • List allow/block rules
        • Update allow/block rule
        • Delete allow/block rule
        • Add allow/block rules in bulk
        • Get allow/block bulk upload status
      • Events
  • Collaborations API
    • API reference
      • Agent Management
      • Team Management
      • Feeds
      • Feed item activity
      • Tags
      • Automation Rules
      • Business Hours
      • Capacity Rules
      • Routing Queues
      • Skills
      • SLA Policies
      • Macros
      • Sender Profiles
      • Ticket fields
  • Channels API
    • Supported channels
      • Programmable WhatsApp
        • Sending WhatsApp messages
        • Customer service window
        • Receiving messages
        • Message interactions
        • WhatsApp ISV integration
          • Setting up your customer workspaces
            • API Access
            • Associating your Facebook solution ID and business ID with your Bird CRM Organization
            • Creating a workspace for your customer
            • Buying a number through Bird
            • Subscribing to channel created webhooks
          • WhatsApp channel onboarding
            • Setting up the WhatsApp Embedded flow
            • Install WhatsApp phone number in Bird CRM
            • Subscribe to channel webhooks
      • Programmable SMS
        • Installing an SMS channel
          • US 10DLC API Installation
          • Toll-Free Numbers Verification API
        • Sending SMS messages
        • Receiving messages
        • Twilio Exit API
          • Using Twilio PHP SDK
          • Using Twilio Go SDK
          • Using Twilio Ruby SDK
        • Sinch Exit API
      • Programmable RCS
        • Sending messages
        • Receiving messages
        • Message interactions
      • Programmable Email
        • Sending Emails
        • Receiving messages
        • Message status
        • Message interactions
      • Programmable Line
        • Sending messages
        • Receiving messages
        • Message interactions
      • Programmable Telegram
        • Sending messages
        • Receiving messages
        • Message interactions
    • Message types
      • Text
      • Images
      • Files
      • List
      • Carousel
      • Template
    • Message status and interactions
      • Message Failure Codes
      • Message Failure Sources
        • SMS Platform Extended Error Codes
    • Send batch messages
    • API reference
      • Channel Groups
      • Messaging
      • Channels management
      • Channel connectors
      • Navigators
      • Compliance Keywords Messages
      • Conversions Sharing
      • Events
    • Rate Limit
  • Voice API
    • Installing a Voice channel
    • Voice Calls API
      • Initiate an outbound call
      • List calls from a channel
      • Get a call
      • Update a call
      • Answer a call
      • Ring a call
      • Hangup a call
      • Play a message in a call
      • Say Text-To-Speech (TTS)
      • Gather DTMF from a call
      • Forward a call
      • Record a Call
      • Record a call session
      • Update a call recording
      • List call recordings of a call
      • Get a call recording
      • Get a call insights
      • Get calls log
    • Recordings API
      • List Recordings
      • Get a Recording
      • Delete a Recording
      • List recording storage metrics
    • Transcriptions API
      • Initiate a Transcription
      • List Transcriptions
      • Get a Transcription
      • Delete a Transcription
    • Voice webhooks
    • Flash Calling API
  • Verify API
    • Verify API: Quick Start
  • Contacts API
    • Tracking Contact Events
      • API Reference
        • Get configuration
        • Track events
    • API reference
      • Manage workspace contacts
        • Create a contact
        • Get a contact
        • List contacts
        • Search contact by identifier
        • Update a contact
        • Create or update a contact by identifier
        • Delete a contact
      • Manage contact identifiers
        • Create contact identifier
        • List contact identifiers
        • Delete contact identifier
      • Manage contact attribute definition
        • Create attribute definition
        • Get attribute definition
        • List attribute definitions
      • Manage contact lists
        • Create a list
        • Get a list
        • List lists
        • Update a list
        • Delete a list
        • Add contacts to a list
        • Get contact list memberships
        • List contacts in a list
        • Remove contacts from a list
      • Lookup
        • Network/Country information for a phone number
  • Numbers API
    • API reference
      • Search Available Numbers
      • Buy a Number
      • List your Numbers
      • Get Long Code Number Details
      • Manage Endpoint Subscriptions
        • Cancel Number Subscription
      • Manage Endpoint Compliance Requirements
        • List Workspace compliace Requirements
        • Get Workspace Compliace Requirements
        • Update Workspace Compliace Requirements
      • 10DLC Compliance
        • Brands - Organization
          • Create a brand
          • List all brands
          • Get a brand
          • Update a brand
          • Delete a brand
          • Create a brand vetting
        • Brands - workspace
          • Create a brand
          • List all brands
          • Get a brand
          • Update a brand
          • Delete a brand
          • Create a brand vetting
          • List brand vettings
        • Campaigns
          • Optional: acting as Reseller
          • Create a campaign
          • List all campaigns
          • Get a campaign
          • Update a campaign
          • Delete a campaign
        • TCR Enums
        • Events
      • Toll-Free Numbers Verification API
      • Long Code Numbers
      • Short Code Numbers
      • Alphanumeric Senders
      • Events
  • Know-Your-Customer (KYC) API
    • List KYC forms
    • Get KYC form
    • Create KYC form entry
    • Update KYC form entry
    • List KYC form entries
    • Get a KYC form entry details
  • Reporting API
    • API reference
      • Channel Metrics
      • Flow Run Metrics
      • Wallet Metrics
      • Campaign Metrics
      • Message Metrics
  • Accounts API
    • API reference
      • Current user
        • Change password
        • Presigned upload
        • Memberships
        • Sessions
        • Configurations
          • Groups
            • Keys
      • IAM policies
      • Organizations
        • Upload media
        • Profile
        • Workspaces
        • Users
        • Access keys
        • Organization roles
        • Organization policies
        • Teams
          • Members
        • Approvals
          • Runs
            • Reviews
        • Configurations
          • Groups
            • Keys
      • Region groups
  • Touchpoints API
    • Supported Projects
      • Whatsapp Approved Message Templates
        • Creating WhatsApp Message templates
          • Text template blocks
          • Blocks Documentation
    • API reference
      • Projects
      • Message Templates
  • Notifications API
    • API Reference
      • Webhook subscriptions
        • Create a webhook subscription
        • List available webhook events
        • Get a webhook subscription
        • List webhook subscriptions
        • Update a webhook subscription
        • Delete a webhook subscription
        • Verifying a webhook subscription
        • Webhook subscription logs
  • Knowledge Base (KB) API
    • API reference
      • Documents
      • Folders
        • Import
      • Search
      • Presigned upload
  • Email API
    • Transmissions
  • Connectivity platform migration guide
    • Channels API and Conversations API
    • Migrating conversations API actions
    • Migrating WhatsApp channels
  • Client SDKs
    • Applications
    • Contact Profiles
      • Signed Identity
    • Push notifications
      • Quick Start
      • Subscribe contacts to push notification campaigns
      • Notification Display Priority
    • Event Tracking
      • Quick Start
      • Track Events
        • App
        • Audiences
        • Conference
        • Ecommerce
        • Hospitality
        • Lists
        • Messaging
        • Payments
        • Subscription
        • Suppressions
        • Survey
        • Web
    • App Inbox
      • Quick Start
      • Usage
      • Subscribe contacts to app inbox campaigns
    • SDK Integration
      • Android SDK
        • Notification Interactions
      • Swift SDK
        • Notification Interactions
      • Web SDK
        • Quick Start
        • Usage
        • API Reference
          • IdentityManager
          • BirdSdkApi
          • BirdTracker
            • Ecommerce
            • Conference
            • Messaging
            • Suppressions
            • Subscription
            • Survey
            • Web
            • Audiences
        • Web Push Notifications
          • Notification Interactions
  • Quickstarts
    • Conversations
    • Send an SMS message
    • Send an Email message
    • Send a WhatsApp message
Powered by GitBook
On this page

Was this helpful?

  1. Voice API
  2. Voice Calls API

Initiate an outbound call

Last updated 3 months ago

Was this helpful?

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

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}'
{
  "to": "+351000000000",
    "callFlow": [
    {
      "command": "playback",
      "options": {
         "media": [
             "https://www.media.com.com/audio/code1.wav",
             "https://www.media.com.com/audio/code2.wav",
             "https://www.media.com.com/audio/code3.wav",
             "https://www.media.com.com/audio/code4.wav",
          ],
          "pauseMilliseconds": 100
      }
    },
    {
      "command": "hangup"
    }
  ]
}
HTTP/1.1 202 Accepted
Content-Type: application/json; charset=UTF-8
Content-Length: 1041
Connection: close
Date: Thu, 29 Feb 2024 11:44:07 GMT
Messagebird-Request-Id: dfdc5b69-518f-4033-845b-cfd952ac1542
Vary: Origin
X-Cache: Miss from cloudfront
Via: 1.1 1d956df7e4e25ae74372a8b2c4cdb82e.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: FCO50-P1
Alt-Svc: h3=":443"; ma=86400
X-Amz-Cf-Id: 5q_MM0W4I4L4O1R4pwlJuNMd8IplyIR1_EiO-kpk0yiuxh9TRBVvPA==
X-XSS-Protection: 1; mode=block
X-Frame-Options: DENY
Referrer-Policy: no-referrer
Content-Security-Policy: default-src 'self'; style-src 'self'; script-src 'self'; img-src 'self' data:; font-src 'self' data:; connect-src 'self'; object-src 'none'; media-src 'self'; frame-src 'self'; worker-src 'self' blob:; manifest-src 'self'; base-uri 'self'; form-action 'self'; frame-ancestors 'self';
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Vary: Origin

{"id":"1e5e9219-2da2-4aa2-bf0f-8cc34775e6c0","channelId":"1499d657-31af-4ba0-b731-7eab3fb764be","originator":{"number":{"type":"pstn","number":"+3197058016631","countryIsoCode":"NL"}},"receiver":{"contact":{"id":"1fddcbcd-3ece-42da-82e1-ef48a8536b92","identifierKey":"phonenumber","identifierValue":"+351910648517"},"number":{"type":"pstn","number":"+351910648517","countryIsoCode":"PT"}},"from":"+3197058016631","to":"+351910648517","direction":"outgoing","status":"accepted","type":"pstn","duration":0,"callFlow":{"id":"004a540b-897b-494c-a176-d7aec51d0257","commands":[{"id":"a28a931e-191c-4f2e-afcb-fa940f8e3a8a","callId":"1e5e9219-2da2-4aa2-bf0f-8cc34775e6c0","command":"playback","status":"accepted","callFlowId":"004a540b-897b-494c-a176-d7aec51d0257"},{"id":"d6022794-1c8e-44ab-8a9b-4e2deb2bf3e7","callId":"1e5e9219-2da2-4aa2-bf0f-8cc34775e6c0","command":"hangup","status":"accepted","callFlowId":"004a540b-897b-494c-a176-d7aec51d0257"}]},"notification":{},"createdAt":"2024-02-29T11:44:07.74Z","updatedAt":"2024-02-29T11:44:07.74Z"}

Example 2: Initiate an outbound call with TTS

curl -X POST "https://api.bird.com/workspaces/:workspaceId/channels/:channelId/calls \
     -H 'Authorization: Bearer {Token}'
{
  "to": "+351000000000",
  "callFlow": [
    {
      "command": "say",
      "options": {
        "locale": "en-US",
        "text": "Your TTS message here",
        "voice": "female"
      }
    },
    {
      "command": "hangup"
    }
  ]
}
HTTP/1.1 202 Accepted
Content-Type: application/json; charset=UTF-8
Content-Length: 1041
Connection: close
Date: Thu, 29 Feb 2024 11:44:07 GMT
Messagebird-Request-Id: dfdc5b69-518f-4033-845b-cfd952ac1542
Vary: Origin
X-Cache: Miss from cloudfront
Via: 1.1 1d956df7e4e25ae74372a8b2c4cdb82e.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: FCO50-P1
Alt-Svc: h3=":443"; ma=86400
X-Amz-Cf-Id: 5q_MM0W4I4L4O1R4pwlJuNMd8IplyIR1_EiO-kpk0yiuxh9TRBVvPA==
X-XSS-Protection: 1; mode=block
X-Frame-Options: DENY
Referrer-Policy: no-referrer
Content-Security-Policy: default-src 'self'; style-src 'self'; script-src 'self'; img-src 'self' data:; font-src 'self' data:; connect-src 'self'; object-src 'none'; media-src 'self'; frame-src 'self'; worker-src 'self' blob:; manifest-src 'self'; base-uri 'self'; form-action 'self'; frame-ancestors 'self';
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Vary: Origin

{"id":"1e5e9219-2da2-4aa2-bf0f-8cc34775e6c0","channelId":"1499d657-31af-4ba0-b731-7eab3fb764be","originator":{"number":{"type":"pstn","number":"+3197058016631","countryIsoCode":"NL"}},"receiver":{"contact":{"id":"1fddcbcd-3ece-42da-82e1-ef48a8536b92","identifierKey":"phonenumber","identifierValue":"+351910648517"},"number":{"type":"pstn","number":"+351910648517","countryIsoCode":"PT"}},"from":"+3197058016631","to":"+351910648517","direction":"outgoing","status":"accepted","type":"pstn","duration":0,"callFlow":{"id":"004a540b-897b-494c-a176-d7aec51d0257","commands":[{"id":"a28a931e-191c-4f2e-afcb-fa940f8e3a8a","callId":"1e5e9219-2da2-4aa2-bf0f-8cc34775e6c0","command":"playback","status":"accepted","callFlowId":"004a540b-897b-494c-a176-d7aec51d0257"},{"id":"d6022794-1c8e-44ab-8a9b-4e2deb2bf3e7","callId":"1e5e9219-2da2-4aa2-bf0f-8cc34775e6c0","command":"hangup","status":"accepted","callFlowId":"004a540b-897b-494c-a176-d7aec51d0257"}]},"notification":{},"createdAt":"2024-02-29T11:44:07.74Z","updatedAt":"2024-02-29T11:44:07.74Z"}

  • Call flow command initiate an outbound call
  • POSTCreate call
  • Example 1: Initiate an outbound call, play an announcement and hangup
  • Example 2: Initiate an outbound call with TTS

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
400
The request did not pass validation
application/json
404
The request did not pass validation
application/json
422
The request did not pass validation
application/json
post
POST /workspaces/{workspaceId}/channels/{channelId}/calls HTTP/1.1
Host: 
Authorization: Bearer jwt
Content-Type: application/json
Accept: */*
Content-Length: 558

{
  "from": "text",
  "to": "text",
  "ringTimeout": 1,
  "maxDuration": 1,
  "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-05-08T22:44:32.995Z",
  "notification": {
    "url": "text"
  },
  "amdSettings": {
    "enabled": true,
    "wordCount": 1,
    "speechTimeout": 1,
    "speechLocale": "en-US",
    "beepTimeout": 1,
    "ifMachineNotifyAfter": "beep"
  },
  "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-05-08T22:44:32.995Z",
  "updatedAt": "2025-05-08T22:44:32.995Z",
  "ringingAt": "2025-05-08T22:44:32.995Z",
  "answeredAt": "2025-05-08T22:44:32.995Z",
  "endedAt": "2025-05-08T22:44:32.995Z",
  "scheduledFor": "2025-05-08T22:44:32.995Z",
  "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"
  ]
}