Enigma Developers

Conversations

Read a contact's message history.

Conversation history

GET /v1/conversations/{audienceExternalId}/messages, scope message:read. Returns the contact's latest conversation, newest first, paginated with page and limit (max 100).

curl "https://api.enigma-ai.com/v1/conversations/249912345678:123456789012345/messages?limit=20" \
  -H "Authorization: Bearer $ENIGMA_API_KEY"
{
  "messages": [
    {
      "_id": "6707b2c3d4e5f6a7b8c9d0e1",
      "externalId": "wamid.HBgLMjQ5OTEyMzQ1Njc4FQIAERgS",
      "sender": "audience",
      "content": { "type": "text", "text": "Where is my order?" },
      "status": "read",
      "sentAt": "2026-10-10T08:40:12.000Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 20
}

sender is audience (the customer), bot, ai_agent, agent (a human agent or the API) or system. content.type says which content fields are present.

The key sees what its creator sees in the inbox. A key created by an organization owner gets the full history; keys created by other members get the last two sessions.

Session messages

A conversation is split into sessions. GET /v1/sessions/{sessionId}/messages returns every message of one session, using the sessionId found on each message. It requires scope conversation:handover:request.

On this page