# Get the admin live chat link

`GET https://api.chat-data.com/api/v2/get-admin-live-chat-link/{conversationId}`

Canonical: https://www.chat-data.com/api-reference/get-admin-live-chat-link

## Authentication

Send an API key as a Bearer token: `Authorization: Bearer $CHAT_DATA_API_KEY`. Workspace keys reach every chatbot in the workspace; chatbot-scoped keys reach only their chatbot. Keep keys on the server.

## Description

Generate an admin live chat portal link for a specific conversation. This endpoint allows authorized users to access the admin interface for managing live chat conversations.

Requirements:
- Your plan must include live chat.
- Live chat must be enabled in the chatbot's settings.

Both `conversationId` (path parameter) and `chatbotId` (query parameter) are required.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| conversationId | path | string | yes | The UUID of the conversation. |
| chatbotId | query | string | yes | The unique identifier of the chatbot. |

## Example request

```bash
curl 'https://api.chat-data.com/api/v2/get-admin-live-chat-link/3f2b8c1e-9a4d-4e7b-8c2a-5d1e6f7a8b9c?chatbotId=6650f1c2a9e4b83d2c7a1f05' \
  -H "Authorization: Bearer $CHAT_DATA_API_KEY"
```

## Example response (200)

```json
{
  "status": "success",
  "portalLink": "https://chat.example.com/chat-portal/admin/KfEoaT8Emf7tzKBm39l2ucHN1BHmyfy9F80A39HNLMeP-TisvnerMwFRzj3Xq9kwQXQTRrsGBKFfegZkb9ftNQFf9SgVXW1_P26QcfRNqVNsdpH164N2mA8g_YitaK6_qXWTC1sXghhkyACaGbjIN9cAkEZNacJni265Lea4qD0nbou6Mfp8qSjbuhXOttJZY7q7keMMcb1bRJPqqtWuUO1u2AOaeTbpSaIJ9y8PuQ"
}
```

## Responses

| Status | Description |
| --- | --- |
| 200 | Successful response. |
| 400 | The `chatbotId` query parameter is missing, the plan does not include live chat, or live chat is not enabled for the chatbot. |
| 401 | Authentication failed: the `Authorization` header is missing or not in the `Bearer <key>` format, the API key does not exist, its workspace is unavailable or has no owner, or the workspace's plan does not include API access. `message` says which. |
| 403 | The API key cannot access the chatbot given in the `chatbotId` query parameter: a chatbot-scoped key used with another chatbot's ID gets `Access denied to this chatbot`, and any key gets `Chatbot <id> was not found in this API key's workspace. It may have been deleted or moved to another workspace.` when that chatbot does not exist or belongs to another workspace. |
| 404 | The chatbot has no conversation (stored or in an active live session) with this ID. |
| 429 | The workspace sent more than 600 API requests in the last minute. Wait the number of seconds given in the `Retry-After` header (and in `message`) before retrying. |
| 500 | An unexpected error occurred while processing the request; `message` contains the error. |
