{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendraven-ai/json-schema/sendraven-ai-topic-schema.json",
  "title": "Topic",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sendraven-ai-topics-api-openapi.yml#/components/schemas/Topic",
  "type": "object",
  "required": [
    "id",
    "key",
    "name",
    "description",
    "default_subscribed",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Not used by any endpoint; topics are addressed by key."
    },
    "key": {
      "type": "string",
      "pattern": "^[a-z0-9-]+$",
      "description": "Unique within the workspace. The identifier used in paths, in topic on POST /v1/emails, in topic_key on campaigns and automations, and in unsubscribe links."
    },
    "name": {
      "type": "string",
      "description": "Shown to the person on the preference page."
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Shown under the name. null when not set."
    },
    "default_subscribed": {
      "type": "boolean",
      "description": "Whether someone with no recorded preference receives this topic. Defaults are never written out as rows, so changing this moves everyone who never chose."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}