# Forward a call

Forward a call to another phone number or to a SIP URI. This command will create a new call resource and both calls will be connected (bridged).

## Forward call

> Creates a new channel call and forward to it

```json
{"openapi":"3.0.3","info":{"title":"Channels","version":"v1"},"tags":[],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"schemas":{"BridgeCall":{"type":"object","title":"Bridge new call with existing call","additionalProperties":false,"properties":{"from":{"type":"string"},"to":{"type":"string"},"ringTimeout":{"type":"integer","minimum":3,"maximum":120,"default":30},"maxDuration":{"type":"integer","minimum":1,"default":28800},"ringTone":{"$ref":"#/components/schemas/RingTone"},"hangupAfterBridge":{"type":"boolean"},"record":{"type":"boolean"},"recordStart":{"type":"string","enum":["record-from-answer","record-from-ringing"]},"recordStereo":{"type":"boolean"},"callFlow":{"type":"array","items":{"$ref":"#/components/schemas/CallFlowCommandBridgeCall"},"maxItems":20},"notification":{"$ref":"#/components/schemas/Notification-2"},"amdSettings":{"$ref":"#/components/schemas/AmdSettings"}},"required":["to"]},"RingTone":{"type":"string","nullable":true,"enum":["be","ca","cn","cy","cz","de","dk","dz","eg","fi","fr","hk","hu","il","in","jp","ko","pk","pl","ro","rs","ru","sa","tr","uk","us"]},"CallFlowCommandBridgeCall":{"type":"object","title":"CallFlowCommand","additionalProperties":false,"properties":{"command":{"$ref":"#/components/schemas/CallFlowCommandEnumBridgeCall"},"conditions":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/CallFlowCommandCondition"}},"options":{"type":"object","nullable":true,"oneOf":[{"if":{"properties":{"command":{"const":"playback"}}},"$ref":"#/components/schemas/Play"},{"if":null,"properties":{"command":{"const":"say"}},"$ref":"#/components/schemas/Say"},{"if":null,"properties":{"command":{"const":"gather"}},"$ref":"#/components/schemas/Gather"},{"if":null,"properties":{"command":{"const":"hangup"}},"$ref":"#/components/schemas/Hangup"},{"if":null,"properties":{"command":{"const":"pause"}},"$ref":"#/components/schemas/Pause"}]}}},"CallFlowCommandEnumBridgeCall":{"type":"string","enum":["hangup","playback","say","gather","pause"]},"CallFlowCommandCondition":{"type":"object","title":"Conditions for command","additionalProperties":false,"properties":{"variable":{"type":"string","enum":["keys","speech"]},"operator":{"type":"string","enum":["eq","ne","==","!=","contains"]},"value":{"type":"string"}}},"Play":{"type":"object","title":"Playback sound to Call","additionalProperties":false,"properties":{"media":{"type":"array","items":{"type":"string"},"maxItems":80,"nullable":true},"loop":{"type":"integer"},"timeout":{"type":"integer"},"pauseMilliseconds":{"type":"integer","minimum":0,"maximum":30000}},"required":["media"]},"Say":{"type":"object","title":"Say text to Call","additionalProperties":false,"properties":{"text":{"type":"string"},"locale":{"type":"string","format":"locale-bcp47","default":"en-US","enum":["arb","ar-AE","bg-BG","bn-IN","ca-ES","cs-CZ","cy-GB","cmn-CN","da-DK","de-CH","de-DE","de-AT","el-GR","en-AU","en-GB","en-IN","en-NZ","en-ZA","en-US","en-GB-WLS","es-ES","es-MX","es-US","eu-ES","fi-FI","fil-PH","fr-FR","fr-BE","fr-CA","gl-ES","gu-IN","he-IL","hi-IN","hu-HU","id-ID","is-IS","it-IT","ja-JP","ko-KR","lt-LT","lv-LV","ms-MY","nl-BE","nl-NL","nb-NO","pa-IN","pl-PL","pt-BR","pt-PT","ro-RO","ru-RU","sk-SK","sr-RS","sv-SE","ta-IN","te-IN","tr-TR","th-TH","uk-UA","vi-VN","yue-CN"]},"voice":{"type":"string"},"loop":{"type":"integer"},"timeout":{"type":"integer"}},"required":["text"]},"Gather":{"type":"object","title":"Gather dtmfs from call","additionalProperties":false,"properties":{"maxNumKeys":{"type":"integer"},"endKey":{"$ref":"#/components/schemas/Key"},"timeout":{"type":"integer"},"retries":{"type":"integer"},"input":{"type":"string","enum":["dtmf","speech","dtmf speech"]},"speechLocale":{"type":"string","format":"locale-bcp47","default":"en-US","enum":["de-DE","en-AU","en-GB","en-US","es-US","it-IT","ja-JP","ko-KR","pt-BR","th-TH","zh-CN"]},"playback":{"$ref":"#/components/schemas/Play"},"say":{"$ref":"#/components/schemas/Say"}}},"Key":{"type":"string","enum":["0","1","2","3","4","5","6","7","8","9","*","#"]},"Hangup":{"type":"object","title":"HangupCalls","additionalProperties":false,"properties":{"cause":{"type":"string","enum":["rejected","busy"]}}},"Pause":{"type":"object","title":"PauseCall","additionalProperties":false,"properties":{"pauseSeconds":{"type":"integer","minimum":0,"maximum":30}}},"Notification-2":{"type":"object","title":"CallNotification","additionalProperties":false,"properties":{"url":{"type":"string"}}},"AmdSettings":{"type":"object","title":"AmdSettings","additionalProperties":false,"properties":{"enabled":{"type":"boolean","default":false},"wordCount":{"type":"number","default":5},"speechTimeout":{"type":"number","default":3,"maximum":10},"speechLocale":{"type":"string","format":"locale-bcp47","default":"en-US","enum":["de-DE","en-AU","en-GB","en-US","es-US","it-IT","ja-JP","ko-KR","pt-BR","th-TH","zh-CN"]},"beepTimeout":{"type":"number","default":30},"ifMachineNotifyAfter":{"type":"string","enum":["beep","wordCount"],"default":"wordCount"}},"required":["enabled","wordCount","speechTimeout","speechLocale","ifMachineNotifyAfter"]},"CallCommandBridgeResponse":{"type":"object","title":"ChannelCallCommandBridge","additionalProperties":false,"properties":{"command":{"$ref":"#/components/schemas/CallCommandResponse"},"bridgedCall":{"$ref":"#/components/schemas/Call"}}},"CallCommandResponse":{"type":"object","title":"CallCommandResponse","additionalProperties":false,"properties":{"id":{"$ref":"#/components/schemas/Id-2"},"callId":{"$ref":"#/components/schemas/Id-2"},"callFlowId":{"nullable":true,"$ref":"#/components/schemas/Id-2"},"status":{"type":"string"},"command":{"type":"string"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/CallFlowCommandCondition"}}}},"Id-2":{"type":"string","format":"uuid"},"Call":{"type":"object","title":"ChannelCall","additionalProperties":false,"properties":{"id":{"$ref":"#/components/schemas/Id-2"},"channelId":{"$ref":"#/components/schemas/ChannelId"},"from":{"type":"string"},"to":{"type":"string"},"originator":{"$ref":"#/components/schemas/CallIdentifier"},"receiver":{"$ref":"#/components/schemas/CallIdentifier"},"parentId":{"$ref":"#/components/schemas/Id-2"},"direction":{"$ref":"#/components/schemas/Direction"},"status":{"$ref":"#/components/schemas/Status-4"},"reason":{"type":"string"},"type":{"$ref":"#/components/schemas/Type-2"},"duration":{"type":"integer"},"hangupCauseCode":{"type":"integer"},"hangupSource":{"$ref":"#/components/schemas/HangupSource"},"hangupSipCode":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"ringingAt":{"type":"string","format":"date-time"},"answeredAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time"},"scheduledFor":{"type":"string","format":"date-time"},"callFlow":{"$ref":"#/components/schemas/CallFlow"},"notification":{"$ref":"#/components/schemas/Notification-2"},"qualityInsights":{"$ref":"#/components/schemas/CallQualityInsights"},"sipInsights":{"$ref":"#/components/schemas/CallSipInsights"},"amdResult":{"$ref":"#/components/schemas/AmdResult"},"sipType":{"$ref":"#/components/schemas/SIPType"},"tags":{"$ref":"#/components/schemas/Tags-2"}},"required":["id","channelId","from","to","originator","receiver","status","type","direction","createdAt","updatedAt"]},"ChannelId":{"type":"string","format":"uuid"},"CallIdentifier":{"type":"object","title":"ChannelCallOriginatorOrReceiver","additionalProperties":false,"properties":{"contact":{"$ref":"#/components/schemas/Contact-3"},"number":{"$ref":"#/components/schemas/Number"}},"required":["number"]},"Contact-3":{"type":"object","title":"Contact","additionalProperties":false,"properties":{"id":{"type":"string"},"identifierKey":{"type":"string"},"identifierValue":{"type":"string"}},"required":["id","identifierKey","identifierValue"]},"Number":{"type":"object","title":"number","additionalProperties":false,"properties":{"type":{"$ref":"#/components/schemas/Type-2"},"number":{"type":"string"},"anonymous":{"type":"boolean"},"callerIdName":{"type":"string"},"identity":{"type":"string"},"countryIsoCode":{"type":"string"},"pstnNumberType":{"type":"string"}},"required":["type","number"]},"Type-2":{"type":"string","enum":["pstn","sip","webrtc"]},"Direction":{"type":"string","enum":["incoming","outgoing"]},"Status-4":{"type":"string","enum":["accepted","starting","ringing","ongoing","completed","no-answer","busy","failed","cancelled","scheduled"]},"HangupSource":{"type":"string","nullable":true,"enum":["callee","caller","api","timeout","media-timeout","none"]},"CallFlow":{"type":"object","title":"CallFlow","additionalProperties":false,"nullable":true,"properties":{"id":{"$ref":"#/components/schemas/Id-2"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/CallCommandResponse"}}}},"CallQualityInsights":{"type":"object","title":"qualityInsights","additionalProperties":false,"properties":{"mos":{"type":"string"},"pdd":{"type":"string"}}},"CallSipInsights":{"type":"object","title":"signallingInsights","additionalProperties":false,"properties":{"hangupSipCode":{"type":"string"},"edgeRegion":{"type":"string"},"providerName":{"type":"string"},"userAgent":{"type":"string"},"remoteSignallingIp":{"type":"string"},"remoteMediaIp":{"type":"string"}}},"AmdResult":{"type":"object","title":"AmdResult","additionalProperties":false,"properties":{"result":{"type":"string","enum":["human","machine","noSpeech","beep","unknown"]},"speech":{"type":"string"},"locale":{"type":"string"}}},"SIPType":{"type":"string","enum":["elastic","byoc","forward"]},"Tags-2":{"type":"array","description":"Tags to associate with the call. Tags are converted to lower case and tags\nthat do not exist are automatically created. You can view your created tags\nin the UI. You can specify up to 10 tags per call.\n","maxItems":10,"items":{"$ref":"#/components/schemas/Name-3"}},"Name-3":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]+$","minLength":1,"maxLength":50,"description":"Tag name. Must be between 1 and 50 characters and must only contain\nalphanumeric characters, hyphens, underscores, and spaces.\n"},"RequestError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"}},"required":["code","message"]},"ValidationError":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n"},"message":{"type":"string","description":"A human-readable message that describes the error. An example is 'The requested resource does not exist: channel not found'.\n"},"details":{"type":"object","description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.\n","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["code","message"]}},"responses":{"requestError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"validationError":{"description":"The request did not pass validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}}}},"paths":{"/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/bridge":{"post":{"summary":"Forward call","operationId":"bridgeChannelCall","description":"Creates a new channel call and forward to it","tags":["channel_call"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeCall"}}}},"responses":{"202":{"description":"Call Command Bridge was accepted for processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallCommandBridgeResponse"}}}},"400":{"$ref":"#/components/responses/requestError"},"404":{"$ref":"#/components/responses/requestError"},"422":{"$ref":"#/components/responses/validationError"}}}}}}
```

