{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/talkjs/json-schema/talkjs-conversation-list-schema.json",
  "title": "ConversationList",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/talkjs-conversations-api-openapi.yml#/components/schemas/ConversationList",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Conversation"
      }
    }
  },
  "$defs": {
    "Conversation": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "subject": {
          "type": [
            "string",
            "null"
          ]
        },
        "photoUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "welcomeMessages": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "custom": {
          "$ref": "#/$defs/Custom"
        },
        "topicId": {
          "type": [
            "string",
            "null"
          ]
        },
        "lastMessage": {
          "$ref": "#/$defs/Message"
        },
        "participants": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/Participant"
          }
        },
        "createdAt": {
          "type": "integer",
          "format": "int64"
        },
        "everyoneReadUntil": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        }
      }
    },
    "Custom": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Custom key-value metadata (string values)."
    },
    "Message": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "conversationId": {
          "type": "string"
        },
        "senderId": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string",
          "enum": [
            "UserMessage",
            "SystemMessage"
          ]
        },
        "origin": {
          "type": "string",
          "enum": [
            "rest",
            "email",
            "import",
            "web"
          ]
        },
        "text": {
          "type": [
            "string",
            "null"
          ]
        },
        "attachment": {
          "type": [
            "object",
            "null"
          ]
        },
        "location": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "number"
          }
        },
        "custom": {
          "$ref": "#/$defs/Custom"
        },
        "readBy": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "referencedMessageId": {
          "type": [
            "string",
            "null"
          ]
        },
        "reactions": {
          "type": "object",
          "additionalProperties": true
        },
        "createdAt": {
          "type": "integer",
          "format": "int64"
        },
        "editedAt": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        }
      }
    },
    "Participant": {
      "type": "object",
      "properties": {
        "access": {
          "type": "string",
          "enum": [
            "ReadWrite",
            "Read"
          ]
        },
        "notify": {
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "string",
              "enum": [
                "MentionsOnly"
              ]
            }
          ]
        },
        "isUnread": {
          "type": "boolean"
        },
        "joinedAt": {
          "type": "integer",
          "format": "int64"
        },
        "readUntil": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        }
      }
    }
  }
}