---
title: "Create a queue"
method: POST
path: "/v1/queue/slots"
tags: ["Queues"]
---

# Create a queue

`POST /v1/queue/slots`

## Request

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

Creates a posting queue on a profile. A profile may hold up to 10 queues, each with up to 56 slots. The first queue on a profile automatically becomes its default. This endpoint requires a read-write API key.

## Request body

- QueueCreateRequest
  - `profileId` string, required: Profile the queue belongs to.
  - `name` string
  - `description` string
  - `timezone` string, required: IANA timezone. Rejected if unknown — queues never silently fall back to UTC.
  - `slots` QueueSlot[], required: Weekly slots. May be empty; a queue with no slots accepts no queued posts until slots are added.
    - `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: Make this the profile's default queue. The first queue on a profile becomes default regardless.

## Response `201`

Queue created.

- QueueWriteResponse
  - `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

## 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.
- `409`: The profile has reached its queue limit.
- `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)
