{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/corebee-ai/json-schema/corebee-ai-conversation-schema.json",
  "title": "Conversation",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/corebee-ai-conversations-api-openapi.yml#/components/schemas/Conversation",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "org_id": {
      "type": "string",
      "format": "uuid"
    },
    "contact_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "channel_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "status": {
      "type": "integer",
      "enum": [
        0,
        1,
        2,
        3
      ],
      "description": "0=open, 1=resolved, 2=pending, 3=snoozed."
    },
    "assignee_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "priority": {
      "type": [
        "integer",
        "null"
      ]
    },
    "last_activity_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "contacts": {
      "$ref": "#/$defs/ContactSummary"
    }
  },
  "$defs": {
    "ContactSummary": {
      "type": "object",
      "description": "Embedded contact summary on a conversation.",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}