API keys
Create scoped credentials for scripts, integrations, and agents. Inspect usage and revoke unused keys.
Overview
API keys authenticate scripts, integrations, and agents without browser sign-in. They support the REST API, Common Room-compatible API, and hosted MCP server.
Keys belong to a workspace. Only owners can view the key list or issue keys. Each record identifies its creator and latest use.
Datum displays a new secret once. It stores only the key’s hash and cannot display the secret again.
Basics
Create a key
Open Access
Open Settings → Access as an owner. API keys lists the workspace’s keys.
Other users see “Only an owner can see or issue this workspace’s API keys.”
Describe the key
- Select Create API key.
- Enter its purpose under What is it for, such as “zapier push”.
The name identifies the key later.
Select permissions
- Select a scope under Can.
- Select Create key.
Store the key
- Select Copy.
- Store the key where the intended script or service can read it securely.
- Select Done.
The panel displays the secret only once.
Check the key
Check the new entry’s prefix and Last used value. New keys show “Never used”. The first authenticated request updates the date.
Scopes
Each scope includes the preceding scope’s permissions. Assign only the permissions that the consumer needs.
| Scope | Permissions |
|---|---|
| Read | Search members, read the review queue, and export members. |
| Read and write | Also resolve reviews and merge members. |
| Admin | Also undo pinned merges, erase people, and change workspace configuration. |
Admin configuration includes settings, sources, routing rules, sinks, and destinations. Use admin keys only for tasks that require them, including erasure.
Use a key
Send the key as a bearer token:
curl -s -H "Authorization: Bearer $OCMGR_API_KEY" "$OCMGR_URL/v1/members"
The default limit is 600 requests per minute per key.
See who issued what
The list has Name, Access, and Last used columns. Under each name are the key’s prefix and its creator; keys made with the CLI say “created at a terminal”. Access reads Read, Read and write, or Admin.
Revoked keys remain in the list with the status “revoked”. This preserves the issuance record.
Revoke a key
- Select Revoke beside the key.
- Confirm revocation.
Consumers lose access on their next request. Revoked keys cannot recover access. Create a replacement key when necessary. Update each consumer to use it.
Keys and people
API keys cannot create other keys. Creation requires an owner session in the app or a terminal on the instance host. Hosted MCP always rejects key creation.
Hosted subscription expiry does not block key creation or revocation. Keys continue to support data exports. See Billing and usage.
From your terminal or agent
ocmgr apikey create --name "zapier push" --scopes read,write --json # the token is printed once
ocmgr apikey list --json
ocmgr apikey revoke <keyId> --json{ "name": "list_api_keys", "arguments": {} }
{ "name": "revoke_api_key", "arguments": { "id": "<keyId>" } }curl "$OCMGR_URL/v1/api-keys" -H "Authorization: Bearer $OCMGR_API_KEY"
curl -X DELETE "$OCMGR_URL/v1/api-keys/<keyId>" -H "Authorization: Bearer $OCMGR_API_KEY"Listing and revocation require admin scope. ocmgr apikey create defaults to read scope when you omit --scopes.
See create_api_key, list_api_keys, and revoke_api_key.
FAQ
I lost a key. Can I see it again?
No. Datum stores only its hash.
Create a new key. Update its consumers. Revoke the old key.
Should an agent use a key or sign in?
Prefer hosted MCP sign-in for agents acting for a person. Changes identify that person, and removing their membership stops the agent. API keys suit unattended scripts.
Can members create keys?
No. Key creation requires an owner. Ask a workspace owner when you need a key.