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

# Authentication

> Authenticate GraphQL API requests with Paradime Account or legacy Workspace API keys, using Bearer tokens or key-and-secret headers.

Before you can use the GraphQL API, you need to [generate API credentials](https://docs.paradime.io/developers/api-keys.md). Paradime supports two authentication methods:

* **Account API Keys** (recommended) — a single Bearer token that can access multiple workspaces. Pass the `Authorization: Bearer <token>` header together with the `X-Paradime-Workspace` header to select the target workspace.
* **Workspace API Keys** \[legacy] — workspace-scoped `API Key` and `API Secret` credentials, passed in the `X-API-KEY` and `X-API-SECRET` headers.

Both methods use the same `API Endpoint`.

## Example request

Send every request as a `POST` to your API endpoint with the `Content-Type: application/json` header and your credentials. Using an Account API Key (recommended):

```bash cURL theme={"system"}
curl -X POST "<YOUR_API_ENDPOINT>" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
  -d '{"query": "query { apiKeyIdentity { isValid capabilities } }"}'
```

```python Python theme={"system"}
import requests

response = requests.post(
    "<YOUR_API_ENDPOINT>",
    headers={
        "Content-Type": "application/json",
        "Authorization": "Bearer <YOUR_API_KEY>",
        "X-Paradime-Workspace": "<YOUR_WORKSPACE_UID>",
    },
    json={"query": "query { apiKeyIdentity { isValid capabilities } }"},
)
print(response.json())
```

With legacy Workspace API Keys, pass the key and secret in place of the Bearer token:

```bash cURL theme={"system"}
curl -X POST "<YOUR_API_ENDPOINT>" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: <YOUR_API_KEY>" \
  -H "X-API-SECRET: <YOUR_API_SECRET>" \
  -d '{"query": "query { apiKeyIdentity { isValid capabilities } }"}'
```

```python Python theme={"system"}
import requests

response = requests.post(
    "<YOUR_API_ENDPOINT>",
    headers={
        "Content-Type": "application/json",
        "X-API-KEY": "<YOUR_API_KEY>",
        "X-API-SECRET": "<YOUR_API_SECRET>",
    },
    json={"query": "query { apiKeyIdentity { isValid capabilities } }"},
)
print(response.json())
```

A successful response confirms the key is valid and lists its capabilities:

```json theme={"system"}
{ "data": { "apiKeyIdentity": { "isValid": true, "capabilities": ["..."] } } }
```

### Examples:

> [card] [Audit Logs API](https://docs.paradime.io/developers/graphql-api/api-reference/audit-logs-api)

> [card] [Bolt API](https://docs.paradime.io/developers/graphql-api/api-reference/bolt-api)

> [card] [User Management API](https://docs.paradime.io/developers/graphql-api/api-reference/user-management-api)

> [card] [Workspace Management API](https://docs.paradime.io/developers/graphql-api/api-reference/workspace-management-api)


## Related topics

- [Key-pair authentication](https://docs.paradime.io/integrations/snowflake/key-pair.md)
- [Starburst/Trino](https://docs.paradime.io/integrations/starburst-trino.md)
- [Workspace and warehouse errors](https://docs.paradime.io/get-help/error-list/workspace-and-warehouse-errors.md)
- [Microsoft Fabric](https://docs.paradime.io/integrations/microsoft-fabric.md)
- [Airbyte CLI](https://docs.paradime.io/developers/paradime-cli/airbyte-cli.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.