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

# Authentication

Send the credential in the `Authorization` header:

```
Authorization: Bearer <token>
```

A value with no scheme is accepted and treated as a bearer token. Any other scheme is left unchanged and will not authenticate.

The token is a personal API token from the [API access section of the user profile](https://app.coupler.io/app/profile). The personal token does not expire. Regenerating it on that page replaces the previous token.

Every request must use HTTPS.

**HTTP methods**

| Method   | Description                             |
| -------- | --------------------------------------- |
| `GET`    | Read a resource or a list of resources. |
| `POST`   | Create a resource.                      |
| `PATCH`  | Update part of a resource.              |
| `PUT`    | Replace a resource.                     |
| `DELETE` | Delete a resource.                      |

**Response codes**

| Code  | Status                | Description                                                                                |
| ----- | --------------------- | ------------------------------------------------------------------------------------------ |
| `200` | OK                    | The request succeeded.                                                                     |
| `201` | Created               | A resource was created.                                                                    |
| `400` | Bad Request           | The request body or query failed validation.                                               |
| `401` | Unauthorized          | The API token is missing or invalid.                                                       |
| `403` | Forbidden             | The user cannot access the workspace, or the billing plan does not include the public API. |
| `404` | Not Found             | The resource was not found.                                                                |
| `422` | Unprocessable Entity  | The request was understood but could not be applied.                                       |
| `429` | Too Many Requests     | The organization exceeded its request allowance. `Retry-After` is `60`.                    |
| `500` | Internal Server Error | An unexpected error occurred.                                                              |
| `502` | Bad Gateway           | An upstream step failed, such as loading field options or storing a query preview.         |

Failed requests return JSON:

```json
{ "error": { "message": "TransformationSet not found" } }
```


---

# 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://docs.coupler.io/api/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.
