{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/phone-com/json-schema/phone-com-queue-schema.json",
  "title": "Queue",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/phone-com-queues-api-openapi.yml#/components/schemas/Queue",
  "type": "object",
  "properties": {
    "name": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 30,
      "description": "Name of queue"
    },
    "greeting": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1,
          "description": "Recording ID. Read-only."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Name of recording"
        }
      },
      "description": "Greeting to be played when caller first connects"
    },
    "hold_music": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1,
          "description": "Recording ID. Read-only."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Name of music file"
        }
      },
      "description": "Hold Music to be played while callers are waiting"
    },
    "max_hold_time": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 60,
      "maximum": 3600,
      "description": "Maximum hold time in seconds. If provided, must equal one of: 60, 120, 180, 240, 300, 600, 900, 1200, 1800, 2700, 3600. Default is 300"
    },
    "caller_id_type": {
      "enum": [
        "called_number",
        "calling_number"
      ],
      "description": "Caller id type to show members. If provided, must equal one of: 'called_number', 'calling_number'. Default is 'calling_number'"
    },
    "ring_time": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 5,
      "maximum": 90,
      "description": "Number of seconds to ring a member before cycling to the next member. If provided, must equal one of: 5, 10, 15, 20, 25, 30. Default is 5"
    },
    "strategy": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "ringall",
        "leastrecent",
        "fewestcalls",
        "random",
        "rrmemory"
      ],
      "description": "Queue strategy. Allowed values: ringall (rings all members of the queue), leastrecent (assigns the call to the agent who has been idle the most), fewestcalls (assigns the call to the agent who has had the least amount of calls), random (assigns calls to each agent in a random order), rrmemory (distributes calls evenly across all members of the queue)"
    },
    "members": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "phone_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "Phone number"
          },
          "extension": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 1,
                "description": "Extension ID"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Extension name"
              },
              "extension": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 1,
                "description": "Extension number"
              }
            },
            "description": "Extension that this member refers to"
          }
        }
      },
      "description": "Array of Member Objects"
    }
  },
  "required": [
    "name"
  ]
}