---
title: "Reorder the caller's segment folders"
method: PUT
path: "/api/v1/ackdb/observe/segment-folders/reorder"
tags: ["ackDB"]
---

# Reorder the caller's segment folders

`PUT /api/v1/ackdb/observe/segment-folders/reorder`

## Request

- Base URL: `http://localhost:3009`
- URL: `http://localhost:3009/api/v1/ackdb/observe/segment-folders/reorder`
- Auth: HTTP bearer

Rewrites every folder's `position` from the given order, in one transaction. `folderIds` must name the caller's COMPLETE set exactly once: a partial list has no defined meaning for the folders left out, and silently appending them produces a rail that reshuffles itself. On a mismatch nothing is reordered and the 400 body reports the difference under `error.details.errors.folderIds` as `{ missing, unknown }`.

## Request body

- object
  - `folderIds` string[], required

## Response `200`

The caller's folders in their new order.

- object
  - `data` AckdbSegmentFolder[], required
    - `id` string, required
    - `name` string, required
    - `ownerEmail` string, required: The owner's lowercased email. Always the caller — folders are personal.
    - `position` integer, required: Manual rail order within the owner's set, ascending.
    - `segmentCount` integer: Segments in this folder the caller can currently SEE, narrowed to the requested `entityKind` (all grains when none is given). Not a raw row count: a segment that was unshared from the caller keeps its placement but is not counted, since the rail cannot render it. Present on the list response only.
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `400`: folderIds is not the caller's complete folder set, or there is no user identity.

---

[API](https://skmtc.dev/floqer/apis/floqer-public-api.md) - [All operations](https://skmtc.dev/floqer/apis/floqer-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/floqer/apis/floqer-public-api/revisions/fce50dc07b20?raw)
