{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/groundmail-dev/json-schema/groundmail-dev-list-category-opt-outs-response-schema.json",
  "title": "ListCategoryOptOutsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/groundmail-dev-suppressions-api-openapi.yml#/components/schemas/ListCategoryOptOutsResponse",
  "type": "object",
  "required": [
    "data",
    "has_more",
    "next_cursor"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CategoryOptOut"
      }
    },
    "has_more": {
      "type": "boolean"
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "$defs": {
    "CategoryOptOut": {
      "type": "object",
      "description": "A reader's one-click unsubscribe from one category of email. Sends in that category to the address are refused with 422 (`details.category_unsubscribed`) until it is removed.\n",
      "required": [
        "id",
        "type",
        "email",
        "category",
        "tenant",
        "created_at",
        "updated_at"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "type": {
          "type": "string",
          "enum": [
            "category_opt_out"
          ]
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "category": {
          "type": "string",
          "enum": [
            "product",
            "newsletter"
          ]
        },
        "tenant": {
          "type": [
            "string",
            "null"
          ],
          "description": "External id of the tenant whose email the reader left; `null` when account-wide."
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}