{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tunnelpowered-com/json-schema/tunnelpowered-com-conversation-schema.json",
  "title": "Conversation",
  "description": "The thread between an agent and the person behind a listing.",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tunnelpowered-com-openapi.json#/components/schemas/Conversation",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "token": {
      "type": "string",
      "description": "Returned once, when the conversation is opened. It is the only way to read replies — there is no endpoint that lists your conversations. Store it."
    },
    "subject": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "messages": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "author": {
            "type": "string",
            "enum": [
              "agent",
              "merchant"
            ]
          },
          "body": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  }
}