{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CreateCallQueueEssentialsObject",
  "title": "CreateCallQueueEssentialsObject",
  "type": "object",
  "required": [
    "name",
    "callPolicies",
    "queueSettings",
    "agents"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "CallQueue-1",
      "description": "Unique name for the call queue."
    },
    "phoneNumber": {
      "type": "string",
      "example": "+12225555309",
      "description": "Primary phone number of the call queue. Either a `phoneNumber` or `extension` is mandatory."
    },
    "extension": {
      "type": "string",
      "example": "5309",
      "description": "Primary phone extension of the call queue. Either a `phoneNumber` or extension is mandatory."
    },
    "languageCode": {
      "type": "string",
      "example": "en-US",
      "description": "Language code."
    },
    "firstName": {
      "type": "string",
      "example": "Hakim",
      "description": "First name to be shown when calls are forwarded out of this call queue. Defaults to \".\". This field has been deprecated. Please use `directLineCallerIdName` and `dialByName` instead."
    },
    "lastName": {
      "type": "string",
      "example": "Smith",
      "description": "Last name to be shown when calls are forwarded out of this call queue. Defaults to `phoneNumber` if set, otherwise defaults to call group name. This field has been deprecated. Please use `directLineCallerIdName` and `dialByName` instead."
    },
    "timeZone": {
      "type": "string",
      "example": "America/Chicago",
      "description": "Time zone for the call queue."
    },
    "callPolicies": {
      "$ref": "#/components/schemas/PostCallQueueEssentialCallPolicyObject",
      "description": "Policy controlling how calls are routed to `agents`."
    },
    "queueSettings": {
      "$ref": "#/components/schemas/CallQueueQueueSettingsObject",
      "description": "Overall call queue settings."
    },
    "agents": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/PostPersonPlaceVirtualLineCallQueueObject"
      },
      "description": "People, workspaces and virtual lines that are eligible to receive calls."
    },
    "callingLineIdPolicy": {
      "type": "string",
      "enum": [
        "DIRECT_LINE",
        "LOCATION_NUMBER",
        "CUSTOM"
      ],
      "description": "Which type of Calling Line ID Policy Selected for Call Queue.\n * `DIRECT_LINE` - Calling Line ID Policy will show the caller's direct line number.\n * `LOCATION_NUMBER` - Calling Line ID Policy will show the main number for the location.\n * `CUSTOM` - Calling Line ID Policy will show the value from the `callingLineIdPhoneNumber` field.\n"
    },
    "callingLineIdPhoneNumber": {
      "type": "string",
      "example": "+12072342368",
      "description": "Calling line ID Phone number which will be shown if CUSTOM is selected."
    },
    "allowAgentJoinEnabled": {
      "type": "boolean",
      "description": "Whether or not to allow agents to join or unjoin a queue."
    },
    "phoneNumberForOutgoingCallsEnabled": {
      "type": "boolean",
      "example": true,
      "description": "When `true`, indicates that the agent's configuration allows them to use the queue's Caller ID for outgoing calls."
    },
    "directLineCallerIdName": {
      "$ref": "#/components/schemas/DirectLineCallerIdNameObject",
      "description": "Settings for the direct line caller ID name to be shown for this call queue."
    },
    "dialByName": {
      "type": "string",
      "example": "Hakim Smith",
      "description": "The name to be used for dial by name functions. Characters of `%`,  `+`, `\\`, `\"` and Unicode characters are not allowed."
    }
  }
}