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

# Authentication

> Authenticating with the ParseTx API

ParseTx uses API keys to authenticate requests. You can pass your API key via the `X-API-Key` header or as a Bearer token.

## Getting an API Key

You can generate a new API key in the [Free Tier Signup](https://parsetx.dev/free-key) (email only) or the [Paid Tier](https://parsetx.dev/#pricing) (requires credit card). Use a Free Sandbox Key for 5,000 free transactions/month, or a Paid Production Key at a flat \$0.001/transaction from the first request.

## Making Authenticated Requests

### Option 1: X-API-Key Header (Recommended)

```bash theme={null}
curl -X POST https://api.parsetx.dev/v1/enrich \
  -H "X-API-Key: ptx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"transactions": ["UBER EATS"]}'
```

### Option 2: Bearer Token

```bash theme={null}
curl -X POST https://api.parsetx.dev/v1/enrich \
  -H "Authorization: Bearer ptx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"transactions": ["UBER EATS"]}'
```

## Managing Your API Keys

You can view, rotate, and revoke your API keys at any time from the [Key Dashboard](https://parsetx.dev/manage). Sign in with the email address you used at checkout — no password required. We'll send you a one-time magic link valid for 15 minutes.

### Rotating a Key

Rotation revokes your current key and issues a new one atomically. Use this if your key is compromised or if you want to cycle it on a schedule. Your subscription and usage quota carry over automatically — there is no downtime.

### Revoking a Key

Revocation permanently deactivates a key without issuing a replacement. Use this if you have multiple keys and want to retire one. Your other active keys are unaffected.

### Lost Your Key?

We send a copy of your raw API key to your email at the moment of provisioning. Check your inbox for an email from `no-reply@parsetx.dev` with the subject **"Your ParseTx API key"**.

If you can't find that email, sign in to the [Key Dashboard](https://parsetx.dev/manage) and rotate your key. This immediately issues a new key and revokes the old one.

<Note>
  We cannot retrieve a lost raw key — only you ever saw it. Rotation is the intended recovery path and takes under 10 seconds.
</Note>

## Security Model

Your API keys are highly sensitive. To protect you from database leaks:

* We never store your raw API key. Only a SHA-256 hash is persisted in our database.
* All inbound keys are hashed before lookup — a compromised database reveals no usable keys.
* Keys are prefixed `ptx_live_` so they are identifiable and catchable by secret-scanning tools (e.g. GitHub secret scanning, GitGuardian).
* Key rotation is instant and atomic — the old key stops working the moment the new one is issued.
