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

# List trade messages

GET https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/{tradeId}/messages

List trade messages.

**Credential:** Customer session or partner secret

**Before you call**

- A customer session, or an owning partner server credential without Origin.
- A trade you own. You can send messages while it is CREATED, PAID or DISPUTED.

Owning customer only; newest page of 50, returned oldest first. Pass nextCursor as before to page backward.

> Confirm with Sinbad that this endpoint is enabled in your environment.

**Errors**

| Status | Code | What to do |
| --- | --- | --- |
| 400 | `VALIDATION_ERROR` | Correct the fields reported in details before retrying. |
| 401 | `UNAUTHENTICATED` | Create a new customer session or use a valid server credential. |
| 403 | `FORBIDDEN` | Check credential ownership, integration and the supplied Origin. |
| 404 | `NOT_FOUND` | Check the resource ID. A resource that belongs to someone else also returns 404. |
| 409 | `CONFLICT` | Read the current state again before you prepare or retry. |
| 503 | `UPSTREAM_ERROR` | Retry with backoff; preserve the same idempotency key for a repeated mutation. |

Reference: https://docs.getsinbad.com/api-reference/trade-messages/list-partner-trade-messages

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.
- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `tradeId` (string, required)

### Query parameters

- `before` (string, optional)

## Response

### 200

Messages and nextCursor; no image bytes or storage paths.

- `messages` (list of trades__ChatMessage, required)
- `nextCursor` (string, required, nullable)

## Errors

### 400 Bad Request Error

The request is invalid.

- `error` (V1TradesTradeIdMessagesGetResponsesContentApplicationJsonSchemaError, required)

### 401 Unauthorized Error

Authentication is required.

- `error` (V1TradesTradeIdMessagesGetResponsesContentApplicationJsonSchemaError, required)

### 403 Forbidden Error

You do not have permission to perform this action.

- `error` (V1TradesTradeIdMessagesGetResponsesContentApplicationJsonSchemaError, required)

### 404 Not Found Error

The requested resource was not found.

- `error` (V1TradesTradeIdMessagesGetResponsesContentApplicationJsonSchemaError, required)

### 409 Conflict Error

The request conflicts with the current state of the resource.

- `error` (V1TradesTradeIdMessagesGetResponsesContentApplicationJsonSchemaError, required)

### 503 Service Unavailable Error

Service temporarily unavailable.

- `error` (V1TradesTradeIdMessagesGetResponsesContentApplicationJsonSchemaError, required)

## Types

### trades__ChatMessage

- `messageId` (string, required)
- `authorRole` (enum, required)
  - Allowed values: `customer`, `merchant`
- `text` (string, required) — Caption or message text; empty for image-only messages.
- `type` (enum, required)
  - Allowed values: `text`, `image`, `file`
- `image` (TradesChatMessageImage, required, nullable)
- `createdAt` (datetime, required, nullable)
- `id` (string, optional) — Alias of messageId matching the app message field.
- `base64Preview` (string, optional) — Small blurred JPEG preview, never original file bytes.
- `width` (integer, optional)
- `height` (integer, optional)
- `isUploaded` (boolean, optional)
- `attachmentUnavailable` (boolean, optional) — True when a stored attachment is missing or invalid. The message keeps its type, text and preview, with null image/attachment metadata and isUploaded false. Other messages and pagination remain available; the individual image route still rejects the unavailable attachment.
- `uploadStatus` (string, optional, nullable)
- `attachment` (TradesChatMessageAttachment, optional, nullable)

### V1TradesTradeIdMessagesGetResponsesContentApplicationJsonSchemaError

- `code` (string, required)
- `numericId` (integer, required)
- `message` (string, required)
- `requestId` (string, optional)
- `details` (map from string to any, optional)

### TradesChatMessageImage

- `contentType` (string, required) — Original retained merchant format or a customer-uploaded PNG/JPEG.
- `size` (integer, required)

### TradesChatMessageAttachment

- `contentType` (string, optional) — Original retained merchant format or a customer-uploaded PNG/JPEG.
- `size` (integer, optional)

## Examples

### Success

**Response**

```json
{
  "messages": [
    {
      "messageId": "message_demo",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    }
  ],
  "nextCursor": null
}
```

**SDK Code**

```python Success
import requests

url = "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript Success
const url = 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go Success
package main

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

func main() {

	url := "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

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

url = URI("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages")

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

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

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

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

HttpResponse<String> response = Unirest.get("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Success
using RestSharp;

var client = new RestClient("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Success
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages")! 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()
```

