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

# Create API keys for Primo

> Generate a Primo API key to authenticate requests to the Primo REST API.

Primo API keys are used to authenticate requests to the [Primo REST API](https://api.getprimo.com/openapi.json). There are two types of API keys, each with a different scope.

## API key types

### Company API key

A **Company API key** is scoped to a single company. It gives access to all endpoints that operate on company-level resources — devices, employees, accessories, tickets, SaaS, and more.

### Workspace API key

A **Workspace API key** is scoped to your entire workspace. It gives access to workspace-level endpoints, such as listing and viewing the companies within your workspace.

<Info>
  Most API endpoints require a **Company API key**. Only the workspace-specific endpoints (under `/workspace/`) require a **Workspace API key**. Check the API reference for the badge on each endpoint.
</Info>

## Generate a Company API key

1. Go to **Settings** > **API**.
2. Click **Create API key**.
3. Give the key a name (e.g. "My integration").
4. Click **Create**.
5. Copy the key immediately — it will not be shown again.

<Warning>
  Store your API key securely. Anyone with this key can access your Primo data via the API.
</Warning>

## Use the API key

Pass the key in the `Authorization` header of your requests:

```bash theme={null}
curl https://api.getprimo.com/v1/devices \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Revoke a key

To revoke a key, go to **Settings** > **API**, find the key, and click **Delete**.
You can also delete a revoked API key.
