---
title: "Update a queue"
method: PUT
path: "/v1/queue/slots"
tags: ["Queues"]
---

# Update a queue

`PUT /v1/queue/slots`

## Request

- Base URL: `https://api.postzen.dev`
- URL: `https://api.postzen.dev/v1/queue/slots`
- Auth: HTTP bearer

Replaces a queue's timezone and slots, and optionally renames, pauses, or promotes it to default. With `reshuffleExisting: true` the queue's future scheduled posts are re-placed onto the new schedule in their existing order; posts that are already publishing, published, or failed are never moved, and at most 200 posts may move in one call. Validation and slot assignment both run before the first write, so a rejected update leaves the queue untouched. This endpoint requires a read-write API key.

## Request body

- QueueUpdateRequest
  - `profileId` string, required: Profile that owns the queue.
  - `queueId` string: Queue to update. Defaults to the profile's default queue.
  - `name` string
  - `description` string: Send an empty string to clear the description.
  - `timezone` string, required
  - `slots` QueueSlot[], required: Replaces the queue's slots entirely.
    - `dayOfWeek` integer, required: Day of the week, 0 = Sunday through 6 = Saturday.
    - `time` string, required: 24-hour wall-clock time (`HH:mm`) in the queue's timezone.
  - `active` boolean
  - `setAsDefault` boolean
  - `reshuffleExisting` boolean: Re-place the queue's future scheduled posts onto the new schedule. Only applies when the timezone or slots actually changed.

## Response `200`

Queue updated.

- QueueUpdateResponse
  - `success` boolean, required
  - `schedule` QueueSchedule, required
    - `_id` string, required
    - `profileId` string, required
    - `name` string, required
    - `description` string
    - `timezone` string, required: IANA timezone the slots are evaluated in, for example `America/Edmonton`.
    - `slots` QueueSlot[], required: Weekly slots, deduplicated and sorted by day then time.
      - `dayOfWeek` integer, required: Day of the week, 0 = Sunday through 6 = Saturday.
      - `time` string, required: 24-hour wall-clock time (`HH:mm`) in the queue's timezone.
    - `active` boolean, required: Paused queues reject new queue-mode posts and report no upcoming slots.
    - `isDefault` boolean, required: Whether this queue answers when `queueId` is omitted.
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
  - `nextSlots` string[], required
  - `reshuffledCount` integer, required: How many scheduled posts were moved onto the new schedule.

## Other responses

- `400`: Invalid request.
- `401`: Missing or invalid API key.
- `403`: The API key does not have sufficient permission or profile access.
- `404`: Resource not found.
- `429`: Rate limit exceeded. Retry after the interval indicated by the `Retry-After` header.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/postzen/apis/postzen-public-api.md) · [All operations](https://skmtc.dev/postzen/apis/postzen-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postzen/apis/postzen-public-api/revisions/40863e3710ec?raw)
