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

# Get knowledge folders

> Return the current knowledge-tree snapshot, optionally scoped to one agent.

Use this route to inspect the current knowledge folders snapshot in the workspace.

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token containing your Fini workspace API key. Format: `Bearer fini_...` The key needs `read` scope.
</ParamField>

## Query parameters

<ParamField query="botId" type="string">
  Optional agent ID. When supplied, Fini returns the tree scoped to that agent's attached folders.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api-prod.usefini.com/v2/hc-folders/public?botId=4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3' \
    --header 'Authorization: Bearer fini_your_api_key'
  ```
</RequestExample>

## Response

Returns a knowledge folders snapshot object. See [Organize knowledge](/en/api-reference/organize-knowledge) for the shared snapshot fields.

<Note>
  The workspace-API-key response includes `id`, `createdAt`, `updatedAt`, and `snapshotObjV2`.
</Note>

## Errors

<AccordionGroup>
  <Accordion title="401 Unauthorized" icon="lock">
    The API key is missing, malformed, revoked, or invalid.
  </Accordion>

  <Accordion title="403 Forbidden" icon="shield-halved">
    The API key does not include the `read` scope.
  </Accordion>

  <Accordion title="The snapshot is empty" icon="circle-question">
    This usually means the workspace has no folders yet, or no folders attached to the `botId` you requested.
  </Accordion>
</AccordionGroup>
