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

# Authentication

> Authenticate transaction requests with your Yonda API key.

Yonda issues credentials during onboarding. Use the API key issued for your installation and environment.

> [!NOTE]
>
> API keys are confidential. Keep them on your server and out of browser code and source control.

## Send your key

Send your Yonda API key as a bearer token on every request under `/v1`:

```http theme={null}
Authorization: Bearer <YONDA_API_KEY>
```

For a shell request, read the key from your environment:

```bash theme={null}
curl --request POST 'https://api.yondatax.com/v1/transactions' \
  --header "Authorization: Bearer ${YONDA_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data @transaction.json
```

Save the request body from the [quickstart](https://docs.yondatax.com/quickstart.md) as `transaction.json` before running this command.

## Authentication failures

| HTTP status | Code | Check |
| - | - | - |
| 401 | `authentication_failed` | The header uses `Bearer`, the token is present, and the key is active and issued for this API. |
| 400 | `invalid_input` | The complete `Authorization` header value is 1,024 bytes or fewer. |
| 503 without `Retry-After` | `service_unavailable` | Authentication is not configured; contact Yonda. For 503 with `Retry-After`, follow the [retry guidance](https://docs.yondatax.com/errors.md#handling-failures). |

Unknown, revoked, and incompatible keys return the same generic 401 response as malformed or missing credentials.

See [errors](https://docs.yondatax.com/errors.md) for the error response format.


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