# listFolders

Every folder on one surface (`scope`: PROPERTY, CONTACT, DEAL, FORM, …), flat: the org's shared tree plus your personal one. `ownerUserId` set = personal. `itemCount` counts items filed directly in it. Filter folders also come from listFilterFolders; workflow and template folders have their own ops.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "listFolders", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- 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.

## Response (data, an example)

```json
{
  "folderQuery": {
    "folders": [
      {
        "id": "<ID>",
        "name": "…",
        "scope": "PROPERTY",
        "parentId": "<ID>",
        "ownerUserId": "<ID>",
        "displayOrder": 0,
        "itemCount": 0
      }
    ]
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "listFolders",
    "variables": {
      "scope": "PROPERTY"
    }
  }'
```
