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

# Authentication

All API requests require a Bearer token in the Authorization header. Tokens are scoped to a single partner account and environment.

## Getting your API key

1. Sign in to your **Dashboard**.
2. Go to **Settings > API Key.**
3. Both your sandbox or production keys will be viewable.
4. Copy & use the key based on the environment.

## Using your key

```javascript theme={null}
curl -X GET https://namify.host/api/v1/domains/availability \
  -H "Authorization: Bearer nk_live_abc123def456"
```

## Key prefixes

> **nk\_test\_\* -** Sandbox. No charges, simulated registrations.

> **nk\_live\_\* -** Production. Real charges, real ICANN registrations.

<Warning>
  Never expose keys in client-side code, Git repos, or logs. Use environment variables.
</Warning>

## Key management

* Up to 2 active keys per account.
* Revoke any key instantly by getting in touch with us.
* Requests using a revoked key return 401 immediately.

## Auth error codes

| Code                      | Reason for error                                                    |
| ------------------------- | ------------------------------------------------------------------- |
| 401 Unauthorized          | Missing or invalid key. Check the header format and key value.      |
| 401 key\_revoked          | This key has been revoked. Generate a new one via dashboard.        |
| 401 key\_expired          | Key has passed its expiry date (if an expiry was set).              |
| 403 Forbidden             | Valid key, but insufficient permissions for this endpoint/resource. |
| 403 environment\_mismatch | Using a sandbox key against production or vice versa.               |
