# Queues API

> Recurring posting schedules. Posts created with queue: true take the next free slot.

Base URL: `https://api.socialit.com/v1`. Authenticate with `Authorization: Bearer <API key or OAuth token>`.

## List queues

`GET /queues`

Access: `read` · MCP tool: `list-queues` · Zernio: `GET /v1/queue/slots`

### Query parameters

- `page` (integer; ≥ 1): Page number
- `limit` (integer; 1–100): Items per page (max 100)
- `sort` (string; one of created_at, name)
- `order` (string; one of asc, desc)
- `match` (string; one of all, or): Combine filters with AND (default) or OR
- `profile_id` (string)
- `standalone` (boolean)
- `active` (boolean)

```bash
curl "https://api.socialit.com/v1/queues" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY"
```

Response 200:

```json
{
  "object": "list",
  "data": [
    {
      "object": "queue",
      "id": "string",
      "profile_id": "string",
      "name": "string",
      "timezone": "Europe/Prague",
      "active": true,
      "default": true,
      "slots": [
        {
          "day_of_week": 1,
          "time": "string"
        }
      ],
      "next_slots": [
        "string"
      ],
      "posts_count": 1,
      "reshuffled_count": 1,
      "created_at": "2026-10-13T09:00:00.000Z",
      "updated_at": "2026-10-13T09:00:00.000Z"
    }
  ],
  "page": 1,
  "limit": 1,
  "total": 1,
  "has_more": true,
  "next_page_url": "https://example.com",
  "previous_page_url": "https://example.com"
}
```

## Create a queue

`POST /queues`

The first queue of a profile (or of the standalone bucket) becomes its default.

Access: `write` · MCP tool: `create-queue` · Zernio: `POST /v1/queue/slots`

### Headers

- `Idempotency-Key` (string; ≤ 255 characters): Unique key (for example a UUID) that makes retries safe: a repeated request with the same key and body returns the first response (Idempotent-Replayed: true) for 24 hours.

### Body

- `profile_id` (string | null; ≤ 80 characters)
- `name` (string; required; 1–100 characters)
- `timezone` (string; ≤ 64 characters)
- `slots` (array of object; ≤ 200 items)
  - `slots[].day_of_week` (integer; required; 0–6)
  - `slots[].time` (string; required; pattern ^([01]\d|2[0-3]):[0-5]\d$)
- `active` (boolean)
- `default` (boolean)

```bash
curl -X POST "https://api.socialit.com/v1/queues" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "profile_id": "string",
    "name": "string",
    "timezone": "Europe/Prague",
    "slots": [
      {
        "day_of_week": 0,
        "time": "string"
      }
    ],
    "active": true
  }'
```

Response 201:

```json
{
  "object": "queue",
  "id": "string",
  "profile_id": "string",
  "name": "string",
  "timezone": "Europe/Prague",
  "active": true,
  "default": true,
  "slots": [
    {
      "day_of_week": 1,
      "time": "string"
    }
  ],
  "next_slots": [
    "string"
  ],
  "posts_count": 1,
  "reshuffled_count": 1,
  "created_at": "2026-10-13T09:00:00.000Z",
  "updated_at": "2026-10-13T09:00:00.000Z"
}
```

## Preview upcoming free slots

`GET /queues/preview`

Access: `read` · MCP tool: `preview-queue` · Zernio: `GET /v1/queue/preview`

### Query parameters

- `queue_id` (string)
- `profile_id` (string)
- `count` (integer; 1–100)

```bash
curl "https://api.socialit.com/v1/queues/preview" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY"
```

Response 200:

```json
{
  "object": "queue_preview",
  "queue_id": "string",
  "profile_id": "string",
  "timezone": "Europe/Prague",
  "slots": [
    "string"
  ]
}
```

## Get the next free slot

`GET /queues/next-slot`

Informational: to book a slot create the post with queue: true (slot assignment is atomic there).

Access: `read` · MCP tool: `get-next-queue-slot` · Zernio: `GET /v1/queue/next-slot`

### Query parameters

- `queue_id` (string)
- `profile_id` (string)

```bash
curl "https://api.socialit.com/v1/queues/next-slot" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY"
```

Response 200:

```json
{
  "object": "queue_slot",
  "queue_id": "string",
  "profile_id": "string",
  "timezone": "Europe/Prague",
  "slot": "2026-10-13T09:00:00.000Z"
}
```

## Get a queue

`GET /queues/{id}`

Access: `read` · MCP tool: `get-queue`

### Path parameters

- `id` (string; required; 1–80 characters): queue id (que_…)

```bash
curl "https://api.socialit.com/v1/queues/que_2Jx0Fq5Pz8vYkB3mN6rT1wQ9sLd" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY"
```

Response 200:

```json
{
  "object": "queue",
  "id": "string",
  "profile_id": "string",
  "name": "string",
  "timezone": "Europe/Prague",
  "active": true,
  "default": true,
  "slots": [
    {
      "day_of_week": 1,
      "time": "string"
    }
  ],
  "next_slots": [
    "string"
  ],
  "posts_count": 1,
  "reshuffled_count": 1,
  "created_at": "2026-10-13T09:00:00.000Z",
  "updated_at": "2026-10-13T09:00:00.000Z"
}
```

## Update a queue

`PATCH /queues/{id}`

Rename, change timezone or slots, (de)activate, set as default; reshuffle_existing moves already-queued posts onto the new slots.

Access: `write` · MCP tool: `update-queue` · Zernio: `PUT /v1/queue/slots`

### Path parameters

- `id` (string; required; 1–80 characters): queue id (que_…)

### Body

- `name` (string; 1–100 characters)
- `timezone` (string; ≤ 64 characters)
- `slots` (array of object; ≤ 200 items)
  - `slots[].day_of_week` (integer; required; 0–6)
  - `slots[].time` (string; required; pattern ^([01]\d|2[0-3]):[0-5]\d$)
- `active` (boolean)
- `default` (boolean)
- `set_as_default` (boolean): Zernio alias of default
- `reshuffle_existing` (boolean)

```bash
curl -X PATCH "https://api.socialit.com/v1/queues/que_2Jx0Fq5Pz8vYkB3mN6rT1wQ9sLd" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "timezone": "Europe/Prague",
    "slots": [
      {
        "day_of_week": 0,
        "time": "string"
      }
    ],
    "active": true,
    "default": true
  }'
```

Response 200:

```json
{
  "object": "queue",
  "id": "string",
  "profile_id": "string",
  "name": "string",
  "timezone": "Europe/Prague",
  "active": true,
  "default": true,
  "slots": [
    {
      "day_of_week": 1,
      "time": "string"
    }
  ],
  "next_slots": [
    "string"
  ],
  "posts_count": 1,
  "reshuffled_count": 1,
  "created_at": "2026-10-13T09:00:00.000Z",
  "updated_at": "2026-10-13T09:00:00.000Z"
}
```

## Delete a queue

`DELETE /queues/{id}`

Access: `write` · MCP tool: `delete-queue` · Zernio: `DELETE /v1/queue/slots`

### Path parameters

- `id` (string; required; 1–80 characters): queue id (que_…)

```bash
curl -X DELETE "https://api.socialit.com/v1/queues/que_2Jx0Fq5Pz8vYkB3mN6rT1wQ9sLd" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY"
```

Response 200:

```json
{
  "object": "queue",
  "id": "string",
  "deleted": true
}
```


---

Source: https://socialit.com/docs/api-reference/queues/
