{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/commsharbor/json-schema/commsharbor-preference-state-schema.json",
  "title": "PreferenceState",
  "description": "What the signed capability reveals. No login, and no email address is exposed.",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/commsharbor-preferences-api-openapi.yml#/components/schemas/PreferenceState",
  "type": "object",
  "properties": {
    "marketing_enabled": {
      "type": "boolean",
      "description": "Whether marketing may be sent."
    },
    "unsubscribed_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "When the contact unsubscribed."
    },
    "expires_at": {
      "type": "string",
      "description": "When this capability stops working (UTC)."
    }
  },
  "required": [
    "marketing_enabled",
    "unsubscribed_at",
    "expires_at"
  ]
}