> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Call Recording v2

[Back to API List](https://koreai.mintlify.site/ai-for-service/apis/contact-center/api-list)

This API facilitates the downloading of voice call recordings. The API provides an S3-hosted URL where the recording can be accessed.

!!! NOTE

The earlier version of the [Call Recording API](https://koreai.mintlify.site/ai-for-service/apis/contact-center/fetch-call-recording) is expected to be deprecated in the future. We will ensure existing customers receive sufficient advance notice. However, we recommend that new customers utilize v2 moving forward.

| Method | GET |
| :- | :- |
| **Endpoint** | `https://{{host}}/api/public/bot/{{botId}}/v2/recordings?sessionId={{sessionId}}` |
| **Content Type** | `application/json` |
| **Authorization** | `auth: {{JWT}}` See [How to generate the JWT Token](https://koreai.mintlify.site/ai-for-service/apis/automation/api-introduction.md#generating-the-jwt-token). |
| **API Scope** | SmartAssist Recordings |

## Path Parameters

| Parameter | Description | Type |
| :- | :- | :- |
| `host` | Environment URL, for example, `https://platform.kore.ai` | string, required |
| `botId` | botId or streamId. You can get it from the App Settings page. | string, required |

## Query Parameters

| Parameter | Description | Type |
| :- | :- | :- |
| userId | The ID of the user whose conversation history will be accessed. It can be a user email ID or an enterprise-assigned unique ID. You can access it from the conversation logs. | string, required |
| sessionId | The unique identifier for the session record. You can access it from the conversation logs. | string, required |

## Sample Request

```bash theme={null}
curl --location 'https://{{host}}/api/public/bot/{{botId}}/v2/recordings?sessionId={{sessionId}}' \
--header 'auth: {{JWT_TOKEN}}' \
--header 'Content-Type: application/json'
```

## Sample Response

```json theme={null}
{
   "status": "success",
   "recording": [
       {
           "fileName": "22d8ca62d5c430a03a8d06999289xxxx-merged.wav",
           "fileUrl": "https://smartassist.kore.ai/api/getMediaStream/smartassistrecording/UAT/o-ddda92ea-9174-5c0d-8938-4b5f13abxxxx/st-fd81a2b1-43af-544d-8082-831bc09cxxxx/2024/05-03-2024/f-4a76076d-56f1-5b99-999f-5c760568xxxx.wav?e=1709706278&n=6398115875&s=InpqMWpnVzRkajFlc1RZeGVzaDBHM2pwWFFibzVwcEloTkkrSW5UbTZ0ek09xxxx"
       }
   ]
}
```

## Recording Statuses

| status | Description |
| - | - |
| `success` | The URL is generated successfully. |
| `media_unavailable` | The recording isn't available on the server. |
| `call_in_progress` | A call is currently ongoing. |
| `media_in_progress` | The phase after the call ends but before the media generation begins. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.