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

# API keys

> Make keys that let your own servers call Aiveth's admin API and read your organization's events.

An API key lets one of your servers talk to Aiveth without a person signed in. Use one to manage people from your HR system, record consent from your own app, report what AI agents did, or read your organization's events.

Keys belong to your organization, not to a person. A key keeps working when the admin who made it leaves. Aiveth records who made each key.

> [!NOTE]
>
> API keys and the admin API are available on the Pro plan and above. See [Plans](https://docs.aiveth.com/account/plans.md).

## Make a key

You need a role that can manage apps.

**1. Open API keys**

In the console, go to **API keys** and select **Make key**.

**2. Name it**

Give the key a name that says what uses it, for example `HR sync`. Names are up to 80 characters.

**3. Choose what it may do**

Under **What it may do**, tick only the powers this server needs. You can give a key only powers you hold yourself. Powers you don't hold are shown but can't be ticked.

**4. Choose when it ends**

Under **Ends after**, pick 30 days, 90 days (the default), 365 days, or never.

**5. Limit where it comes from (optional)**

Under **Only from these addresses**, list the IP addresses or ranges your server calls from, one per line. Leave it empty to allow any address.

**6. Copy the key**

Aiveth shows the key once. Copy it into your server's secret store, then select **I've saved it**. Aiveth keeps only a fingerprint of it and can't show it again.

## Use a key

Send the key from your server in the `Authorization` header:

```bash theme={null}
curl https://accounts.aiveth.com/v1/admin/people \
  -H "Authorization: Bearer aiveth_sk_live_..."
```

Never put a key in a browser, a mobile app, or source control. The [Node](https://docs.aiveth.com/sdks/node.md) and [Python](https://docs.aiveth.com/sdks/python.md) SDKs take the key for you.

## Powers

Each power needs the matching permission from the person who gives it.

| Power | What it lets the key do | The maker needs |
| - | - | - |
| `people:read` | See people and invitations. | `users:read` |
| `people:manage` | Invite, suspend, reactivate and sign people out. | `users:manage` |
| `people:roles` | Change people's roles (never Owner). | `roles:manage` |
| `roles:read` | See the organization's roles. | `users:read` |
| `events:read` | Read the organization's events. | `audit:read` |
| `organization:fields` | Read and change the organization's custom fields. | `security:manage` |
| `agents:actions` | Report what AI agents did on your MCP servers. | `apps:manage` |
| `resources:write` | Register, rename, move and remove parts of the organization. | `roles:manage` |
| `authorization:read` | Check who may do what on a part, and list who reaches what. | `users:read` |
| `authorization:write` | Give and take roles on parts (never to the key's maker). | `roles:manage` |
| `signals:manage` | Set up security signal streams (Shared Signals) for your tools. | `security:manage` |
| `consent:read` | Check whether a person agreed to a purpose. | `security:manage` |
| `consent:write` | Record and withdraw people's consent from your own app's screens. | `security:manage` |
| `erasure:write` | See the data your apps must erase and mark it erased. | `users:manage` |

A key never acts as an Owner. When it changes roles, it can do only what its maker could do when the key was made. It can never give, take, or change the Owner role.

## Test and live keys

Keys say where they come from:

* `aiveth_sk_test_...` comes from your Development environment.
* `aiveth_sk_live_...` comes from production.

A key from one environment never works in the other. Keep test keys in your development settings and live keys in production only. Every key also carries a checksum, so a mistyped or made-up key is refused at once, and a leaked key is easy for secret scanners to find.

## Make a new secret (rotation)

To rotate a key, select **New secret** next to it. Aiveth makes a new key with the same name, powers, addresses and lifetime, and shows it once. The old key keeps working for 24 more hours, so you can swap it on your servers without downtime. Then it stops.

Only someone who holds every power on the key can make a new secret for it. A key that has already ended can't be renewed. Make a new key instead.

## End a key

Select **End**, then **End now**. The key stops working at once.

## Expiry warnings

Your organization's Owners get an email 7 days before a key ends. The email names the key and the day it stops. If something still uses it, make a new secret and put it where the old one is.

## Limits and errors

* Up to 25 live keys per organization.
* Up to 20 addresses or ranges per key.
* The console shows when each key was last used, to the minute.
* Each key may make up to 600 requests a minute to the admin API.

| Status | Meaning |
| - | - |
| `401` | No key, a malformed key, an ended or expired key, a call from an address the key doesn't allow, or your plan doesn't include API keys. The response carries `WWW-Authenticate: Bearer`. |
| `403` | The key doesn't have the power this call needs. The message names the power. |
| `429` | Too many requests this minute. |

If your organization moves to a plan without API keys, its keys are kept but stop working until the plan includes them again.

Every change a key makes appears in the [activity log](https://docs.aiveth.com/privacy/activity-log-and-reports.md) as done by that key, for example "API key “HR sync”".


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