> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.conversive.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.conversive.ai/_mcp/server.

# Get conversation messages

GET https://api.beconversive.com/api/v2/conversations/{conversation_id}

Returns the messages of one conversation in one list, newest first by `created_on`. Get the ID from List or search conversations. Each message's `direction` says whether you sent it or the end user did.

Only `page`, `page_size` and `user_id` are read from the query string. The conversation is picked only by the ID in the path.


Reference: https://docs.conversive.ai/developer-guide/get-conversation-messages

## Authentication

- `apiKey` header (required) — API Key authentication via header

## Request

### Path parameters

- `conversation_id` (integer, required) — ID of the conversation. Only conversations of the API key's account are found.

### Query parameters

- `page` (integer, optional, default: 0) — Page number, from 0 to 99999. Default: 0 (the newest page).
- `page_size` (integer, optional, default: 20) — Items per page, from 1 to 100. Messages and conversation events count together. Default: 20.
- `user_id` (string, optional) — Portal user ID, user name or Salesforce user ID.

## Response

### 200

Retrieved

- `messages` (list of Message, optional) — Messages in both directions, newest first by created_on.
- `conversation_action` (list of ConversationMessagesResponseConversationActionItems, optional) — Conversation events.
- `voice_conversation_id` (string, optional, nullable) — The linked voice call, if any.

## Errors

### 400 Bad Request Error

Bad Request – INVALID-CONVERSATION-ID, NO-API-KEY, FORBIDDEN-API-KEY, INVALID-PAGE, or INVALID-PAGE-SIZE

- `status` (string, optional)
- `message` (string, optional)

### 404 Not Found Error

Not Found – conversation ID in the path is not a number

- `status` (string, optional)
- `message` (string, optional)

### 405 Method Not Allowed Error

Method Not Allowed – only GET is allowed

- `status` (string, optional)
- `message` (string, optional)

### 422 Unprocessable Entity Error

Unprocessable Entity – page or page_size is not a number

- `status` (string, optional)
- `message` (string, optional)

### 502 Bad Gateway Error

Bad Gateway – SAAS-API-UNAVAILABLE (temporary, retry after a short wait)

- `status` (string, optional)
- `message` (string, optional)

### 504 Gateway Timeout Error

Gateway Timeout – SAAS-API-TIMEOUT (temporary, retry after a short wait)

- `status` (string, optional)
- `message` (string, optional)

## Types

### Message

- `message_id` (integer, optional) — Message ID.
- `direction` (enum, optional) — out (sent by you) or in (from the end user).
  - Allowed values: `in`, `out`
- `text` (string, optional) — Message text.
- `created_on` (string, optional) — Time, YYYY-MM-DD HH:MM:SS.mmm.
- `channel` (string, optional) — sms, whatsapp, email, ... (MMS is shown as sms).
- `sender_id` (string, optional) — Your business number or sender address.
- `mobile_number` (string, optional) — The end user's number.
- `attach_url` (MessageAttachUrl, optional) — Media URL(s), when the message has media.
- `sender_name` (string, optional, nullable) — Incoming only. The participant who sent it, in group conversations.
- `sent_status` (enum, optional) — Outgoing only.
  - Allowed values: `queued`, `cached`, `success`, `failed`, `declined`
- `delivery_status` (enum, optional) — Outgoing only.
  - Allowed values: `pending`, `success`, `read`, `failed`
- `visual_indicator` (string, optional) — Outgoing only. The tick shown in the inbox, e.g. grey_double_tick, blue_double_tick.
- `source` (string, optional) — Outgoing only. Where it was sent from, e.g. chatbot.
- `content` (MessageContent, optional, nullable) — Outgoing only. Template payload, for template messages.
- `response_id` (string, optional) — Outgoing only. Message ID from the provider.
- `user_name` (string, optional, nullable) — Outgoing only. The agent who sent it; null for automated or API sends.
- `user_email` (string, optional, nullable) — Outgoing only. The agent's email; null for automated or API sends.

### ConversationMessagesResponseConversationActionItems

- `message_id` (integer, optional)
- `text` (string, optional)
- `created_on` (string, optional)
- `action` (string, optional) — Opened, Closed, ChannelSwitch, InternalNote, ...

### MessageAttachUrl

Media URL(s), when the message has media.

- string
- list of string

### MessageContent

Outgoing only. Template payload, for template messages.

## Examples

**Response**

```json
{
  "messages": [
    {
      "message_id": 20103048,
      "direction": "in",
      "text": "Thanks",
      "created_on": "2026-11-19 10:01:00.000",
      "channel": "whatsapp",
      "sender_id": "918000000000",
      "mobile_number": "919800000001",
      "attach_url": []
    },
    {
      "message_id": 3155122,
      "direction": "out",
      "text": "Your visitor has arrived",
      "created_on": "2026-11-19 10:00:00.000",
      "channel": "whatsapp",
      "sender_id": "918000000000",
      "mobile_number": "919800000001",
      "sent_status": "success",
      "delivery_status": "read",
      "user_name": "Agent",
      "user_email": "agent@example.com"
    }
  ],
  "conversation_action": [],
  "voice_conversation_id": null
}
```

**SDK Code**

```python getConversationMessages_example
import requests

url = "https://api.beconversive.com/api/v2/conversations/1"

headers = {"apiKey": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript getConversationMessages_example
const url = 'https://api.beconversive.com/api/v2/conversations/1';
const options = {method: 'GET', headers: {apiKey: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go getConversationMessages_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.beconversive.com/api/v2/conversations/1"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("apiKey", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby getConversationMessages_example
require 'uri'
require 'net/http'

url = URI("https://api.beconversive.com/api/v2/conversations/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["apiKey"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java getConversationMessages_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.beconversive.com/api/v2/conversations/1")
  .header("apiKey", "<apiKey>")
  .asString();
```

```php getConversationMessages_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.beconversive.com/api/v2/conversations/1', [
  'headers' => [
    'apiKey' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp getConversationMessages_example
using RestSharp;

var client = new RestClient("https://api.beconversive.com/api/v2/conversations/1");
var request = new RestRequest(Method.GET);
request.AddHeader("apiKey", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift getConversationMessages_example
import Foundation

let headers = ["apiKey": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beconversive.com/api/v2/conversations/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```