> For the complete documentation index, see [llms.txt](https://www.cakewalk.security/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.cakewalk.security/docs/human-access/open-api-and-mcp/authentication.md).

# Authentication

Authenticate requests with X-API-KEY and X-API-SECRET headers and choose between read only and read and write API keys.

Use API keys to authenticate requests. All endpoints are protected and require an API key and API secret for authentication. Include it as a `X-API-KEY` and `X-API-SECRET` in the `Authorization` header.

Example header:

```http
X-API-KEY: api key
X-API-SECRET: api secret
```

***

### Access Levels

Each API key has an access level that you set when you generate it:

* **Read and write**: the key can call every endpoint, including ones that create, update or delete data. This is the default.
* **Read only**: the key can call endpoints that read data. It cannot call endpoints that modify data.

Use a read only key for integrations that only need to pull data out of Cakewalk, such as reporting, monitoring or syncing into another system. A read only key limits what an exposed credential can do.

The keys table in your developer settings shows a **Read only** label next to each read only key.

{% hint style="info" %}
A key's access level is fixed when you generate it. To switch a key between read only and read and write, generate a new key with the access level you want and delete the old one.
{% endhint %}

If a read only key calls an endpoint that modifies data, the request fails with `403 Forbidden`:

```json
{
  "title": "Forbidden operation",
  "status": 403,
  "detail": "This API key is read-only and cannot perform write operations."
}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.cakewalk.security/docs/human-access/open-api-and-mcp/authentication.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
