# Authentication

IVPAY API requires an **API key** to authenticate all requests. This key must be passed via the header for every request.

To get your API Key follow [these](https://app.gitbook.com/o/ax8rTfKH5p9uuWRPSUme/s/cBVhxOcdrPvxpPKgzK4h/~/changes/12/docs/get-started/obtaining-api-keys) instructions.

## API Key Header

* **X-API-KEY**: `your_api_key_here` (Required)

## Headers

| Name         | Value               |
| ------------ | ------------------- |
| Content-Type | `application/json`  |
| X-API-KEY    | `your_api_key_here` |

## Notes

* Keep the API key secure and avoid sharing it publicly.
* All requests without valid authentication will receive a **401 Unauthorized** response.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ivpay.io/start/ivpay-api/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
