{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ometria/json-schema/ometria-unsubscribes-schema.json",
  "title": "Unsubscribes",
  "description": "Describes an Unsubscribe record.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ometria-unsubscribes-api-openapi.yml#/components/schemas/Unsubscribes",
  "type": "object",
  "properties": {
    "profile_id": {
      "type": "string",
      "description": "The profile id of the contact whom has unsubscribed."
    },
    "email_address": {
      "type": "string",
      "description": "The email address of the contact whom has unsubscribed."
    },
    "type": {
      "type": "string",
      "description": "The type of unsubscribe event. This indicates where the contact unsubscribed (e.g., \"preferences_centre\").",
      "enum": [
        "preferences_centre",
        "app",
        "list_unsubscribe",
        "link_unsubscribe",
        "stopword_unsubscribe_TF",
        "stopword_unsubscribe_DO"
      ]
    },
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp of the unsubscribe event."
    },
    "reason": {
      "type": "string",
      "description": "The reason given for unsubscribing."
    },
    "reason_text": {
      "type": "string",
      "description": "The reason provided for unsubscribing in the free-text field."
    },
    "customer_id": {
      "type": "string",
      "description": "The universal customer ID for this contact."
    }
  }
}