# List agent conversations `GET /api/v1/agent-conversations` Every chat a shopper has had with this store's AI assistant, newest first. ONE LIST COVERS THE WHOLE INBOX. The dashboard shows active by default, hides closed, and offers a third "all" mode; here that is ?status=, and omitting it returns everything. PAGED BY CREATION TIME, NOT BY updated_at, even though the dashboard sorts on updated_at. Every reply, takeover, assignment and status change rewrites that column, so a client walking the list while shoppers are chatting would skip conversations that jumped ahead of its position and repeat ones that fell behind it. created_at never moves. THE TRANSCRIPT IS NOT EMBEDDED. A conversation's message count is unbounded, so an inline array would be a page with no cursor. Read /api/v1/agent-conversations/{conversationId}/messages. external_id is deliberately not published. It is the shopper's WhatsApp or Instagram handle, and you can already answer them through the messages route, which delivers on their channel AND records the reply in the merchant's own transcript. ## Query parameters - `status` (active | closed) — active is the merchant's working inbox, closed is the archive. Omit it for both, which the dashboard can only ask for as status=all. A value outside this set is a 400 rather than an ignored filter, because a closed conversation served as part of an unfiltered page reads as one still waiting on a reply. - `handoff_state` (bot | human) — human is the queue that matters operationally: the assistant has stopped answering those and a real person is waiting. - `channel` (website | whatsapp | instagram) — Where the shopper reached this store. It also decides where a reply is delivered. - `assigned_to` (string) — One teammate's conversations, by store user id. An EMPTY value is a 400 rather than "no filter": a client building the query from a variable it forgot to set would otherwise receive the whole inbox and read it as one person's workload. There is no way to ask for the unassigned ones here. - `limit` (integer) — Rows per page. Out of range is a 400 rather than a silent clamp, so a client asking for more than 100 learns it did not get it. - `after` (string) — The next_cursor from the previous page. Opaque: decode nothing from it and construct nothing by hand, since its encoding is not part of this contract. Omit it to read the first page. ## Responses - `200` — Success - `400` — The request was refused before any state changed. `code` is one of: `invalid_body`, a write body this route will not take. `reason` partitions it and `field` names the key when one key is at fault. `invalid_query`, a query parameter, including limit and after. `invalid_text`, a NUL byte or bytes that are not valid UTF-8 anywhere in the path, the query or the body. Strip control characters before sending. `idempotency_key_required`, a write sent without the Idempotency-Key header. `invalid_request`, an Idempotency-Key longer than 255 bytes. Routes add their own codes for rules only they know. Switch with a default arm. - `401` — No credential, or one this API does not accept. `code` is always `unauthorized`. THE BODY IS DELIBERATELY UNINFORMATIVE. An expired key, a revoked key, a publishable key, a key belonging to another merchant and a key that never existed are all refused with the same bytes, so this response cannot be used to probe which keys exist. Check the key's state in the dashboard rather than inferring it here. Send the key as `Authorization: Bearer ` or as `X-API-Key: `. It is never accepted in a query string. - `403` — The key lacks the read_sales_agent scope. `code` is `insufficient_scope` and the message names the scope to ask the merchant for. - `429` — Too many requests. `code` is `rate_limited`. Two limits apply independently: one on the credential and the route family, one on the client address. The headers describe whichever has less left, so honouring Retry-After always clears the window that bound. - `default` — Any status this operation does not list, in the same envelope. A 5xx means the request may or may not have applied. Retry it with the SAME Idempotency-Key: that is the only way to find out without risking a duplicate, and it is what the key is for. A few 4xx conditions arrive here rather than as a listed status because they depend on the merchant's plan or on a module being wired: 402 when a quota or a plan limit is reached, and 503 when a capability the route needs is not configured on this deployment. Both carry a `code` naming which. ## Example ```bash curl --request GET \ --url 'https://api.mercemur.com/api/v1/agent-conversations' \ --header 'Authorization: Bearer ' ```