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

# Token Management

> Choose the right token flow: Backoffice cross-API token or Workspace-only token.

Use this page to pick the right token flow for your integration.

## Which token do I need?

<CardGroup cols={2}>
  <Card title="Workspace Token" icon="briefcase">
    Routes `/api/v1/*`.

    Automate Workspace operations — create projects, manage users, interact with ingested files, and more.
  </Card>

  <Card title="Gateway Token" icon="bolt">
    Routes `/api/gpt/v1/*`.

    Call the ZylonGPT API directly, the same way you'd use the Anthropic API.
  </Card>
</CardGroup>

<Tabs>
  <Tab title="Workspace Token">
    This flow is for **Workspace API** access under `/api/v1/*`.

    <Warning>
      Workspace token flow does **not** issue tokens for direct ZylonGPT API calls under `/api/gpt/v1/*`.
    </Warning>

    ### Create a Workspace API token

    1. Sign in to Workspace as an account that can manage API tokens.
    2. Click the organization logo and open **API Tokens**.
    3. Click **Create API Token**, provide a name, and save.
    4. Copy and store the token value immediately. It is shown once.

    <img src="https://mintcdn.com/zylon/AAEt1MHLqi0nuOjf/images/api-reference/images/token.png?fit=max&auto=format&n=AAEt1MHLqi0nuOjf&q=85&s=7ab04b82bc389213fe04e5741ce3ffed" alt="" width="506" height="661" data-path="images/api-reference/images/token.png" />

    <img src="https://mintcdn.com/zylon/AAEt1MHLqi0nuOjf/images/api-reference/images/create-token.png?fit=max&auto=format&n=AAEt1MHLqi0nuOjf&q=85&s=ce467e40df2889839f4fd04a97736a7c" alt="" width="1629" height="621" data-path="images/api-reference/images/create-token.png" />

    ### Verify token access

    Workspace endpoints under `/api/v1/app/*` require the `x-org` header.

    ```bash theme={null}
    curl "https://{BASE_URL}/api/v1/app/me" \
      -H "Authorization: Bearer {API_TOKEN}" \
      -H "x-org: {org_slug}"
    ```

    <Accordion title="Example response">
      ```json theme={null}
      {
        "id": "user_4b7c2a1d9e5f3c8b",
        "org_id": "org_2f3a9d1c7b5e4a8f",
        "account_id": "acct_6c8a1f3b2d4e5f7a",
        "name": "Sasha Patel",
        "email": "sasha@auroralabs.com",
        "state": "Active",
        "roles": ["AppAdmin"],
        "created_at": "2026-02-08T14:12:45Z"
      }
      ```
    </Accordion>

    ### Revoke a Workspace token

    Open **API Tokens** and click the trash icon on the token row.

    <img src="https://mintcdn.com/zylon/AAEt1MHLqi0nuOjf/images/api-reference/images/revoke-token.png?fit=max&auto=format&n=AAEt1MHLqi0nuOjf&q=85&s=a04a0b74904453cbb0700306b57b82fc" alt="" width="1633" height="355" data-path="images/api-reference/images/revoke-token.png" />
  </Tab>

  <Tab title="Gateway Token (ZylonGPT)">
    This flow grants access to the **ZylonGPT API** under `/api/gpt/v1/*`, as well as Workspace and Backoffice APIs.

    ### Create a Gateway token

    1. Open **Developer Console**.
    2. Select the target gateway.
    3. Click **Create API Token**.
    4. Enter a token name.
    5. Generate the token.
    6. Copy the token secret shown in the modal.

    <iframe width="560" height="315" src="https://www.youtube.com/embed/j8S2_v6fuHU" title="Backoffice - Create API Token" style={{ borderRadius: "12px" }} frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />

    <Warning>
      The token secret is shown **only once**. After closing the modal, it cannot be retrieved. Store it in a secure secret manager immediately.
    </Warning>
  </Tab>
</Tabs>
