{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eusend-dev/json-schema/eusend-dev-create-topic-request-schema.json",
  "title": "CreateTopicRequest",
  "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/CreateTopicRequest",
  "type": "object",
  "required": [
    "name",
    "default_subscription"
  ],
  "additionalProperties": false,
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 50,
      "description": "What the recipient reads on the unsubscribe page. Unique within the organization."
    },
    "default_subscription": {
      "type": "string",
      "enum": [
        "opt_in",
        "opt_out"
      ],
      "description": "`opt_in` reaches everyone until they unsubscribe; `opt_out` reaches nobody until they explicitly subscribe. **Cannot be changed after creation** — flipping it would start mailing every contact who never asked, and nothing stored says which of them would have agreed."
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 200
    },
    "visibility": {
      "type": "string",
      "enum": [
        "public",
        "private"
      ],
      "default": "private",
      "description": "Whether the topic is listed on the hosted unsubscribe page to a contact who is not already opted in. A contact who explicitly opted in always sees it."
    }
  }
}