> For the complete documentation index, see [llms.txt](https://docs.bird.com/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bird.com/api/voice-api/voice-calls-api/record-a-call-session.md).

# Record a call session

Records the call session. If a call is bridged, both audio streams are recorded.

## Record call session

> Record a channel call session

```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","scheme":"AccessKey","type":"http"}},"schemas":{"RecordCall":{"type":"object","title":"Record Call","additionalProperties":false,"properties":{"maxLength":{"type":"integer"},"stereo":{"type":"boolean"}}},"CallCommandRecordResponse":{"type":"object","title":"ChannelCallCommandRecord","additionalProperties":false,"properties":{"command":{"$ref":"#/components/schemas/CallCommandResponse"},"recordingId":{"type":"string","format":"uuid"}}},"CallCommandResponse":{"type":"object","title":"CallCommandResponse","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"callId":{"type":"string","format":"uuid"},"callFlowId":{"nullable":true,"type":"string","format":"uuid"},"status":{"type":"string"},"command":{"type":"string"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/CallFlowCommandCondition"}}}},"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"}}},"error.detailed":{"additionalProperties":false,"description":"An error returned from the API that includes additional details about the error. The `details` property can contain any additional information about the error that may be helpful for debugging or understanding the error.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":true,"description":"Any additional information about the error that may be helpful for debugging or understanding the error.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"DetailedError","type":"object"},"error.validation":{"additionalProperties":false,"description":"A validation error returned from the API. The `details` map keys are JSON paths\npointing into the request body / parameters; values are arrays of human-readable\nmessages describing each problem with that path.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"Per-field validation messages keyed by JSON path.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"ValidationError","type":"object"}},"responses":{"requestError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"An error"},"validationError":{"$ref":"#/components/responses/error.response.invalid_request"},"error.response.invalid_request":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.validation"}}},"description":"The request contains invalid parameters or body fields."}}},"paths":{"/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/recordings":{"post":{"summary":"Record call session","operationId":"recordCallChannelCall","description":"Record a channel call session","tags":["channel_call_command"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordCall"}}}},"responses":{"202":{"description":"Call Command RecordCall was accepted for processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallCommandRecordResponse"}}}},"400":{"$ref":"#/components/responses/requestError"},"404":{"$ref":"#/components/responses/requestError"},"422":{"$ref":"#/components/responses/validationError"}}}}}}
```

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

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

{% endtab %}

{% tab title="Request Body" %}

```
{
  "maxLength": 0,
  "stereo": true
}
```

{% endtab %}

{% tab title="Response" %}

```
{
  "command": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "callId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "callFlowId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "status": "string",
    "command": "string"
  },
  "recordingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```

{% endtab %}
{% endtabs %}
