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

# Authentication

> Create an API key, and send it with Pulse-Version: 2 on every request.

Pulse authenticates every request with an API key. Each key belongs to one organization and acts for the user who created it. Pulse counts each request's usage against both the organization and the key that sent it.

## Create a key

**1. Open API Keys**

Sign in at [platform.runpulse.com](https://platform.runpulse.com/) and open **API Keys**.

**2. Create the key**

Click **Create API Key**, give the key a name, and click **Create Key**.

**3. Store it**

Copy the key and keep it in a secret manager or an environment variable, such as `PULSE_API_KEY`.

![The Create New API Key dialog in the Pulse dashboard, asking for a key name](https://mintcdn.com/pulseai/OJ897TEZf8bV6lk8/images/platform/create-api-key-content.png?fit=max\&auto=format\&n=OJ897TEZf8bV6lk8\&q=85\&s=c6e2f7b495ba30ae487945cd102e2ab3)

***

## Send the key and the version

On every request, send your API key in the `x-api-key` header (or as `Authorization: Bearer <key>`) and the `Pulse-Version: 2` header.

To check that a key works, read your organization's usage:

```bash theme={null}
curl https://api.runpulse.com/usage \
  -H "x-api-key: $PULSE_API_KEY" \
  -H "Pulse-Version: 2"
```

The [SDKs](https://docs.runpulse.com/v2/sdks.md) send both headers for you.

### Without `Pulse-Version`

A request without the header gets your organization's default API version. Organizations start with version 1 as their default, and on version 1 a version 2 route such as `POST /parse` returns `404`. [Moving from V1](https://docs.runpulse.com/v2/moving-from-v1.md#which-version-serves-a-request) has the full rules, including the few requests that don't follow the default, and shows how to change it.

***

## What a key can do

Any key of the organization can start jobs and read any job's status and result. It can also create, change and delete saved configs and webhooks, and read usage and organization settings. Two actions need a particular key:

* Only a key of the user who started a job can cancel it.
* Only a key whose creator is an organization admin can change organization settings (`PATCH /settings/org`).

A missing, unknown or inactive key gets `401`, and so does a key whose creator was deleted. A key whose creator is suspended gets `403`.

## Keep keys safe

* Call Pulse from your server, never from browser or mobile code.
* Never commit keys to source control.
* Use a separate key for each environment, such as development, staging and production.
* To rotate a key, create a new one, deploy it, and then delete the old one in the dashboard.


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