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

# Authentication and API keys

> Create, use, rotate, and revoke Price Data API keys.

Every request carries your API key in the `x-api-key` header:

```bash theme={null}
curl https://api-v2.pricepirate.com/api/v2/account \
  --header 'x-api-key: <api-key>'
```

Treat the key like a password. Keep it on your server; do not ship it in browser or mobile code.

## Create an API key

**1. Sign in**

Sign in to the [dashboard](https://dashboard.pricepirate.com) with your business email. Your first sign-in creates your organization.

**2. Create the key**

Open **API Keys** and click **Create API Key**. Add an optional label, such as `Production backend`, to tell keys apart later.

**3. Copy it now**

The key is shown only once. It is stored hashed and cannot be displayed again. If you lose it, revoke it and create a new one.

Every member of your organization can create and revoke keys.

## Keys belong to your account

All active keys of your account act as the same customer:

* They share one credit balance and the same concurrent and daily limits.
* Every key can poll jobs created by any other key of your account. Other accounts get `404` for your job IDs.
* Removing someone from your organization does not revoke the keys they created. Revoke those keys under **API Keys**.

## Rotate a key

You can hold several active keys, so you can rotate without downtime:

1. Create a new key.
2. Deploy the new key to your integration.
3. Revoke the old key under **API Keys**.

A revoked key stops working immediately. Requests with it return `401`.

## Authentication errors

| Status | Meaning | What to do |
| - | - | - |
| `401` | The `x-api-key` header is missing, or the key is unknown or revoked. | Check the header and use an active key. |
| `403` with `"Account suspended"` | Your account is suspended. Every endpoint refuses its keys, including polls of existing jobs. | [Contact support](https://pricepirate.com/docs/en/guide/help/support.md). |

The dashboard stays available while your account is suspended, so you can still see your balance, usage, and jobs.


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