Skip to main content

API keys & agent keys

Route/ade/dashboard/api-keys

An API key lets a pipeline, script or integration call the Apiome REST API as your workspace without a person signing in. Keys belong to the workspace, not to you: every call runs as that tenant. Go to Workspace → API keys (the command palette's Create API key… opens the create dialog directly).

Both kinds of the workspace's API keys are in one list, each row badged with its Type:

  • REST API — keys for the REST API, the CLI and CI pipelines. Everything from Scopes to Disable, enable and delete is about these.
  • MCP server — keys for MCP hosts and agents calling Apiome's MCP server. See MCP keys.

The two kinds are not interchangeable: the MCP server answers Invalid or unknown MCP API key to a REST key, and the REST API refuses an MCP key. Either kind can be regenerated — its secret replaced, everything else kept — instead of deleted and created again.

API keys: four REST API keys and two MCP server keys in one list with type, prefix, access, status and expiry, a banner warning that one expires on October 15, and the scope referenceAPI keys: four REST API keys and two MCP server keys in one list with type, prefix, access, status and expiry, a banner warning that one expires on October 15, and the scope reference
Route/ade/dashboard/api-keys

Reading keys needs the api_keys:view permission and changing them needs api_keys:create, api_keys:edit or api_keys:delete — see Roles.

The keys table​

Each row shows the key's Name (and a REST key's description), its Type — REST API or MCP server — its Prefix (the first characters, in monospace, with a copy button — use it to match a key to a log line), Access (a REST key's scopes, or an MCP key's tools), Status (Active, Disabled, Expired or Revoked), Last used, Created, Expires (or Never) and, for a REST key, an Enabled switch. Every column sorts; the newest key comes first.

  • Filter by name or prefix… narrows the rows, across both kinds.
  • All types, REST API and MCP server show one kind or both.
  • The status chips — All, Active, and Disabled, Expired or Revoked when a key is in that state — carry their counts.
  • The foot counts the keys by type and by status.
  • Under the table, Use a key has an example curl request with Copy, Scope reference lists what each REST scope allows and how many of this workspace's keys hold it, and Connect a host has the MCP server's settings.

Create API key (or N) creates a REST key; Create MCP key beside it creates an MCP key.

Scopes​

A key carries one of ten presets, chosen when it is created:

PresetScopesAllows
Full access (the default)*All REST operations for this tenant
CI: classified diffdiff:readPOST /v1/diff/…/classified only — recommended for contract gates
CI: lintlint:readGET …/lint and …/lint/gate only (catalog and MCP)
CI: diff + lintdiff:read lint:readBoth CI read scopes; still no write access
Usage sourceusage:ingestPOST /v1/tenants/{tenant}/usage/ingest, the SDK beacon and the HAR-source lookup only — for a traffic source feeding the usage index
Schema registry: readregistry:readReads of the schema registry at /registry/schema/{tenant} only — for Kafka consumers and deserializers
Schema registry: read + writeregistry:read registry:writeAlso registers schemas and changes registry settings — for Kafka producers that auto-register
Pact: read-onlypact:readReads of the Pact Broker only — for can-i-deploy checks
Pact: consumer + deploypact:read pact:publishAlso publishes pacts and records deployments and releases — for consumer and deploy jobs
Pact: CI verifierpact:read pact:verifyReads pacts and publishes verification results; cannot publish a pact — for provider verification jobs

Give pipelines the narrowest preset that works: a contract gate needs only diff:read. A key's scopes cannot be changed after it is created — create a new key instead. See CI diff gate for the gate that uses diff:read.

A key for a usage source​

An OpenTelemetry Collector, a log shipper or any other traffic source sends usage events with a key that holds only usage:ingest; so does apiome usage upload, which may also look up or create the project's HAR source with it. Such a key can post usage batches and nothing else: it cannot read a project, a version or another key, so a key copied out of a Collector's config gives nothing away. Choose the Usage source preset when you create it.

The Create API key dialog with the Usage source preset chosen: the usage:ingest scope, a Production OTel Collector name and 365 days to expiryThe Create API key dialog with the Usage source preset chosen: the usage:ingest scope, a Production OTel Collector name and 365 days to expiry
Route/ade/dashboard/api-keys

