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

# Authentication

> Generate an API key and authenticate your requests to the Zudo API.

The Zudo API uses API keys for authentication. Every request must include your key in the `x-api-key` header.

## Generate an API key

<Steps>
  <Step title="Open your profile settings">
    Click your avatar or name in the bottom-left corner of the Zudo app and go to **Profile Settings**.
  </Step>

  <Step title="Find the API Key section">Scroll to the **API Key** section on your profile page.</Step>

  <Step title="Generate a key">
    Click **Generate API Key**. Your key is displayed once — copy it and store it somewhere safe. You won't be able to
    see it again after leaving the page.
  </Step>
</Steps>

<Warning>
  Your API key grants full access to your organization's data. Keep it secret and never commit it to version control or
  share it publicly.
</Warning>

## Using your API key

Include the key in the `x-api-key` header on every request:

```bash theme={null}
curl https://zudo.so/api/v1/accounts \
  -H "x-api-key: psk_your_key_here"
```

API keys start with `psk_`.

## Revoking a key

To revoke your current key, go back to **Profile Settings → API Key** and click **Revoke API Key**. The key is invalidated immediately. Generate a new key when you're ready to continue.

<Note>
  Each user can have one active API key at a time. Generating a new key automatically revokes the previous one.
</Note>

## Scoping

Your API key has access to the accounts and data within your currently active organization. If you belong to multiple organizations, API calls use the context of the organization you were in when the key was generated.
