> For the complete documentation index, see [llms.txt](https://documentation.maax.ai/main/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.maax.ai/main/technical-guides/apis/v2/conversations.md).

# Conversations

For retrieving conversation history, you can use the following endpoint:

<mark style="color:orange;">`/conversations/{id}/`</mark>

This is highly useful when generating tickets or support requests through oour [emergency notification feature](/main/setup-your-ai/customer-support-ai/emergency-notification-setting.md)

## Retrieve conversation history by conversation\_id

<mark style="color:green;">`POST`</mark> `https://app.max.ai/api/v2/conversations/{id}/`

This endpoint allows you to retrieve the full conversation history of prospects

#### Query Parameters

| Name                                 | Type   | Description                          |
| ------------------------------------ | ------ | ------------------------------------ |
| id<mark style="color:red;">\*</mark> | String | Unique integer for each conversation |

#### Headers

| Name                                           | Type   | Description                                                                             |
| ---------------------------------------------- | ------ | --------------------------------------------------------------------------------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | *application/json*                                                                      |
| 2hd-api-key<mark style="color:red;">\*</mark>  | String | Your MAAX AI API key, which you can locate at <https://app.maax.ai/dashboard/api-keys/> |

{% tabs %}
{% tab title="200: OK {     "incoming\_message\_id": Integer }" %}

{% endtab %}

{% tab title="401: Unauthorized Returned if the provided api key is not valid (or not provided). " %}

{% endtab %}

{% tab title="400: Bad Request Returned if  there are incorrectly formatted parameters" %}

{% endtab %}

{% tab title="403: Forbidden " %}

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://documentation.maax.ai/main/technical-guides/apis/v2/conversations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