### Unavailable image preserves the conversation

**Response**

```json
{
  "messages": [
    {
      "messageId": "message_demo",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "unavailable_image",
      "authorRole": "customer",
      "text": "Retained caption",
      "type": "image",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo",
      "base64Preview": "/9j/2wBDABQODxIPDRQSEBIXFRQYHjIhHhwcHj0sLiQySUBMS0dARkVQWnNiUFVtVkVGZIhlbXd7gYKBTmCNl4x9lnN+gXz/2wBDARUXFx4aHjshITt8U0ZTfHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHz/wAARCABAAEADASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAb/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/ALMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/2Q==",
      "width": 1,
      "height": 1,
      "isUploaded": false,
      "attachmentUnavailable": true,
      "uploadStatus": null,
      "attachment": null
    }
  ],
  "nextCursor": null
}
```

**SDK Code**

```python Unavailable image preserves the conversation
import requests

url = "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript Unavailable image preserves the conversation
const url = 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go Unavailable image preserves the conversation
package main

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

func main() {

	url := "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby Unavailable image preserves the conversation
require 'uri'
require 'net/http'

url = URI("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages")

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

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

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

```java Unavailable image preserves the conversation
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Unavailable image preserves the conversation
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Unavailable image preserves the conversation
using RestSharp;

var client = new RestClient("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Unavailable image preserves the conversation
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages")! 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()
```

### Historical merchant PDF

**Response**

```json
{
  "messages": [
    {
      "messageId": "message_demo",
      "authorRole": "merchant",
      "text": "Receipt",
      "type": "file",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": {
        "contentType": "application/pdf",
        "size": 1000
      }
    }
  ],
  "nextCursor": null
}
```

**SDK Code**

```python Historical merchant PDF
import requests

url = "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript Historical merchant PDF
const url = 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go Historical merchant PDF
package main

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

func main() {

	url := "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby Historical merchant PDF
require 'uri'
require 'net/http'

url = URI("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages")

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

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

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

```java Historical merchant PDF
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Historical merchant PDF
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Historical merchant PDF
using RestSharp;

var client = new RestClient("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Historical merchant PDF
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages")! 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()
```

### Empty final page

**Response**

```json
{
  "messages": [],
  "nextCursor": null
}
```

**SDK Code**

```python Empty final page
import requests

url = "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript Empty final page
const url = 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go Empty final page
package main

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

func main() {

	url := "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby Empty final page
require 'uri'
require 'net/http'

url = URI("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages")

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

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

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

```java Empty final page
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Empty final page
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Empty final page
using RestSharp;

var client = new RestClient("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Empty final page
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages")! 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()
```

### Next page

**Response**

```json
{
  "messages": [
    {
      "messageId": "message_demo_1",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_1",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_2",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_2",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_3",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_3",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_4",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_4",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_5",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_5",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_6",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_6",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_7",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_7",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_8",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_8",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_9",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_9",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_10",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_10",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_11",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_11",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_12",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_12",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_13",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_13",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_14",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_14",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_15",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_15",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_16",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_16",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_17",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_17",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_18",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_18",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_19",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_19",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_20",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_20",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_21",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_21",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_22",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_22",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_23",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_23",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_24",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_24",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_25",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_25",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_26",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_26",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_27",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_27",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_28",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_28",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_29",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_29",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_30",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_30",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_31",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_31",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_32",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_32",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_33",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_33",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_34",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_34",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_35",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_35",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_36",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_36",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_37",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_37",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_38",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_38",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_39",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_39",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_40",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_40",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_41",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_41",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_42",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_42",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_43",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_43",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_44",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_44",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_45",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_45",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_46",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_46",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_47",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_47",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_48",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_48",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_49",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_49",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    },
    {
      "messageId": "message_demo_50",
      "authorRole": "customer",
      "text": "Payment sent.",
      "type": "text",
      "image": null,
      "createdAt": "2026-10-23T10:00:00.000Z",
      "id": "message_demo_50",
      "base64Preview": "",
      "width": 0,
      "height": 0,
      "isUploaded": false,
      "uploadStatus": null,
      "attachment": null
    }
  ],
  "nextCursor": "message_demo_50"
}
```

**SDK Code**

```python Next page
import requests

url = "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript Next page
const url = 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go Next page
package main

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

func main() {

	url := "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby Next page
require 'uri'
require 'net/http'

url = URI("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages")

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

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

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

```java Next page
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Next page
using RestSharp;

var client = new RestClient("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Next page
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/messages")! 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()
```