Migrate Chat to V3
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>'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
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The V2 chat ID
Responses
Section titled “ Responses ”The chat was migrated (or was already migrated). Both cases return the same shape.
object
object
The V3 chat ID (UUID) to use as the chatId in V3 endpoints.
The original V2 chat ID.
Whether the chat is migrated.
Example
{ "data": { "v3_chat_id": "550e8400-e29b-41d4-a716-446655440000", "v2_chat_id": 12345, "migrated": true }}The chat doesn’t exist, or belongs to another organization.
Standard error format used by most endpoints (render_error format)
object
object
Example
{ "errors": [ { "status": 404, "code": "not_found", "title": "Not Found", "detail": "Chat not found" } ]}The chat could not be migrated. v3_chat_id is null and migrated is false.
object
object
Null when the chat could not be migrated.
The original V2 chat ID.
Whether the chat is migrated.
Example
{ "data": { "v3_chat_id": null, "v2_chat_id": 12345, "migrated": false }}