---
title: "Reorder queued message"
method: PATCH
path: "/v1/replica/{id}/chats/{chat_id}/queue/reorder"
tags: ["Message queue"]
---

# Reorder queued message

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

## Request

- Base URL: `https://api.replicas.dev`
- URL: `https://api.replicas.dev/v1/replica/{id}/chats/{chat_id}/queue/reorder`
- Auth: HTTP bearer

## Path parameters

- `id` string, uuid, required
- `chat_id` string, required

## Headers

- `X-Replicas-Api-Version` '2026-10-07'

## Request body

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

## Response `200`

Success

- 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.
    - `queued_at` string, date-time, required: When the message was queued.
    - `sender_user_id` string: Identifier of the user who queued the message.
    - `sender_email` string: Email of the user who queued the message.
    - `sender_display_name` string: Display name of the user who queued the message.
  - `removed_message_ids` string[]: IDs of queued messages removed by the mutation.

## 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/replicas/apis/replicas-api.md) - [All operations](https://skmtc.dev/replicas/apis/replicas-api/llms.txt) - [OpenAPI document](https://skmtc.dev/replicas/apis/replicas-api/revisions/2703ac1c9cb7?raw)