### Example 1: Forward an inbound call to an external number

{% tabs %}
{% tab title="Request Headers" %}

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

{% endtab %}

{% tab title="Request Body" %}

```
{​
  "from": "string",​
  "to": "string",​
  "ringTimeout": 30,​
  "maxDuration": 28800,​
  "record": true,​
  "recordStart": "record-from-answer",​
  "recordStereo": true​
​}
```

{% endtab %}

{% tab title="Response" %}

```
{
  "command": {
    "id": "5982f9a9-759f-48fb-b335-d3ab879f43b5",
    "callId": "ea765a11-8cbb-45ac-80d8-f82b931af964",
    "command": "bridge",
    "status": "accepted"
  },
  "bridgedCall": {
    "id": "e76ab303-f303-49c7-9cc9-64603b3d6a49",
    "channelId": "db53c357-92e3-4f3d-babe-159573940a50",
    "originator": {
      "number": {
        "type": "pstn",
        "number": "+3197058016589",
        "countryIsoCode": "NL"
      }
    },
    "receiver": {
      "contact": {
        "id": "77571b0f-9b6e-4b5a-a54c-31067e72f989",
        "identifierKey": "phonenumber",
        "identifierValue": "+351910648517"
      },
      "number": {
        "type": "pstn",
        "number": "+351910648517",
        "countryIsoCode": "PT"
      }
    },
    "from": "+3197058016589",
    "to": "+351910648517",
    "parentId": "ea765a11-8cbb-45ac-80d8-f82b931af964",
    "direction": "outgoing",
    "status": "accepted",
    "type": "pstn",
    "duration": 0,
    "notification": {},
    "createdAt": "2024-03-04T11:19:25.852Z",
    "updatedAt": "2024-03-04T11:19:25.852Z"
  }
}
```

{% endtab %}
{% endtabs %}
