# reorderFolders

Set the order of one set of sibling folders: `scope`, their `parentId` (null = top level), `personal` (which side), and `orderedIds` first to last. An id outside that set refuses the call; siblings you leave out keep their order after the listed ones. Returns the surface's folders.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "reorderFolders", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `scope`: `FolderScope!` (required, one of `PROPERTY`, `CONTACT`, `PIPELINE_ITEM`, `DEAL`, `OWNER`, `POST`, `ENTITY`, `PERSON`, `USER`, `ORGANIZATION`, `LIBRARY`, `WORKFLOW`, `FORM`). The surface a folder appears on. The first nine are 1:1 with `FilterType`: a folder there holds that surface's saved filters, and on PROPERTY / CONTACT its lists as well. Scope is the SURFACE, not the item kind.
- `parentId`: `ID`
- `personal`: `Boolean!` (required)
- `orderedIds`: `[ID!]!` (required)

## Response (data, an example)

```json
{
  "folderMutation": {
    "reorderFolders": [
      {
        "id": "<ID>",
        "name": "…",
        "parentId": "<ID>",
        "displayOrder": 0
      }
    ]
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "reorderFolders",
    "variables": {
      "scope": "PROPERTY",
      "personal": true,
      "orderedIds": [
        "<orderedIds>"
      ]
    }
  }'
```
