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

# Users and keys

> Invite your team, choose who can change things, and manage the two kinds of API key.

Decide who can change your organization's setup, and which keys your apps and scripts use. Admins change things; members read them.

For example, invite a developer as a **Member**: they can read Discovery and the settings open to them, but can't create organization keys, change alert rules or connect integrations.

## Users

In **Settings › Users**, admins choose **Invite user**, enter an **Email** and pick a **Role**. The person gets an invitation email and joins when they accept. A pending invitation can be revoked, which stops its link working.

| Role | Can |
| - | - |
| **Admin** | Everything a member can, plus: invite and remove users, create and revoke organization API keys, manage alert rules and channels, connect integrations, manage deployments and billing, read the audit log, share compliance evidence, and apply Nova's suggestions |
| **Member** | Use the console, and read the settings tabs open to them |

Members can see the **Users**, **API keys** and **Alerts** settings, read-only. **Integrations**, **Billing** and **Audit logs** are admin-only. To change someone's role or status, use **Edit**; to remove them, **Delete user**.

## Two kinds of key

| | Organization API key | Agent API key |
| - | - | - |
| Prefix | `ak_` | `xe_` |
| Created in | **Settings › API keys** (admins) | An agent's **API keys** tab |
| Accepted by | Management API (`cp.xenovia.io`) | Runtime (`runtime.xenovia.io`) only |
| Scope | Whole organization, `read` or `write` | One agent's endpoint and SDK traffic |
| Expiry | 30, 60 or 90 days (default 90) | None until revoked |
| Limit | 20 active keys per organization | No limit |

Use the agent key in your application's client or the Xenovia SDK, and the organization key in scripts, CI and integrations that call the [management API](https://docs.xenovia.io/api-reference/introduction.md). The two aren't interchangeable: the management API rejects agent keys, and the runtime rejects organization keys.

### Agent keys

On the agent's **API keys** tab, choose **Create API key** and give it a **Key name**. Copy the key: it is shown once. **Revoke** stops a key at once; the runtime rejects a revoked key within seconds. A coding agent's key is marked **Hooks only**: it works only on Xenovia's hook endpoints (see [Coding agents](https://docs.xenovia.io/agents/coding-agents.md)). An inline sub-agent has its own keys (see [Sub-agents](https://docs.xenovia.io/agents/sub-agents.md)).

### Organization keys

**1. Create it**

In **Settings › API keys**, choose **Create API key**. Give it a **Key label**, choose **Expires after** (30, 60 or 90 days) and **Access**: **Read only** or **Read and write**.

**2. Copy it**

Copy the secret. It is shown once; the list afterwards shows only the identifier (`ak_…`).

The access level is fixed at creation; to change it, create a new key and revoke the old one. Deleting a key takes effect immediately on every request. Keys revoked directly in Clerk, outside Xenovia, can remain valid for up to about 90 seconds while verification caches expire. See [Authentication](https://docs.xenovia.io/api-reference/authentication.md) for scopes and the endpoints that need a signed-in person.

## Handling keys safely

* Store keys in a secret manager and inject them at runtime; never commit them.
* Use separate organizations or at least separate keys per environment.
* Prefer `read` keys for reporting and dashboards; reserve `write` keys for provisioning.
* Rotate before the expiry date: create the replacement, deploy it, then revoke the old key.

> [!WARNING]
>
> Never call the management API from a browser or mobile client. Organization keys grant access to every agent, policy and trace in the organization.

## What next?

> [card] [Audit logs](https://docs.xenovia.io/organization/audit-logs.md)
>
> See who changed what.

> [card] [API](https://docs.xenovia.io/api-reference/introduction.md)
>
> Use an organization key with the management API.

> [card] [Create an agent](https://docs.xenovia.io/agents/create-an-agent.md)
>
> Make an agent and its key.


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