---
title: Migrate Chat to V3 | API Docs
---

GET

/api/partner/v2/chats/{chat\_id}/migrate\_to\_v3

Select code sample cURL (shell:curl)

```
const url = 'https://api.linqapp.com/api/partner/v2/chats/1/migrate_to_v3';
const options = {
  method: 'GET',
  headers: {'X-LINQ-INTEGRATION-TOKEN': '<X-LINQ-INTEGRATION-TOKEN>'}
};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```
curl --request GET \
  --url https://api.linqapp.com/api/partner/v2/chats/1/migrate_to_v3 \
  --header 'X-LINQ-INTEGRATION-TOKEN: <X-LINQ-INTEGRATION-TOKEN>'
```

- Production server api.linqapp.com/api/partner/v2/chats/{chat\_id}/migrate\_to\_v3

Looks up the V3 chat ID for an existing V2 chat so an in-flight conversation can continue under V3.

Chat IDs changed between versions: V2 chat IDs are integers (e.g. `12345`), while V3 chat IDs are UUIDs (e.g. `550e8400-e29b-41d4-a716-446655440000`). This is a V2 endpoint, so it uses the V2 authentication header (`X-LINQ-INTEGRATION-TOKEN`), not the V3 `Authorization: Bearer` header. It takes no request body.

The call is idempotent — migrating an already-migrated chat returns the same response as the first migration. Once you have the `v3_chat_id`, use it as the `chatId` in every V3 endpoint.

## Authorizations

- **[ApiKeyAuth](/v2/api/#apikeyauth/index.md)**

## Parameters

### Path Parameters

**chat\_id**

required

integer

The V2 chat ID

## Responses

### 200

The chat was migrated (or was already migrated). Both cases return the same shape.

Media type application/json

object

**data**

object

**v3\_chat\_id**

The V3 chat ID (UUID) to use as the chatId in V3 endpoints.

string format: uuid

**v2\_chat\_id**

The original V2 chat ID.

integer

**migrated**

Whether the chat is migrated.

boolean

##### Example

```
{
  "data": {
    "v3_chat_id": "550e8400-e29b-41d4-a716-446655440000",
    "v2_chat_id": 12345,
    "migrated": true
  }
}
```

### 404

The chat doesn’t exist, or belongs to another organization.

Media type application/json

Standard error format used by most endpoints (render\_error format)

object

**errors**

Array\<object>

object

**status**

integer

**code**

string

**title**

string

**detail**

string

##### Example

```
{
  "errors": [
    {
      "status": 404,
      "code": "not_found",
      "title": "Not Found",
      "detail": "Chat not found"
    }
  ]
}
```

### 422

The chat could not be migrated. `v3_chat_id` is null and `migrated` is false.

Media type application/json

object

**data**

object

**v3\_chat\_id**

Null when the chat could not be migrated.

string format: uuid

nullable

**v2\_chat\_id**

The original V2 chat ID.

integer

**migrated**

Whether the chat is migrated.

boolean

##### Example

```
{
  "data": {
    "v3_chat_id": null,
    "v2_chat_id": 12345,
    "migrated": false
  }
}
```
