{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postproxy-dev/json-schema/postproxy-dev-queue-update-request-schema.json",
  "title": "QueueUpdateRequest",
  "description": "Request body for updating a queue. Any changes to timezone or timeslots trigger a rearrangement of all queued posts.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postproxy-dev-queues-api-openapi.yml#/components/schemas/QueueUpdateRequest",
  "type": "object",
  "properties": {
    "post_queue": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Queue name"
        },
        "description": {
          "type": "string",
          "description": "Description"
        },
        "timezone": {
          "type": "string",
          "description": "IANA timezone"
        },
        "enabled": {
          "type": "boolean",
          "description": "Pause (false) or unpause (true) the queue"
        },
        "jitter": {
          "type": "integer",
          "description": "Random offset in minutes (0-60)",
          "minimum": 0,
          "maximum": 60
        },
        "queue_timeslots_attributes": {
          "type": "array",
          "description": "Add timeslots (day + time) or remove them (id + _destroy: true)",
          "items": {
            "$ref": "#/$defs/QueueTimeslotInput"
          }
        }
      }
    }
  },
  "$defs": {
    "QueueTimeslotInput": {
      "type": "object",
      "description": "Timeslot attributes for create/update. To add, pass day and time; to remove, pass id and _destroy: true.",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Existing timeslot ID (required when removing)"
        },
        "day": {
          "type": "integer",
          "description": "Day of the week: 0=Sunday through 6=Saturday",
          "minimum": 0,
          "maximum": 6
        },
        "time": {
          "type": "string",
          "description": "Time in 24-hour HH:MM format"
        },
        "_destroy": {
          "type": "boolean",
          "description": "Pass true together with id to remove the timeslot"
        }
      }
    }
  }
}