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

# invalid_api_key

> Invalid API key (HTTP 401).

| Field          | Value                                                 |
| -------------- | ----------------------------------------------------- |
| Status         | `401`                                                 |
| Problem `type` | `https://docs.paypathiq.com/problems/invalid_api_key` |
| Retryable      | No                                                    |

## When this happens

The `Authorization` header is missing or malformed, or the key is unknown, revoked, inactive, or for the other environment. Sandbox keys start with `ppiq_test_` and work only against `https://api.sandbox.paypathiq.com`.

## What to do

Check that you send `Authorization: Bearer <key>` to the base URL for the key's environment. If the key was revoked or lost, create a new one. See [Authentication](/authentication).