Agent keys can never hold usage:ingest, and the ingest endpoint does not accept a signed-in session — see Runtime usage.

A key for a Kafka serializer​

A Kafka producer or consumer reaches the schema registry with an ordinary workspace key. Choose Schema registry: read for a consumer (it only fetches schemas by id) and Schema registry: read + write for a producer that registers its schemas. Either key reaches /registry/schema/{tenant} and nothing else.

The Create API key dialog with the Schema registry: read + write preset chosen: the registry:read and registry:write scopes, an Orders producer name and 365 days to expiryThe Create API key dialog with the Schema registry: read + write preset chosen: the registry:read and registry:write scopes, an Orders producer name and 365 days to expiry
Route/ade/dashboard/api-keys

Confluent clients send the key as the password of basic auth — the user name can be anything — or as a bearer token.

A key for Pact tooling​

The pact-broker CLI, the Pact libraries and apiome pact reach the Pact Broker with an ordinary workspace key. Choose Pact: read-only for a job that only asks can-i-deploy, Pact: consumer + deploy for a consumer or deploy job, and Pact: CI verifier for a provider's verification job. Each reaches /v1/tenants/{tenant}/pact-broker and the hosted verifier and nothing else; Pact keys and scopes lists what each scope allows.

The Create API key dialog with the Pact: CI verifier preset chosen: the pact:read and pact:verify scopes, a Ledger API verifier name and 365 days to expiryThe Create API key dialog with the Pact: CI verifier preset chosen: the pact:read and pact:verify scopes, a Ledger API verifier name and 365 days to expiry
Route/ade/dashboard/api-keys

Pact tooling sends the key as a bearer token or as the password of basic auth.

Create a key​

  1. Click “Create API key” (or press N).
  2. Enter a Name — required, for example Payments contract gate — and, optionally, a Description of what uses it.
  3. Under Scopes, choose a preset card.
  4. In Expires in (days), enter a whole number of days, or leave it empty for a key that never expires.
  5. Click “Create API key”.
The Create API key dialog: a name, a description, the CI: classified diff preset chosen and 90 days to expiryThe Create API key dialog: a name, a description, the CI: classified diff preset chosen and 90 days to expiry
Route/ade/dashboard/api-keys

Copy the key — once​

API key created shows the whole key, with the name, scope and expiry above it. This is the only time it is shown: Apiome stores only a hash, there is no way to reveal it again, and the dialog cannot be dismissed with Esc or a click outside.

  1. Click “Copy” (or select the key) and store it in your secret manager.
  2. Click “I've saved my key”.

From now on the list shows only its prefix.

API key created: the warning that the key is shown only once, the key with Copy, and I've saved my keyAPI key created: the warning that the key is shown only once, the key with Copy, and I've saved my key
Route/ade/dashboard/api-keys

Send the key as Authorization: Bearer <key>, or in the X-API-Key header — which is what the CLI does with --api-key or APIOME_API_KEY:

curl -X POST \
https://api.apiome.dev/v1/diff/ver_1a2b/ver_3c4d/classified \
-H "Authorization: Bearer sk_live_…" \
-H "Accept: application/json"

Keys created by apiome login​

When someone signs the CLI in with apiome login, the key it receives appears in this list as CLI login · apiome-cli on <machine> · …, created by them, with a 14-day expiry. Disable or delete it here like any other key; apiome logout deletes it from the CLI side.

Regenerate a key​

If a key's secret has leaked, been lost, or is simply due for rotation, regenerate it rather than deleting the key and creating another. The key keeps its id, name, scopes or tools, Enabled switch and expiry; only the secret changes.

  1. Click the regenerate icon (↻) on the key's row.
  2. Regenerate REST API key (or Regenerate MCP server key) names the key and the prefix about to stop working, and warns that every caller using the current secret is refused from its next request. Click “Regenerate”.
  3. API key regenerated (or MCP key regenerated) shows the new secret once, exactly like a new key's: click “Copy”, put it wherever the old one was stored, and click “I've saved my key”.
Regenerate REST API key: the CI contract gate key and its prefix, the warning that the current secret stops working immediately, and RegenerateRegenerate REST API key: the CI contract gate key and its prefix, the warning that the current secret stops working immediately, and Regenerate
Route/ade/dashboard/api-keys

