Update a call

Update an active call resource. You can use this request to do additional actions:

  • It can also be used to update the callFlow of the call. Commands of the new callFlow will be executed after the Patch.

CallFlowCommand

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:
  - answer
  - hangup
  - playback
  - say
  - gather
  - record
  - bridge
  - pause
  - ringing

Update call

patch

Update a call

Authorizations
Path parameters
workspaceIdstring · uuidRequired

The ID of the workspace

callIdstring · uuidRequired

The ID for a call

channelIdstring · uuidRequired

The ID for a channel

Body
statusstring · enum | nullableOptionalPossible values:
Responses
202
Call update accepted
application/json
patch
PATCH /workspaces/{workspaceId}/channels/{channelId}/calls/{callId} HTTP/1.1
Host: api.bird.com
Authorization: AccessKey YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 135

{
  "status": "completed",
  "callFlow": [
    {
      "command": "answer",
      "options": {},
      "conditions": [
        {
          "variable": "keys",
          "operator": "eq",
          "value": "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-08-05T00:12:58.901Z",
  "updatedAt": "2025-08-05T00:12:58.901Z",
  "ringingAt": "2025-08-05T00:12:58.901Z",
  "answeredAt": "2025-08-05T00:12:58.901Z",
  "endedAt": "2025-08-05T00:12:58.901Z",
  "scheduledFor": "2025-08-05T00:12:58.901Z",
  "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: Update a call by answering

curl -X PATCH "https://api.bird.com/workspaces/{workspaceId}/channels/{channelId}/calls/{channelId}" \
     -H "Authorization: AccessKey YOUR_SECRET_TOKEN"

Example 2: Update a call by sending ringing, pause for 2 seconds, answer and play an announcement

curl -X PATCH "https://api.bird.com/workspaces/{workspaceId}/channels/{channelId}/calls/{channelId}" \
     -H "Authorization: AccessKey YOUR_SECRET_TOKEN"

Last updated

Was this helpful?