> ## Documentation Index
> Fetch the complete documentation index at: https://docs.genviral.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List Folder Ancestors

> Get breadcrumb ancestors for a folder

Returns the folder lineage from root to immediate parent.

## Path Parameters

<ParamField path="folderId" type="string" required>
  Folder ID.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://www.genviral.io/api/partner/v1/folders/{{folder_id}}/ancestors \
    --header 'Authorization: Bearer <token>'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "ok": true,
    "code": 200,
    "message": "Folder ancestors retrieved",
    "data": {
      "folder_id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
      "ancestors": [
        {
          "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
          "name": "All Uploads",
          "parent_folder_id": null,
          "depth": 0
        },
        {
          "id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
          "name": "Campaigns",
          "parent_folder_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
          "depth": 1
        }
      ]
    }
  }
  ```
</ResponseExample>

## Error Responses

* `400 missing_folder_id` - missing route parameter
* `422 invalid_path` - `folderId` is not a valid UUID
* `422 invalid_folder_media_type` - folder media type is not supported by Partner folder APIs
* `404 not_found` - folder not visible in key scope
* `500 folder_ancestors_list_failed` - unexpected lookup failure
