---
title: "Reorder Chat Queue"
method: PATCH
path: "/v1/replica/{id}/chats/{chatId}/queue/reorder"
tags: ["Replica"]
---

# Reorder Chat Queue

`PATCH /v1/replica/{id}/chats/{chatId}/queue/reorder`

Moves a queued message to a new zero-based position.

## Path parameters

- `id` string, uuid, required
- `chatId` string, required

## Request body

- ReorderQueueRequest — Request to move a queued message to a new position.
  - `messageId` string, required — Queued message ID.
  - `position` integer, required — Zero-based target position.

## Response `200`

Queue reordered successfully

- QueueMutationResponse — Result of a queue mutation.
  - `success` boolean, required — Whether the queue mutation changed the queue.
  - `queue` QueuedMessageInfo[], required
    - `id` string, required — Unique queued message ID.
    - `message` string, required — Queued message text.
    - `queuedAt` string, date-time, required — When the message was queued.
    - `senderUserId` string — Identifier of the user who queued the message.
    - `senderEmail` string — Email of the user who queued the message.
    - `senderDisplayName` string — Display name of the user who queued the message.

## Other responses

- `400` — Bad request - Missing or invalid parameters
- `401` — Unauthorized - Invalid or missing API key
- `404` — Resource not found
- `500` — Internal server error

---

[API](https://skmtc.dev/tryreplicas/apis/replica-api.md) · [All operations](https://skmtc.dev/tryreplicas/apis/replica-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tryreplicas/replica-api/revisions/aa3b4c932f7a/schema)
