> ## 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](/developers/api-keys). 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):

<CodeGroup>
  ```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())
  ```
</CodeGroup>

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

<CodeGroup>
  ```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())
  ```
</CodeGroup>

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

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

### Examples:

<CardGroup cols={2}>
  <Card title="Audit Logs API" href="/developers/graphql-api/api-reference/audit-logs-api" horizontal />

  <Card title="Bolt API" href="/developers/graphql-api/api-reference/bolt-api" horizontal />

  <Card title="User Management API" href="/developers/graphql-api/api-reference/user-management-api" horizontal />

  <Card title="Workspace Management API" href="/developers/graphql-api/api-reference/workspace-management-api" horizontal />
</CardGroup>


## Related topics

- [Key-pair authentication](/integrations/snowflake/key-pair.md)
- [Starburst/Trino](/integrations/starburst-trino.md)
- [Microsoft Fabric](/integrations/microsoft-fabric.md)
- [Airbyte CLI](/developers/paradime-cli/airbyte-cli.md)
- [Ingest Google Sheets into Snowflake with dltHub](/guides/using-dlt-in-paradime/python-data-pipeline-using-dlthub-google-sheets-to-snowflake.md)