The row's prefix changes to the new secret's and Last used goes back to Never. A disabled REST key can be regenerated and stays disabled. An expired key cannot be regenerated — the new secret would expire with it — and a revoked MCP key is gone for good; create a new key instead. Regenerating needs api_keys:create, the same permission as creating a key, because it hands you a working secret.

Replace a key that is about to expire​

When a key expires within 14 days, a banner names it — “Terraform plan checks” expires on October 15, 2026. — and once a key has expired, requests with it are refused and the banner says so. An expired key cannot be re-enabled or regenerated. To replace it:

  1. Click “Create replacement” in the banner (or Create API key) and create a key with the same scopes.
  2. Switch the pipeline over to the new key.
  3. Delete the old key.

Disable, enable and delete​

  • Turn a key's Enabled switch off to pause it. Disable API key asks first, because every request using the key is blocked at once; click “Disable”. Turning the switch back on takes effect immediately, with no confirm.
  • Click the bin icon on a row to delete a key. Delete API key warns that every caller still using it starts getting 401s; click “Delete”. Deleting cannot be undone — rotate first if something in production depends on the key.

MCP keys​

An MCP key lets an MCP host — Claude Desktop, Claude Code, an IDE — or an agent call Apiome's MCP server as your workspace, including its private published specs. The MCP server needs a key on every request: there is no anonymous access. MCP keys are rows of the same list, with MCP server in the Type column; choose MCP server above the table to see only them. Only workspace administrators manage MCP keys; anyone else sees the REST keys and, in the table's foot, MCP server keys are managed by workspace administrators.

The list narrowed to MCP server keys: Claude Desktop on workspace default tools and Cursor with a custom set of three tools, and the Connect a host card with the MCP URL and bearer headerThe list narrowed to MCP server keys: Claude Desktop on workspace default tools and Cursor with a custom set of three tools, and the Connect a host card with the MCP URL and bearer header
Route/ade/dashboard/api-keys

An MCP key's Access is Workspace defaults, or Custom · N tools for a key with its own set. Its status is Active, Revoked or Expired — an MCP key has no Enabled switch.

The workspace's manage drawer lists MCP keys too, under Per-key capabilities, and can create and regenerate them there.

Create an MCP key​

  1. Click “Create MCP key” beside Create API key.
  2. Enter a Label — required, for example Claude Desktop.
  3. In Expires in (days), enter a whole number of days, or leave it empty for a key that never expires.
  4. Click “Create MCP key”.
  5. MCP key created shows the key once, as for a REST key: click “Copy”, store it, and click “I've saved my key”.

Point the host at the MCP server with the key as a bearer token on every request — the Connect a host card under the table has the settings with Copy:

URL: https://mcp.apiome.dev/mcp
Header: Authorization: Bearer <your-mcp-key>

See Connect an MCP host for the whole setup.

What an MCP key may call​

A new key calls the workspace's default MCP tools. Change the defaults under MCP settings, or give one key its own set under Per-key capabilities — both in the workspace's manage drawer (Workspaces → Manage; the What a key may call card links there). See MCP settings and Per-key capabilities.

Revoke an MCP key​

Click the revoke icon on a row. Revoke MCP key names the key and its prefix and warns that every host or agent using it is refused from its next call; click “Revoke”. Revoking cannot be undone. The key stays in the list as Revoked, with nothing left to press. To replace a key's secret but keep the key, regenerate it instead.

Agent keys​

Agent keys are a third kind, issued per toolset under MCP servers → Agent access, limited to the tools you tick, with their own expiry, revocation and usage charts — see Agent access.

To give the agents behind those keys a name, an owner and a page — and make each a consumer of the APIs its keys can call — register them in the catalog: see Agents and models.

With the API​

REST API keys are created and managed in the app; there is no REST endpoint or CLI command for them. MCP keys have REST endpoints (GET / POST /v1/tenants/{tenant}/mcp-keys, GET / PATCH / DELETE …/mcp-keys/{key}, and POST …/mcp-keys/{key}/regenerate, which returns the new secret once) — see the MCP keys reference. Agent keys have REST endpoints (GET / POST /v1/tenants/{tenant}/agent-keys, GET / DELETE …/agent-keys/{key}) — see the API reference.

Where next​