{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/blackbaud/json-schema/blackbaud-create-event-request-schema.json",
  "title": "CreateEventRequest",
  "description": "Represents the request body for creating or updating a volunteer event.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/blackbaud-volunteer-api-openapi.yml#/components/schemas/CreateEventRequest",
  "required": [
    "name"
  ],
  "type": "object",
  "properties": {
    "event_id": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The event ID. null when creating a new event.",
      "format": "int32"
    },
    "segment_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The affiliate segment ID."
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The name of the event."
    },
    "charity_id": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The charity ID for the event's benefiting organization.",
      "format": "int32"
    },
    "nonprofit_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The nonprofit ID (GUID) of the charity to associate with this event. Takes precedence over `charityId`, `registrationNumber`, and `benefittingOrganization`.",
      "format": "uuid"
    },
    "registration_number": {
      "type": [
        "string",
        "null"
      ],
      "description": "The charity registration number for the event's benefiting organization."
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "A description of the event."
    },
    "show_in_search": {
      "type": "boolean",
      "description": "Indicates whether the event should appear in Search Opportunities results."
    },
    "allow_family_and_friends_to_attend": {
      "type": "boolean",
      "description": "Indicates whether guests can participate in the event."
    },
    "meetup_instructions": {
      "type": [
        "string",
        "null"
      ],
      "description": "Instructions for participants on where and how to meet at the event location."
    },
    "original_start_date": {
      "type": [
        "string",
        "null"
      ],
      "description": "The original start date of the event in the event's local time zone (ISO 8601 date string)."
    },
    "original_end_date": {
      "type": [
        "string",
        "null"
      ],
      "description": "The original end date of the event in the event's local time zone (ISO 8601 date string)."
    },
    "start_hours": {
      "type": "integer",
      "description": "The hour of the event start time (0–23).",
      "format": "int32"
    },
    "end_hours": {
      "type": "integer",
      "description": "The hour of the event end time (0–23).",
      "format": "int32"
    },
    "start_minutes": {
      "type": "integer",
      "description": "The minute of the event start time (0–59).",
      "format": "int32"
    },
    "end_minutes": {
      "type": "integer",
      "description": "The minute of the event end time (0–59).",
      "format": "int32"
    },
    "start_day": {
      "type": "integer",
      "description": "The day offset (relative to the recurrence start) on which the event begins.",
      "format": "int32"
    },
    "original_timezone": {
      "type": [
        "string",
        "null"
      ],
      "description": "The IANA or Windows timezone identifier for the event's local time zone."
    },
    "original_registration_start_date": {
      "type": [
        "string",
        "null"
      ],
      "description": "The original registration open date in the event's local time zone (ISO 8601 date string)."
    },
    "original_registration_end_date": {
      "type": [
        "string",
        "null"
      ],
      "description": "The original registration close date in the event's local time zone (ISO 8601 date string)."
    },
    "registration_start_hours": {
      "type": "integer",
      "description": "The hour of the registration start time (0–23).",
      "format": "int32"
    },
    "registration_end_hours": {
      "type": "integer",
      "description": "The hour of the registration end time (0–23).",
      "format": "int32"
    },
    "registration_start_minutes": {
      "type": "integer",
      "description": "The minute of the registration start time (0–59).",
      "format": "int32"
    },
    "registration_end_minutes": {
      "type": "integer",
      "description": "The minute of the registration end time (0–59).",
      "format": "int32"
    },
    "allow_log_hours_after_end_event": {
      "type": "boolean",
      "description": "Indicates whether participants can log volunteer hours after the event has ended."
    },
    "event_image_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "The URL of the event's cover image."
    },
    "recurrence_instructions": {
      "$ref": "#/$defs/RecurrenceInstructions"
    },
    "location": {
      "$ref": "#/$defs/EventLocation"
    },
    "contacts": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Contact"
      },
      "description": "The list of event contacts."
    },
    "virtual": {
      "type": "boolean",
      "description": "Indicates whether the event is held virtually."
    },
    "schedule_change_type": {
      "type": "integer",
      "description": "The type of schedule change being applied. Available Values: 0: None, 1: Update, 2: Replace.",
      "format": "int32"
    },
    "default_shift_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The default shift name for this event."
    },
    "default_shift_capacity": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The default maximum number of participants per shift. Null for unlimited capacity.",
      "format": "int32"
    },
    "default_shift_hours": {
      "type": [
        "number",
        "null"
      ],
      "description": "The default number of volunteer hours to log per shift. Null if not specified.",
      "format": "double"
    },
    "default_shift_cra_eligible": {
      "type": "boolean",
      "description": "Indicates whether shifts for this event are eligible for Community Reinvestment Act (CRA) tracking."
    },
    "event_disclaimer": {
      "type": [
        "string",
        "null"
      ],
      "description": "A disclaimer or terms statement displayed to participants during registration."
    },
    "benefitting_organization": {
      "type": [
        "string",
        "null"
      ],
      "description": "The name of the organization that benefits from this volunteer event."
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Contact": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The contact ID. null when adding a new contact.",
          "format": "int32"
        },
        "first_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The first name of the contact."
        },
        "last_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The last name of the contact."
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "description": "The email address of the contact."
        },
        "phone_number": {
          "type": [
            "string",
            "null"
          ],
          "description": "The phone number of the contact."
        },
        "reason_to_contact": {
          "type": [
            "string",
            "null"
          ],
          "description": "The reason or role for which this person should be contacted."
        }
      },
      "additionalProperties": false,
      "description": "Represents a contact person associated with a volunteer event creation request."
    },
    "Day": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The day of the week identifier (e.g., 0 = Sunday, 1 = Monday, …, 6 = Saturday).",
          "format": "int32"
        },
        "selected": {
          "type": "boolean",
          "description": "Indicates whether this day is selected in the recurrence pattern."
        }
      },
      "additionalProperties": false,
      "description": "Represents a day-of-the-week selection for a weekly recurrence pattern."
    },
    "EventLocation": {
      "type": "object",
      "properties": {
        "address1": {
          "type": [
            "string",
            "null"
          ],
          "description": "The first line of the event address."
        },
        "address2": {
          "type": [
            "string",
            "null"
          ],
          "description": "The second line of the event address."
        },
        "city": {
          "type": [
            "string",
            "null"
          ],
          "description": "The city of the event address."
        },
        "state": {
          "type": [
            "string",
            "null"
          ],
          "description": "The state or province of the event address."
        },
        "postal_code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The ZIP or postal code of the event address."
        },
        "country_code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The ISO 3166-1 alpha-2 country code of the event address."
        },
        "latitude": {
          "type": [
            "number",
            "null"
          ],
          "description": "The latitude coordinate of the event address. Null if not specified.",
          "format": "float"
        },
        "longitude": {
          "type": [
            "number",
            "null"
          ],
          "description": "The longitude coordinate of the event address. Null if not specified.",
          "format": "float"
        },
        "county": {
          "type": [
            "string",
            "null"
          ],
          "description": "The county or district of the event address."
        },
        "census_msa_code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The US Census Metropolitan Statistical Area (MSA) code for the event address."
        },
        "census_tract_code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The US Census tract code for the event address."
        },
        "census_county_code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The US Census county code for the event address."
        },
        "census_state_code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The US Census state code for the event address."
        }
      },
      "additionalProperties": false,
      "description": "Represents the location of a volunteer event."
    },
    "Month": {
      "type": "object",
      "properties": {
        "instance_of_month": {
          "type": "integer",
          "description": "The instance of the day-of-the-week within the month (e.g., 1 = first Monday, 2 = second Monday, …, 5 = final Monday).",
          "format": "int32"
        },
        "day_of_week": {
          "type": "integer",
          "description": "The day of the week for this monthly recurrence selection (e.g., 0 = Sunday, 1 = Monday, …, 6 = Saturday).",
          "format": "int32"
        }
      },
      "additionalProperties": false,
      "description": "Represents a monthly recurrence selection, specifying which day-of-the-week instance within a month is selected."
    },
    "RecurrenceInstructions": {
      "type": "object",
      "properties": {
        "recurrence_type_id": {
          "type": "integer",
          "description": "The recurrence type ID. Available Values: 1: Daily, 2: Weekly, 3: Monthly",
          "format": "int32"
        },
        "separation_count": {
          "type": "integer",
          "description": "The interval between recurrences (e.g., every 2 days/weeks/months).",
          "format": "int32"
        },
        "number_of_ocurrence": {
          "type": "integer",
          "description": "The total number of occurrences for the recurring event.",
          "format": "int32"
        },
        "recurrence_start_date": {
          "type": [
            "string",
            "null"
          ],
          "description": "The start date of the recurrence series (ISO 8601 date string)."
        },
        "selected_days_of_week": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Day"
          },
          "description": "The days of the week selected for weekly recurrences."
        },
        "month_selections": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Month"
          },
          "description": "The monthly recurrence patterns, used when recurrence type is monthly."
        }
      },
      "additionalProperties": false,
      "description": "Defines the recurrence schedule for a repeating volunteer event."
    }
  }
}