{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elocuenti-com/json-schema/elocuenti-com-conversation-list-response-schema.json",
  "title": "ConversationListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elocuenti-com-conversations-api-openapi.yml#/components/schemas/ConversationListResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Conversation"
      },
      "title": "Data"
    },
    "request_id": {
      "type": "string",
      "description": "The identifier of this request. Give it to support if you need help.",
      "title": "Request Id"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Send it as `cursor` to get the next page. `null` on the last page. It is opaque: do not build or parse it.",
      "title": "Next Cursor"
    }
  },
  "required": [
    "data",
    "request_id",
    "next_cursor"
  ],
  "$defs": {
    "Conversation": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The identifier of the conversation.",
          "title": "Id"
        },
        "contact_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The identifier of the contact the conversation is with, or `null` if it is not linked to a contact yet.",
          "title": "Contact Id"
        },
        "channel": {
          "type": "string",
          "description": "Where the conversation happens: `whatsapp`, `instagram`, `messenger`, `telegram`, `widget` or `pstn` (phone).",
          "title": "Channel"
        },
        "status": {
          "type": "string",
          "enum": [
            "open",
            "closed",
            "awaiting_human",
            "blocked"
          ],
          "description": "`open`: in progress. `awaiting_human`: the AI handed it over and a person has to attend it. `closed`: finished (open it again with the reopen operation). `blocked`: the contact was blocked from the dashboard; the API does not change it.",
          "title": "Status"
        },
        "assigned_to": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The identifier of the person who attends it (see `GET /api/v1/agents`), or `null` if nobody does.",
          "title": "Assigned To"
        },
        "ai_enabled": {
          "type": "boolean",
          "description": "`true` when the AI agent answers this conversation. A conversation assigned to a person has it off.",
          "title": "Ai Enabled"
        },
        "ai_resume_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "When the AI will take the conversation back (UTC, ISO 8601), if you paused it with `resume_at` and the pause is still in place; otherwise `null`.",
          "title": "Ai Resume At"
        },
        "awaiting_human_since": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Since when a person is expected to attend it (UTC, ISO 8601), or `null` when nobody is waiting.",
          "title": "Awaiting Human Since"
        },
        "unread_count": {
          "type": "integer",
          "description": "How many customer messages nobody has read yet.",
          "title": "Unread Count"
        },
        "last_message_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "When the last message was sent or received (UTC, ISO 8601), or `null`.",
          "title": "Last Message At"
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "When the conversation started (UTC, ISO 8601).",
          "title": "Created At"
        },
        "updated_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The last time the conversation changed, for any reason (UTC, ISO 8601). Use it with `updated_since` to ask only for what changed.",
          "title": "Updated At"
        }
      },
      "required": [
        "id",
        "contact_id",
        "channel",
        "status",
        "assigned_to",
        "ai_enabled",
        "ai_resume_at",
        "awaiting_human_since",
        "unread_count",
        "last_message_at",
        "created_at",
        "updated_at"
      ],
      "description": "A conversation with a customer.",
      "title": "Conversation"
    }
  }
}