> For the complete documentation index, see [llms.txt](https://peach-organization.gitbook.io/peach/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://peach-organization.gitbook.io/peach/api-reference/authentication.md).

# Authentication

To access the Peach API, you need to include your API key in the Authorization header of each request. The API key ensures secure and authenticated access to the resources provided by the API. This section provides details on how to include the API key in your requests.

### Obtaining an API Key

To obtain an API key, please follow these steps:

1. Navigate to the Developer section in your account settings <https://www.peach-in.com/portal/developer-tools>
2. Generate a new API key by clicking the "Add API Key" button.
3. Make sure to securely store your API key. Treat it as a secret as it grants access to your Peach account and data.

### Including the API Key

To include your API key in the Authorization header, follow these steps:

1. Retrieve your API key from your account settings on the Peach developer portal.
2. Add the following header to each API request:\
   \
   Authorization: Bearer YOUR\_API\_KEY

Replace `YOUR_API_KEY` with your actual API key.

### Example

Here's an example of including the API key in a cURL request:

```bash
curl -X GET \
  -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.peach-in.com/v4/endpoint
```

Replace `YOUR_API_KEY` with your actual API key, and `/endpoint` with the desired API endpoint you want to access.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://peach-organization.gitbook.io/peach/api-reference/authentication.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
