List messages in a conversation

list a conversation's messages. Returns the most recent messages for the conversation, oldest → newest.

GET https://api.centerfy.ai/webhooks/inbound/conversations/:id/messages

Headers

HeaderRequiredValueDescription
x-api-keyYesyour sub-account API key (cfy_…)authenticates the request; or pass Authorization: Bearer <key>.

Path parameters

NameTypeRequiredDescription
idstring (uuid)Yesthe conversation id. A non-uuid returns 400; a conversation that does not exist returns 404.

Query parameters

NameTypeRequiredDefaultDescription
limitintegerNo100max number of most-recent messages to return; min 1, max 500 (values above 500 are clamped to 500). Defaults to 100 when omitted or invalid.
channelstringNo—optional filter by channel (e.g. sms, whatsapp). Case-insensitive.

Example

curl -X GET "https://api.centerfy.ai/webhooks/inbound/conversations/{id}/messages?limit=100" \
  -H "x-api-key: $CENTERFY_API_KEY"
import { CenterfyClient } from "@centerfy/sdk";

const centerfy = new CenterfyClient({ apiKey: process.env.CENTERFY_API_KEY! });

const result = await centerfy.conversations.listMessages("<conversationId>", {
  "limit": 100
});
console.log(result);
centerfy conversations list-messages <conversationId> '{"limit":100}'

MCP tool: centerfy_conversations_list_messages (see MCP server)

Response

{
  "status": "success",
  "conversation_id": "c0a1b2c3-1111-4abc-9def-000000000010",
  "message_count": 2,
  "messages": [
    {
      "id": "a1b2c3d4-0001-4abc-9def-000000000001",
      "channel": "sms",
      "direction": "inbound",
      "sender_type": "contact",
      "content": "Hi, is anyone available?",
      "attachment_urls": [],
      "timestamp": "2026-06-12T14:30:00.000Z"
    },
    {
      "id": "a1b2c3d4-0002-4abc-9def-000000000002",
      "channel": "sms",
      "direction": "outbound",
      "sender_type": "ai",
      "content": "Hi! Yes, how can I help you today?",
      "attachment_urls": [],
      "timestamp": "2026-06-12T14:30:45.000Z"
    }
  ]
}

Errors

  • 401 — if unauthenticated; 400 for an invalid conversation id; 404 if the conversation does not exist; direction is ‘inbound’ for messages from the contact, otherwise ‘outbound’.

Notes

Read-only.

© 2026 Centerfy AI. All rights reserved.