# Get a Recording

In order to retrieve a recording metadata, you can use the following endpoint.

## Get recording

> Get recording

```json
{"openapi":"3.0.3","info":{"title":"Voice","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":{"Recording":{"type":"object","additionalProperties":false,"properties":{"id":{"$ref":"#/components/schemas/recordingId"},"source":{"$ref":"#/components/schemas/RecordingSource"},"sourceId":{"$ref":"#/components/schemas/sourceId"},"channelId":{"$ref":"#/components/schemas/channelId"},"status":{"$ref":"#/components/schemas/RecordingStatus"},"direction":{"$ref":"#/components/schemas/RecordingDirection"},"originator":{"$ref":"#/components/schemas/CallIdentifier"},"receiver":{"$ref":"#/components/schemas/CallIdentifier"},"origin":{"$ref":"#/components/schemas/RecordingOrigin"},"duration":{"type":"integer","format":"int64"},"stereo":{"type":"boolean"},"format":{"type":"string"},"transcription":{"type":"boolean"},"conferenceId":{"$ref":"#/components/schemas/conferenceId"},"url":{"type":"string"},"roomInfoUrl":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time"},"startedAt":{"type":"string","format":"date-time"}},"required":["id","source","sourceId","status","origin","stereo","format","transcription","createdAt","updatedAt"]},"recordingId":{"title":"Recording ID","description":"The ID for the recording.","type":"string","format":"uuid"},"RecordingSource":{"type":"string","enum":["call","conference"]},"sourceId":{"title":"Source ID","description":"The ID for the source.","type":"string","format":"uuid"},"channelId":{"title":"Channel ID","description":"The ID for the channel.","type":"string","format":"uuid"},"RecordingStatus":{"type":"string","enum":["accepted","completed","ongoing","paused","available","absent","failed"]},"RecordingDirection":{"type":"string","enum":["incoming","outgoing"]},"CallIdentifier":{"type":"object","title":"ChannelCallOriginatorOrReceiver","additionalProperties":false,"properties":{"contact":{"$ref":"#/components/schemas/Contact"},"number":{"$ref":"#/components/schemas/Number"}},"required":["number"]},"Contact":{"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":{"type":"string","enum":["pstn","webrtc"]},"number":{"type":"string"},"anonymous":{"type":"boolean"},"callerIdName":{"type":"string"},"identity":{"type":"string"},"countryIsoCode":{"type":"string"}},"required":["type","number"]},"RecordingOrigin":{"type":"string","enum":["call-command-record","call-command-record-call","create-call","bridge-call"]},"conferenceId":{"title":"Conference ID","description":"The ID for the conference.","type":"string","format":"uuid"},"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":5},"message":{"type":"string","minLength":5}}}},"responses":{"Error":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","minLength":5},"message":{"type":"string","minLength":5},"details":{"type":"object","additionalProperties":true}}}}}}}},"paths":{"/workspaces/{workspaceId}/recordings/{recordingId}":{"get":{"summary":"Get recording","description":"Get recording","operationId":"getRecording","tags":["voice-recordings"],"responses":{"200":{"description":"The recording metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recording"}}}},"307":{"description":"The recording file"},"404":{"$ref":"#/components/responses/Error"},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

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

```
curl "/workspaces/{workspaceId}/recordings/{recordingId}" \
     -H 'Authorization: AccessKey YOUR_SECRET_TOKEN'
