{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postzen-dev/json-schema/postzen-dev-queue-create-request-schema.json",
  "title": "QueueCreateRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postzen-dev-queues-api-openapi.yml#/components/schemas/QueueCreateRequest",
  "type": "object",
  "required": [
    "profileId",
    "timezone",
    "slots"
  ],
  "properties": {
    "profileId": {
      "type": "string",
      "description": "Profile the queue belongs to."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "default": "Default Queue"
    },
    "description": {
      "type": "string",
      "maxLength": 500
    },
    "timezone": {
      "type": "string",
      "description": "IANA timezone. Rejected if unknown — queues never silently fall back to UTC."
    },
    "slots": {
      "type": "array",
      "maxItems": 56,
      "items": {
        "$ref": "#/$defs/QueueSlot"
      },
      "description": "Weekly slots. May be empty; a queue with no slots accepts no queued posts until slots are added."
    },
    "active": {
      "type": "boolean",
      "default": true
    },
    "setAsDefault": {
      "type": "boolean",
      "description": "Make this the profile's default queue. The first queue on a profile becomes default regardless."
    }
  },
  "$defs": {
    "QueueSlot": {
      "type": "object",
      "required": [
        "dayOfWeek",
        "time"
      ],
      "properties": {
        "dayOfWeek": {
          "type": "integer",
          "minimum": 0,
          "maximum": 6,
          "description": "Day of the week, 0 = Sunday through 6 = Saturday."
        },
        "time": {
          "type": "string",
          "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
          "description": "24-hour wall-clock time (`HH:mm`) in the queue's timezone."
        }
      }
    }
  }
}