Skip to content
Select themeSelect language

`PATCH /api/projects/{id}/backlog/order` (ADR 0039 S9 / L68). RBAC: workspace member (any role), via the same `authorized_workspace` gate as the single-item PATCH. Applies a WHOLE board-column reorder plan (`[{item_id, priority}]`) in ONE server-side transaction — the board sends its computed plan as a single request instead of N sequential per-card PATCHes. The project must own every targeted item (404 otherwise); a plan referencing a terminal (`done`) item is rejected whole (422). Audited + published over the WS hub once.

PATCH
/api/projects/{id}/backlog/order
curl --request PATCH \
--url https://example.com/api/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/backlog/order \
--header 'Content-Type: application/json' \
--data '{ "items": [ { "item_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "priority": 1 } ] }'
id
required
string format: uuid

Project ID

Media typeapplication/json

The batch reorder body: the FULL priority plan the board computes once for a drag, applied in ONE request (L68 — no longer one PATCH per shifted card).

object
items
required
Array<object>

One entry of a batch reorder plan (ADR 0039 S9 / L68): assign priority to item_id. priority is nullable (a null sinks the card, sorts NULLS LAST) — mirroring the single-item PATCH’s priority semantics.

object
item_id
required
string format: uuid
priority
integer | null format: int32
Examplegenerated
{
"items": [
{
"item_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"priority": 1
}
]
}
Media typeapplication/json

The batch reorder response: how many items were re-prioritized.

object
reordered
required
integer
Examplegenerated
{
"reordered": 1
}

Reorder plan references a terminal (done) item; the whole plan is rejected

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}