> For the complete documentation index, see [llms.txt](https://docs.peakcommerce.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.peakcommerce.com/product/settings/developer-tools/api-keys.md).

# API Keys

**Settings → API Keys** manages the keys that grant programmatic access to the PeakCommerce **Agent API** (`/api/v1`) — the action-oriented API that external integrations and AI agents use to read and manage accounts, subscriptions, orders, payments, invoices, and webhooks on your behalf.

## Why it matters

Each key authenticates a caller **as your tenant**. Anything a key can do is done in your tenant's data, so a leaked key is equivalent to a leaked password. Issuing separate keys per integration lets you revoke one without disrupting the others.

## Create and revoke a key

1. Click **Create Key** and give it a recognizable name (e.g. the integration or service that will use it).
2. **Copy the key value immediately** — it is shown only once at creation and cannot be retrieved again afterward.
3. Pass it to the API as a credential on every request to `/api/v1`.
4. To retire a key, **revoke** it. Revocation takes effect immediately; in-flight and future requests using that key are rejected.

## Security and gotchas

* **Treat keys like passwords** — store them in a secrets manager, never in source control, client-side code, or shared documents.
* **Lost the value?** You can't recover it. Create a replacement, swap it in, then revoke the old one.
* **Rotate periodically** and immediately on any suspected exposure.

For endpoints, request conventions, idempotency, and the webhook signature scheme these keys authenticate against, see the API reference in the **Developers** space. Related: [Webhooks](/product/settings/developer-tools/webhooks.md) for receiving events back from PeakCommerce.


---

# 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://docs.peakcommerce.com/product/settings/developer-tools/api-keys.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.
