Conversations

List Conversation Messages

Retrieve one page of a conversation's messages, newest first. Obtain conversation_id from List Conversations or data.conversation.id in a message webhook. Follow links.next to read older pages. Each message's identifier is data[].id.

get/conversations/{conversation_id}/messages

Request

  • Base URL: https://developers.chatway.app/api/v1
  • URL: https://developers.chatway.app/api/v1/conversations/{conversation_id}/messages
  • Auth: API key in header X-API-KEY

Path parameters

conversation_idstring required

Conversation ID

Query parameters

limitinteger nullable

Maximum messages per page. Default: 20. Allowed range: 1–20.

pageinteger nullable

Page number, starting at 1. Default: 1.

include_fieldsstring nullable

Allowed: conversation_id, chat_contact_id, agent, contact, origin, content, type, created_at. Example: content,type. If both this and exclude_fields are sent, only include_fields is applied.

exclude_fieldsstring nullable

Allowed: conversation_id, chat_contact_id, agent, contact, origin, content, type, created_at. Ignored when include_fields is also present (include takes precedence).

searchstring

Optional search term for this conversation's messages. Omit it to request messages without a search filter.

Response

Paginated list responses include data, meta.pagination, and links. Use the page and limit query parameters to walk results. Follow links.next until it is null, or increment page until current_page >= total_pages.

FieldDescription
meta.pagination.totalTotal records across all pages
meta.pagination.countRecords returned on this page
meta.pagination.per_pagePage size used for this response (matches limit)
meta.pagination.current_pageCurrent page number (1-based)
meta.pagination.total_pagesTotal number of pages
links.nextURL for the next page, or null on the last page
links.first / links.lastFirst and last page URLs

Changes

No recorded changes to this operation across all 1 revision of this API.