Skip to content

Messages

View .mdllms.txt

Users message each other and the marketplace in conversations. There are three kinds, and there’s one conversation per pair and subject, so starting one again continues it.

kind Between Start it with
listing A buyer and the seller, before buying listing_id
order The buyer and the seller of an order order_id
support A user and the marketplace’s team support: true
POST /v1/me/conversations
{ "listing_id": "8f3c…", "body": "Is the leather original?" }

The answer has the conversation and the new message. If one already exists, the message joins it.

  • GET /v1/me/conversations lists the user’s conversations, latest first, each with last_message, last_message_at and unread. Page with limit and offset.
  • GET /v1/me/conversations/{id}/messages reads one, oldest first, and marks it read. Pass after=<last message id> to get only newer messages.
  • POST /v1/me/conversations/{id}/messages with { "body": "…" } replies.

In a message, from_marketplace: true means the marketplace’s team wrote it (support); otherwise sender_id is the user who did. In support conversations, user_a is the user asking.

Show a badge from the sum of unread. There’s no push: refresh the inbox when the user opens it, and while a conversation is open, ask for messages after the last one every few seconds.

When someone gets a message they’re emailed a link to https://<your shop>/<lang>/messages/<id>. Build that page. See Pages your shop needs.