> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.tribalhabits.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Authenticate requests with your organisation's API key.

Tribal Habits use API keys to allow access to the API. You may obtain an API key for your organisation by visiting the Admin / Account page. API access must be enabled on your organisation's plan; if it is not, every request returns `401`.

Tribal Habits requires the API key to be included in all API requests to the server in a header that looks like the following:

`Authorization: my_api_key`

```bash theme={null}
# With shell, you can just pass the correct header with each request
curl "api_endpoint_here" \
  -H "Authorization: my_api_key"
```

<Note>
  You must replace `my_api_key` with your organisation's API key.
</Note>

The key can also be passed as an `api_key` query parameter (for example `?api_key=my_api_key`) for tools that cannot set headers. The header is preferred, because URLs are more likely to be logged.

Any enabled integration key for your organisation, including the Zapier API key, can also be used as the API key.

## Request format

`POST` and `PUT` requests must send a JSON body with the header `Content-Type: application/json`. All responses are JSON.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.