List a conversation's messages

GET
/v1/conversations/{id}/messages

Returns one conversation's messages, oldest first. Pass before=end for the newest page, then each page's prevCursor as before to go further back — the usual way to show a chat history.

Requires an API key with the messages:read scope.

Authorization

apiKey
headerAuthorizationBearer <token>

A secret API key from the dashboard (Developers → API keys): vl_live_…, or vl_test_… for test mode. Each operation says which scope the key needs.

Path Parameters

id*string

The conversation id.

Query Parameters

after?string

A page's nextCursor: return what came after it. Use it to poll for new messages.

Length1 <= length <= 256
before?string

A page's prevCursor: return what came before it. Pass end for the newest page.

Length1 <= length <= 256
limit?integer

How many items to return, 1–100. Default 50.

Range1 <= value <= 100

Response Body

A page of the conversation's messages

application/json
  1. response
messages*array<>
nextCursor*string|null
hasMore*boolean
prevCursor*string|null
Example Request
curl "https://api.vlayers.ai/v1/conversations/$CONVERSATION_ID/messages?before=end&limit=20" \  -H "Authorization: Bearer $VOICELAYER_API_KEY"
Example Response
{  "messages": [    {      "id": "0192f5b0-8d1f-7b62-8c3e-5f9a2b7d4e32",      "conversationId": "0192f5b0-7c3e-7a51-9b2d-4e8f1a6c3d21",      "channel": "sms",      "direction": "inbound",      "status": "received",      "text": "Do you have a table for two tonight?",      "media": [],      "from": "+15550123",      "to": "+14155550100",      "bindingId": null,      "metadata": {},      "error": null,      "createdAt": "2026-10-20T15:04:05.000Z"    }  ],  "nextCursor": "eyJjIjoiMjAyNi0xMC0yMFQxNTowNDowNVoifQ",  "hasMore": false,  "prevCursor": null}