{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/ScheduleCallbackRequest",
  "title": "ScheduleCallbackRequest",
  "required": [
    "customerName",
    "callbackNumber",
    "timezone",
    "scheduleDate",
    "startTime",
    "endTime",
    "queueId"
  ],
  "type": "object",
  "properties": {
    "customerName": {
      "type": "string",
      "description": "Name of the Customer for which callback has to be scheduled. Max customer name length should be 250 character",
      "example": "John Doe"
    },
    "callbackNumber": {
      "type": "string",
      "description": "Customer's phone number for the callback. Allows an optional country code followed by digits (0-9) and the special characters: space, hyphen -, parentheses ( and ), and period ., ensuring the total length is between 7 and 15 characters.",
      "example": "+12(345)67-890"
    },
    "timezone": {
      "type": "string",
      "description": "Valid IANA timezone name",
      "example": "America/New_York"
    },
    "scheduleDate": {
      "type": "string",
      "format": "date",
      "description": "Scheduled date in ISO-8601 (YYYY-MM-DD) format. This must be a valid date in local time zone and within 31 days from current date",
      "example": "2025-03-28"
    },
    "startTime": {
      "type": "string",
      "format": "time",
      "description": "Scheduled start time in ISO-8601 (HH:mm:ss) format. Start time must be at least 30 minutes in the future from current time.",
      "example": "17:45:15"
    },
    "endTime": {
      "type": "string",
      "format": "time",
      "description": "Scheduled end time in ISO-8601 (HH:mm:ss) format. End time must be at least 30 minutes after the startTime and must not exceed 8 hours after startTime.",
      "example": "16:50:55"
    },
    "queueId": {
      "type": "string",
      "description": "Unique identifier for the queue to which the callback is associated.",
      "example": "123e4567-e89b-12d3-a456-426614174000"
    },
    "callbackReason": {
      "type": "string",
      "description": "Reason for the callback request. This is optional and can be used to provide additional context.",
      "example": "Credit Card Issue"
    },
    "sourceInteraction": {
      "type": "string",
      "format": "uuid",
      "description": "Source interaction ID for the callback. This is optional and can be used to link the callback to a specific interaction. This should be a valid UUID.",
      "example": "123e4567-e89b-12d3-a456-426614174000"
    },
    "assigneeAgent": {
      "type": "string",
      "format": "uuid",
      "description": "The unique identifier of the specific agent (CI userId), who should be assigned to handle the callback. This field is optional and is primarily used for personal callbacks.",
      "example": "123e4567-e89b-12d3-a456-426614174000"
    }
  }
}