{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "/schemas/3.0.1/brand/revocation-notification.json",
  "title": "Revocation Notification",
  "description": "Payload sent by a rights holder to a buyer's revocation_webhook when rights are revoked. The buyer must cease creative delivery by effective_at. Partial revocation is supported — if revoked_uses is present, only those uses are revoked.",
  "type": "object",
  "properties": {
    "idempotency_key": {
      "type": "string",
      "description": "Sender-generated key stable across retries of the same revocation notification. Rights holders MUST generate a cryptographically random value (UUID v4 recommended) per distinct revocation event and reuse the same key when retrying delivery. Buyers MUST dedupe by this key, scoped to the authenticated sender identity (HMAC secret or Bearer credential); keys from different senders are independent.",
      "minLength": 16,
      "maxLength": 255,
      "pattern": "^[A-Za-z0-9_.:-]{16,255}$"
    },
    "rights_id": {
      "type": "string",
      "description": "The revoked rights grant identifier",
      "x-entity": "rights_grant"
    },
    "brand_id": {
      "type": "string",
      "description": "Brand identifier of the rights subject",
      "x-entity": "rights_holder_brand"
    },
    "reason": {
      "type": "string",
      "description": "Human-readable reason for revocation"
    },
    "effective_at": {
      "type": "string",
      "format": "date-time",
      "description": "When the revocation takes effect. Immediate revocations use current time. Grace periods use a future time. The buyer must stop serving creative using these rights by this time."
    },
    "revoked_uses": {
      "type": "array",
      "description": "If present, only these uses are revoked (partial revocation). If absent, all uses under the grant are revoked.",
      "items": {
        "$ref": "/schemas/3.0.1/enums/right-use.json"
      },
      "minItems": 1
    },
    "context": {
      "$ref": "/schemas/3.0.1/core/context.json"
    },
    "ext": {
      "$ref": "/schemas/3.0.1/core/ext.json"
    }
  },
  "required": ["idempotency_key", "rights_id", "brand_id", "reason", "effective_at"],
  "additionalProperties": true
}
