{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eusend-dev/json-schema/eusend-dev-topic-schema.json",
  "title": "Topic",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eusend-dev-topics-api-openapi.yml#/components/schemas/Topic",
  "type": "object",
  "required": [
    "id",
    "name",
    "description",
    "defaultSubscription",
    "visibility",
    "createdAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "defaultSubscription": {
      "type": "string",
      "enum": [
        "opt_in",
        "opt_out"
      ],
      "description": "What a contact who has never expressed a preference receives. Fixed at creation."
    },
    "visibility": {
      "type": "string",
      "enum": [
        "public",
        "private"
      ]
    },
    "subscriberCount": {
      "type": "integer",
      "description": "Contacts who explicitly opted in. Returned by create and list, not by get. For an `opt_out` topic this is the reachable audience; for an `opt_in` topic it is not, since everyone who never chose is subscribed too."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}