# Get a conversation transcript

`GET https://app.whatsetter.com/api/v1/conversations/{leadId}/messages`

All messages exchanged with one lead, newest first.
`leadId` is the lead's `id` from `/leads` or `/conversations`.
Requires scope `conversations:read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `leadId` | path | string | yes |  |
| `limit` | query | integer | no |  |
| `cursor` | query | string | no | Opaque cursor from the previous page's `pagination.next_cursor`. |

## Example request

```bash
curl --request GET \
  --url 'https://app.whatsetter.com/api/v1/conversations/{leadId}/messages' \
  --header 'Authorization: Bearer ws_live_…'
```

## Responses

### 200: Page of messages

```json
{
  "data": [
    {
      "id": "",
      "direction": "inbound",
      "text": "",
      "type": "",
      "variant": "A",
      "has_media": false,
      "sent_at": ""
    }
  ],
  "pagination": {
    "has_more": false,
    "next_cursor": ""
  }
}
```

### 401: Missing, unknown or revoked API key

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```

### 404: Resource not found in this workspace

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```

### 422: Invalid parameter or body (also an invalid or expired `cursor`)

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```


Source: https://docs.whatsetter.com/api-reference/operations/listconversationmessages/
