{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/blackbaud/main/json-schema/blackbaud-create-constituent-consents-request-schema.json",
  "title": "CreateConstituentConsentsRequest",
  "description": "Model used by SkyApi to create consent records for multiple constituents",
  "x-generated": "2026-10-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/blackbaud-consent-api-openapi.yml#/components/schemas/CreateConstituentConsentsRequest",
  "required": [
    "channel"
  ],
  "type": "object",
  "properties": {
    "channel": {
      "enum": [
        "Email",
        "Mail",
        "SMS",
        "Phone",
        "AutoPhone",
        "Social",
        "DataProcessing",
        "Other"
      ],
      "type": "string",
      "description": "The name of the channel.<p>Members:</p><ul><li><i>Email</i> - Email</li><li><i>Mail</i> - Mail</li><li><i>SMS</i> - SMS</li><li><i>Phone</i> - Phone</li><li><i>AutoPhone</i> - AutoPhone</li><li><i>Social</i> - Social media</li><li><i>DataProcessing</i> - Data processing</li><li><i>Other</i> - Other</li></ul>"
    },
    "category": {
      "maxLength": 128,
      "type": [
        "string",
        "null"
      ],
      "description": "The name of the category."
    },
    "source": {
      "maxLength": 128,
      "type": [
        "string",
        "null"
      ],
      "description": "The name of the source."
    },
    "privacy_policy": {
      "maxLength": 7999,
      "type": [
        "string",
        "null"
      ],
      "description": "Privacy policy for consent."
    },
    "consent_statement": {
      "maxLength": 7999,
      "type": [
        "string",
        "null"
      ],
      "description": "Consent statement for consent."
    },
    "constituent_requests": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/CreateConstituentConsentRequest"
      },
      "description": "Collection of create constituent consent requests"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "CreateConstituentConsentRequest": {
      "required": [
        "consent_date",
        "consent_response",
        "constituent_id"
      ],
      "type": "object",
      "properties": {
        "constituent_id": {
          "type": "string",
          "description": "The constituent identifier"
        },
        "consent_date": {
          "type": "string",
          "description": "Date on which the consent response was provided.",
          "format": "date-time"
        },
        "consent_response": {
          "enum": [
            "OptIn",
            "OptOut",
            "NoResponse"
          ],
          "type": "string",
          "description": "The consent response provided by the constituent.<p>Members:</p><ul><li><i>OptIn</i> - Opt-in</li><li><i>OptOut</i> - Opt-out</li><li><i>NoResponse</i> - No response</li></ul>"
        }
      },
      "additionalProperties": false,
      "description": "Model used by SkyApi to create a consent record for a given constituent"
    }
  }
}