> ## Documentation Index
> Fetch the complete documentation index at: https://botsify.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Conversation — POST /api/v1/converse/get-conversation

> Retrieve the full conversation history between a Botsify agent and a specific user identified by their fbId, returned in chronological order.

Use this endpoint to fetch the complete message history for a user session. Given a bot key and a user's `fbId`, the API returns every turn of the conversation in chronological order — including both user messages and agent replies. This is useful for displaying conversation logs, auditing responses, or re-hydrating context in your application.

## Request

**`POST https://app.botsify.com/api/v1/converse/get-conversation`**

**Authorization:** Bearer token — include your token in the `Authorization: Bearer <token>` header.

### Body Parameters

<ParamField body="bot_key" type="string" required>
  The unique key that identifies your bot. You can find this in your Botsify dashboard under bot settings.
</ParamField>

<ParamField body="fbId" type="string" required>
  The unique session identifier for the user whose conversation you want to retrieve. This is the same `fbId` used when sending messages via the [Converse](/api-reference/messaging/converse) endpoint.
</ParamField>

## Example

```bash theme={null}
curl --request POST \
  --url "https://app.botsify.com/api/v1/converse/get-conversation" \
  --header "Authorization: Bearer <your_token>" \
  --header "Content-Type: application/json" \
  --data '{
    "bot_key": "bot_abc123",
    "fbId": "user_9876"
  }'
```

## Response

A successful request returns `200 OK` with an array of conversation messages in chronological order.

| Field | Type | Description |
| - | - | - |
| `fbId` | string | The session identifier |
| `messages` | array | Ordered list of all conversation turns |
| `messages[].role` | string | `"user"` or `"assistant"` |
| `messages[].content` | string | Message text |
| `messages[].timestamp` | string | ISO 8601 timestamp |

```json theme={null}
{
  "fbId": "user_9876",
  "messages": [
    {
      "role": "user",
      "content": "What are your business hours?",
      "timestamp": "2024-06-10T14:05:00Z"
    },
    {
      "role": "assistant",
      "content": "Our business hours are Monday to Friday, 9 AM – 6 PM EST.",
      "timestamp": "2024-06-10T14:05:02Z"
    },
    {
      "role": "user",
      "content": "Do you have weekend support?",
      "timestamp": "2024-06-10T14:06:10Z"
    },
    {
      "role": "assistant",
      "content": "We offer limited weekend support via email. Response times may be longer.",
      "timestamp": "2024-06-10T14:06:12Z"
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.