```

{% endtab %}

{% tab title="Response" %}

```
{
  "id": "5b74ee9e-9d45-473a-82cd-f1f7feea6bbd",
  "sourceId": "50fa2203-66c2-4820-864a-1a8002952f4e",
  "channelId": "880d8171-cbab-47bb-81b6-b1a0902da136",
  "originator": {
    "number": {
      "type": "pstn",
      "number": "3197004499436",
      "identity": "+3197004499436",
      "countryIsoCode": "NL"
    }
  },
  "receiver": {
    "contact": {
      "id": "225dcb7c-efbd-4288-b78d-93fba8743dd0",
      "identifierKey": "phonenumber",
      "identifierValue": "+351919150029"
    },
    "number": {
      "type": "pstn",
      "number": "351919150029",
      "countryIsoCode": "PT"
    }
  },
  "source": "call",
  "direction": "outgoing",
  "origin": "create-call",
  "status": "available",
  "duration": 29,
  "format": "mp3",
  "stereo": false,
  "transcription": false,
  "url": "https://regional--voice-recordings--637323691990--euw1.s3.eu-west-1.amazonaws.com/workspaceID%3A8bc02f53-87ac-48d2-b4fd-c2cf856a305f/sourceID%3A50fa2203-66c2-4820-864a-1a8002952f4e/5b74ee9e-9d45-473a-82cd-f1f7feea6bbd.mp3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAZIY3TY7LBTBZCS45%2F20231024%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20231024T173426Z&X-Amz-Expires=600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEBwaCWV1LXdlc3QtMSJHMEUCIBch4MlGQu3ErdIzwknxkM0z23Clo79heSynPWNzU7jeAiEA%2F9fuYlS5yImmZ%2FN53KEmG2dEENZFbPfoNkrdPj%2BExHMq7QMIRRABGgw2MzczMjM2OTE5OTAiDCSO0vsLR5UJ%2BOYdrirKAzCu4U7saMI%2FVJDauiWwesWmbhSYCt1LdcULqH4AqrKk1I700LcFzBTQ1HPjfbLDyM169KlHgY%2Fdw51lvvRt7vqynvho2Vwk6CQoNYNk2%2FORr07phUNtKZgxi%2FbD5cgvRz2upRixYdqST7CoDdN1QsSEz43jS9ka5vGHKZV3OvBXmCKElk9QU5557xIppybAbcQ6sCXssfEkcKsLpKaiLN8nN%2FRGJ6kyWriih41NaoNRv6ykPiqpQJtAIvEtRx19iY98vj%2Bg06TMKuzBXp%2FcLXI3KlUpVTBZRYetCNC7Kf5lpg2amyK9FNW14OPc9hArFkG%2F%2Fah7bj0KJJaink3Lu1m2A61DhkiQeqnUeY5tGTgh4vdEZT20%2BiNwMWI7UGErcesbcqQJnCm3oTwbbalsOIDfiPcYt1dKvjW0FJeclFY935sAIJiARlcCud%2BcNf96LtUc%2Bp3cMI1jTzbXec4YK%2BXMjYUczTpQ%2F%2BvHEeNdJkv9af%2B3hwMineFvtcW3e3r7dfmFYD5moZh91Ykj2N35RQ7Vvyvnb%2B4tax43j%2BUpOjth9sMZHo3bjgGpkYVc1mBOGtrSrQPANyQXKCIIS6YIOvFegGCeCU5ntkFnMJLe3qkGOqUBJRIHI%2BL5lnQl6U0i1YtFD9GI8B9O6M%2FLfdOkZLG7FWX0cpCoQtDVCKxQya5tQclGr5DasMadT5CWRQQTxgiCkQNxZLV%2FsnUVxPuVW%2Bxw9%2BnPZ%2BKzkSJ3zacSVhby2AUeZCMc5AkboJX0a4%2FnJ5%2FhULZtruZF0cwGHl69nCLTT1OLrj3%2FarCgYkyaRZyjlaz4zNulyBGqy%2BPkDP8xVKRPEGotlBHf&X-Amz-SignedHeaders=host&x-id=GetObject&X-Amz-Signature=1fd89ce8b8efee07c416da2e1678009562829440229bae2e4dbf00bdc26a7c5d",
  "createdAt": "2023-10-23T15:55:08.234Z",
  "updatedAt": "2023-10-23T15:55:38.278Z",
  "startedAt": "2023-10-23T15:55:08.121Z",
  "endedAt": "2023-10-23T15:55:38.101Z"
}
```

{% endtab %}
{% endtabs %}

In order to directly retrieve the recording media, you must add the extension `.mp3` to the above request.

```
/workspaces/{workspaceId}/recordings/{recordingId}.mp3
```

If successful, the above request will return a "307 Temporary Redirect” with the recording file.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/api/voice-api/recordings-api/get-a-recording.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
