# Get conversation by id

{% hint style="warning" %}
All API requests should contain [authorization headers](/docs/apis/tickets/authorization-headers.md).
{% endhint %}

**Request**

```
GET chat/conversations/{id}
```

**Query parameters**

<table><thead><tr><th width="181">Name</th><th width="97">Type</th><th width="102">Required</th><th>Comments</th></tr></thead><tbody><tr><td>includeMessages</td><td>boolean</td><td>false</td><td>By default is <code>false</code></td></tr><tr><td>orderyBy</td><td><a href="/pages/SAPck5AeL3aMRIdvSxex">Order by</a> enumeration</td><td>false</td><td><p>Indicates the order of messages in the dialogue.</p><p>If set to <code>creation_time_asc</code> value, the system retrieves the earliest 100 messages; if set to <code>creation_time_desc</code>, it retrieves the latest 100 messages.</p><p>The default value is <code>creation_time_desc</code></p></td></tr></tbody></table>

**Response**

```json
{
    "data": {
        "author": {
            "customIdentifier": null,
            "email": "john@dow.com",
            "id": "fc2481f6-28a4-4ca7-849a-344fd6ab1b20",
            "image": null,
            "isBot": false,
            "name": "John",
            "status": "client"
        },
        "creationTime": "2023-09-01T12:56:39.0847826+03:00",
        "feedback": null,
        "id": 254626,
        "isClosed": false,
        "isTakeoverEnabled": true,
        "lastModifiedTime": "2023-09-01T12:56:39.0847826+03:00",
        "messages": [
            {
                "author": {
                    "email": null,
                    "id": "fc2481f6-28a4-4ca7-849a-344fd6ab1b20",
                    "image": null,
                    "isBot": false,
                    "name": "John",
                    "status": "client"
                },
                "creationTime": "2023-09-01T12:56:39.0847826+03:00",
                "id": 0,
                "lastModifiedTime": "2023-09-01T12:56:39.0847826+03:00",
                "message": "Hi, I have some questions about the Chat API"
            },
            {
                "author": {
                    "email": "john@dow.com",
                    "id": "fc2481f6-28a4-4ca7-849a-344fd6ab1b20",
                    "image": null,
                    "isBot": false,
                    "name": "John",
                    "status": "client"
                },
                "creationTime": "2023-09-01T12:58:39.0847826+03:00",
                "id": 667151,
                "lastModifiedTime": "2023-09-01T12:58:39.0847826+03:00",
                "message": "This is an external message created on a third-party platform"
            },
            {
                "author": {
                    "email": "john@dow.com",
                    "id": "fc2481f6-28a4-4ca7-849a-344fd6ab1b20",
                    "image": null,
                    "isBot": false,
                    "name": "John",
                    "status": "client"
                },
                "creationTime": "2023-09-01T13:03:49.0847826+03:00",
                "id": 667154,
                "lastModifiedTime": "2023-09-01T13:03:49.0847826+03:00",
                "message": "And this is another message from third-party platform"
            }
        ],
        "queuePositionInfo": 
        {
            "position": 1403,
            "waitTime": 15
        },
        "totalMessagesCount": 3
    },
    "errorCode": -1,
    "errorText": null
}
```

`Data` field has type of [Conversation](/docs/apis/external-chat-api/reference/objects/conversation.md) object.


---

# 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://developers.socialboards.com/docs/apis/external-chat-api/reference/endpoints/get-conversation-by-id.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.
