# renameFolder

Rename a folder by id (listFolders); a name a sibling already has is refused. For a saved-filter folder prefer renameFilterFolder, which merges into a same-named sibling as the app does.

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

## Variables

- `folderId`: `ID!` (required)
- `name`: `String!` (required)

## Response (data, an example)

```json
{
  "folderMutation": {
    "renameFolder": {
      "id": "<ID>",
      "name": "…",
      "parentId": "<ID>",
      "ownerUserId": "<ID>"
    }
  }
}
```

## 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": "renameFolder",
    "variables": {
      "folderId": "<folderId>",
      "name": "<String>"
    }
  }'
```
