---
title: "Get a queue schedule"
method: GET
path: "/v1/queue/slots"
tags: ["Queues"]
---

# Get a queue schedule

`GET /v1/queue/slots`

## Request

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

Returns the queue selected by `queueId`, or the profile's default queue when `queueId` is omitted. With `all=true` every queue on the profile is returned instead. `nextSlots` holds the next five instants the queue would hand out, already skipping occupied slots; a paused or slotless queue returns an empty array.

## Query parameters

- `profileId` string, required
- `queueId` string
- `all` boolean

## Response `200`

Queue schedule returned.

- union: A single schedule, or every schedule on the profile when `all=true`.
  - QueueScheduleResponse
    - `exists` boolean, required: False when the profile has no matching queue; `schedule` is then null.
    - `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: Next five instants this queue would hand out, occupied slots already skipped.
  - QueueSchedulesResponse
    - `exists` boolean, required
    - `schedules` QueueScheduleWithNextSlots[], 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

## 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)
