Skip to content
QwryAI
Documentation
Pages

Endpoints

List conversations for a user

Find one customer's conversations: keep their ids as you start them, filter by contact, or let the mobile SDKs list them

The API has no tool that lists conversations by the userId you pass to the Chat API. A conversation's userId is fixed when it starts and comes back in every answer's metadata, so the reliable way to keep a customer's history together is to store each conversationId against your customer id as you start it. See User Conversations.

To look a customer up from QwryAI's side, filter List conversations by contact, which matches the name or email the customer gave, on every channel:

POSThttps://api.qwryai.com/public/v1/tools/query_conversations

Authentication

Send your API key as Authorization: Bearer <api-key>, or in an x-api-key header. The key needs Manage conversations and helpdesk. See Authentication.

Body parameters

NameTypeRequiredDescription
chatbotIdstringYesThe agent's id, from List agents.
contactstringYes, for this lookupPart of the customer's name or email, 2 to 200 characters, matched as written and ignoring case.
startDate, endDatestringYesCreation dates, YYYY-MM-DD in UTC, both included, at most 184 days apart.
pageintegerYesThe page, from 1. 20 conversations per page.
sourcesstring[]NoLimit to channels, such as ["api"] or ["web", "whatsapp"].

Every other filter in List conversations works here too.

Request example

Bash
curl -X POST 'https://api.qwryai.com/public/v1/tools/query_conversations' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "chatbotId": "YOUR_AGENT_ID",
    "contact": "jane@example.com",
    "startDate": "2026-09-01",
    "endDate": "2026-11-30",
    "page": 1
  }'

Response

JSON
{
  "success": true,
  "data": {
    "items": [
      {
        "_id": "CONVERSATION_RECORD_ID",
        "conversationId": "6e1b9d4a-3c7f-4a2e-9b58-0d4c2f7e1a93",
        "channel": "web",
        "lifecycle": "resolved",
        "metadata": { "aiSummary": "Customer asked whether the linen shirt runs true to size." },
        "timestamps": { "created": "2026-11-12T08:41:19.502Z", "lastActivity": "2026-11-12T08:47:55.230Z" },
        "metrics": { "messageCount": 6, "aiMessageCount": 3, "agentMessageCount": 0 },
        "insights": { "sentiment": "positive" }
      }
    ],
    "total": 1,
    "page": 1,
    "hasMore": false,
    "range": { "startDate": "2026-09-01", "endDate": "2026-11-30", "page": 1, "contact": "jane@example.com" },
    "timezone": "UTC"
  }
}

The fields are described in List conversations. Pass an item's _id to Get a conversation to read its messages.

In mobile apps

The iOS and Android SDKs list a signed-in customer's own conversations, newest first, with no API key: the customer's identity token decides whose history comes back. See User identity.

Errors

HTTP statusCodeWhen
400INVALID_ARGUMENTScontact is under 2 characters, a date isn't YYYY-MM-DD, or page is missing. issues lists each one.
400CHATBOT_ID_REQUIREDThe body has no valid chatbotId.
401API_KEY_REQUIRED / INVALID_API_KEYNo credential, or an unknown, deleted or expired one.
403INSUFFICIENT_PERMISSIONThe key doesn't hold Manage conversations and helpdesk.
404CHATBOT_NOT_FOUNDNo agent with that chatbotId in your workspace.
409VALIDATION_INVALID_BODYendDate is before startDate, or the range is longer than 184 days.
429INTEGRATION_RATE_LIMIT_EXCEEDEDMore than 2,000 requests in 15 minutes.

See Error Handling for every code.

Explore the documentation