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

# API

Some API endpoints are protected, and therefore require that you authenticate using an API token.

## Generate a token

1. Navigate to your bot dashboard ([https://app.quick.bot/dashboard](https://app.quick.bot/dashboard))
2. Click on Account > API Tokens
3. Under the "API tokens" section, click on "Create"
4. Give it a name, then click on "Create token"
5. Copy your token.

<Frame>
  <img src="https://mintcdn.com/urbiport-eca888d8/IABytB49wvquMLKH/images/api/account-api-token.png?fit=max&auto=format&n=IABytB49wvquMLKH&q=85&s=7eb7cb3e8faf528cddabf20752007ed3" alt="Account api token" width="3456" height="1916" data-path="images/api/account-api-token.png" />
</Frame>

## Use your token

You can authenticate by adding an `Authorization` header to all your HTTP calls. The Authorization
header is formatted as such: `Authorization: Bearer <token>` (replace `<token>` with your token
previously generated).

Example:

```sh theme={null}
curl -L -X GET 'https://app.quick.bot/api/v1/analytics/:botId/answers' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer myAwesomeToken'
```

### How to find my `botId`

If you'd like to execute the bot in preview mode, you will need to provide the ID of the building
bot available in the editor URL:

<Frame>
  <img src="https://mintcdn.com/urbiport-eca888d8/IABytB49wvquMLKH/images/api/bot-deploy-flow-url.png?fit=max&auto=format&n=IABytB49wvquMLKH&q=85&s=e7fe7bd697fc2546d50a6547614f4ba0" alt="Get bot ID" width="2674" height="728" data-path="images/api/bot-deploy-flow-url.png" />
</Frame>

### How to find my `publicId`

For published bot execution, you need to provide the public bot ID available here:

<Frame>
  <img src="https://mintcdn.com/urbiport-eca888d8/IABytB49wvquMLKH/images/api/bot-deploy-url.png?fit=max&auto=format&n=IABytB49wvquMLKH&q=85&s=c0accde0a3e0cb9801d611351974dfbc" alt="Get botpublic ID" width="2630" height="1172" data-path="images/api/bot-deploy-url.png" />
</Frame>

### How to find my `workspaceId`

In your workspace dashboard, head over to `Workspace > Settings` and copy the workspace ID.
