botruntime
API ReferenceChat API

List Messages

Retrieves a list of [Message](#schema_message) you’ve previously created. The messages are returned in sorted order, with the most recent appearing first. The list can be filtered using [Tags](/docs/data/tags).

GET
/v1/chat/messages

Query Parameters

nextToken?string

Provide the meta.nextToken value provided in the last API response to retrieve the next page of results

pageSize?integer

Number of items to return per page (default 20, max 100)

conversationId?string

Conversation id

tags?

Filter by tags

afterDate?string

Date in ISO 8601 string with UTC timezone after which the message was created (inclusive)

beforeDate?string

Date in ISO 8601 string with UTC timezone before which the message was created (inclusive)

Header Parameters

x-bot-id*string

Bot id

x-integration-id?string

Integration id

x-integration-alias?string

Integration alias

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/chat/messages" \  -H "x-bot-id: string"
{  "messages": [    {      "id": "stringstringstringstringstri",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "type": "string",      "payload": {},      "direction": "incoming",      "userId": "stringstringstringstringstri",      "conversationId": "stringstringstringstringstri",      "tags": {        "property1": "string",        "property2": "string"      },      "origin": "synthetic"    }  ],  "meta": {    "nextToken": "string"  }}
{  "messages": [    {      "id": "stringstringstringstringstri",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "type": "string",      "payload": {},      "direction": "incoming",      "userId": "stringstringstringstringstri",      "conversationId": "stringstringstringstringstri",      "tags": {        "property1": "string",        "property2": "string"      },      "origin": "synthetic"    }  ],  "meta": {    "nextToken": "string"  }}