Skip to main content
Pass an API key to kontext setup --token to connect an endpoint to your workspace. The endpoint uses it to report activity. Kontext manages API keys as install tokens under /install-tokens.

Personal and workspace API keys

Settings → API Keys is only available to owners and admins in self-serve workspaces. The dashboard shows each key once, at creation.

Routes

Use a service account or connected agent with Deployments scopes. The caller must act as an owner or admin. See API overview for authentication. Kontext resolves current to the caller’s workspace.

List keys

The response contains metadata without API key values:

Create a key

You can omit the body. The label limit is 100 characters. Set personal to true for a personal key owned by the person the caller acts as. Service accounts have no associated person and can create only workspace keys. The response contains token and tokenSha256. This is the only response that includes token. Kontext stores only its digest. Pass token to kontext setup --token or kontext setup --token-stdin on the endpoint.

Revoke a key

Use the 64-character tokenSha256 from the list. A successful response contains { "ok": true }. Endpoints using the API key stop reporting to your workspace. You cannot undo revocation. Kontext remains installed on those endpoints. Your workspace keeps their past activity.

Rotate a key

  1. Create a new key.
  2. Run kontext setup --token <new-key> on each endpoint using the old key. Kontext replaces the stored key and restarts the daemon.
  3. Run kontext whoami to confirm the endpoint reports to the right workspace.
  4. Revoke the old key once no endpoint depends on it.
Use your MDM to update API keys on MDM-managed endpoints. See deploy overview.