Workspace settings and keys
Check a credential and the service, and read or manage workspace settings: the model key, configuration, tool policy, API keys and MCP access.
Workspace settings apply to everyone and everything in one workspace: the model provider key and default model that agent runs use, a free-form configuration object, the tool policy applied to connector calls, API keys, and the controls for MCP access. The area also holds the two calls most integrations start with: GET /api/me to check a credential and GET /api/health to check the service.
Most reads need an API key with the read scope, and the few writes that are open to keys need the admin scope. Settings that decide who can spend, connect or act (the model key, API keys, MCP access, the tool policy and protected configuration keys) can be changed only by a workspace admin signed in to the web workspace, and the lists of API keys and MCP grants can be read only there too. API keys are refused for those operations whatever their scopes; they are described briefly so you know they exist.
See Authentication for keys and scopes and Errors for the shared error format.
Identity and service health
Start here: confirm that the service answers and that your credential resolves to the workspace you expect.
GET /api/me
Return the identity and workspace behind the current credential
Use it to confirm that a key works and which workspace it belongs to. For an API key, userId is api-key:<key id>, role is member and access.human is false; for a signed-in person role is org:admin (workspace admin) or org:member. accessView is a display hint for the web workspace, not an authorization token, and is null when it cannot be computed. The response is sent with Cache-Control: private, no-store.
Access: API key with the read scope, or a signed-in workspace member. Any valid credential is accepted, including a device token sent with the header X-Client: electron. API-key scopes are not checked on this route.
| Name | Type | Description |
|---|---|---|
X-Client | "electron" | Required only when the credential is a device token: send X-Client: electron. A device token sent without it is not accepted, and the request is answered with 401 unauthenticated. API keys and browser sessions do not need it. |
Returns: The caller's identity: { userId, role, access: { profile, capabilities, human }, tenant: { id, clerkOrgId, slug }, accessView }. tenant.id is the workspace id, tenant.clerkOrgId is the workspace's organization id at the sign-in provider and tenant.slug is its short name, which can be null. accessView is { v, profile, human, capabilities, orgRole, credentialKind, permissionRegistryVersion, authorizationRevision, computedAt }: it repeats the profile, the human flag and the capability identifiers and adds the caller's orgRole, the credentialKind (session, api_key or desktop), two version counters and the time it was computed as an ISO 8601 string.
curl https://centerofagentic.com/api/me \
-H "Authorization: Bearer $COA_API_KEY"GET /api/health
Check that the service is reachable and its database answers
The response is always 200 with ok: true when the service itself answers, so read db for the database state: connected, unconfigured or error (with a short description in dbError). clerk reports whether the sign-in provider is configured (configured or missing_secret). Responses are sent with Cache-Control: no-store.
Access: No credential is needed. A credential that is sent is not read.
Returns: { ok, clerk, db, dbError, ts }, where ts is the server time as an ISO 8601 string.
{
"ok": true,
"clerk": "configured",
"db": "connected",
"dbError": null,
"ts": "2026-11-28T10:15:30.000Z"
}API keys
API keys are long-lived workspace credentials sent as Authorization: Bearer ak_…. Only a workspace admin signed in to the web workspace can list, create or revoke them; a key can never manage keys, whatever its scopes. A key stops authenticating when it is revoked, or when the member who created it is removed from the workspace or suspended. See Authentication for what each scope allows.
GET /api/tenant/api-keys
List the workspace's active API keys
Access: A signed-in workspace admin only. API keys are not accepted. Workspace admin signed in to the web workspace. API keys and device tokens are refused.
Returns: { keys: [...] }, newest first. Each key has id, name, keyPrefix (the first 12 characters of the secret, for recognising it), scopes, createdBy, createdAt and lastUsedAt. lastUsedAt is null until the key has been used; the two timestamps are date strings that are not guaranteed to be ISO 8601, so parse them leniently. Revoked keys are not listed and the secret itself is never returned.
| Status | Code | When |
|---|---|---|
| 403 | admin_required | The caller is not a workspace admin signed in to the web workspace. |
POST /api/tenant/api-keys
Create an API key
The full secret is returned once, in this response only. Scopes are fixed when the key is created; to change them, create a new key and revoke the old one.
Access: A signed-in workspace admin only. API keys are not accepted. Workspace admin signed in to the web workspace. API keys and device tokens are refused.
| Name | Type | Description |
|---|---|---|
name | string | Label for the key. Trimmed and cut to 80 characters; defaults to API key. |
scopes | ("read" | "run" | "admin")[] | Scopes to grant. Unknown values are dropped, and a missing or empty list becomes ["read"]. admin includes run, and run includes read. |
Returns: 201 with { secret, key }. secret is the full key (it starts with ak_); store it now, because it cannot be read again. key has the same fields as an entry in the key list.
| Status | Code | When |
|---|---|---|
| 403 | admin_required | The caller is not a workspace admin signed in to the web workspace. |
DELETE /api/tenant/api-keys/{id}
Revoke an API key
The key is rejected from its next request on. Revocation cannot be undone.
Access: A signed-in workspace admin only. API keys are not accepted. Workspace admin signed in to the web workspace. API keys and device tokens are refused.
| Name | Type | Description |
|---|---|---|
id required | uuid | The key's id from the key list. |
Returns: { "revoked": true }. When no active key has that id, the response is 404 with { "revoked": false }.
| Status | Code | When |
|---|---|---|
| 403 | admin_required | The caller is not a workspace admin signed in to the web workspace. |
Model key and default model
Agent runs call models through the workspace's own OpenRouter account. Until a key is stored, runs are refused with no_model_key. The key is stored encrypted and is never returned by the API; responses carry only whether one is set and its last four characters.
GET /api/tenant/settings
Read the model key status and the default model
The default model is used for a run when neither the request nor the agent names a model.
Access: API key with the read scope, or a signed-in workspace member.
Returns: { hasOpenRouterKey, openRouterKeyLast4, defaultModel }. openRouterKeyLast4 and defaultModel are null when not set.
curl https://centerofagentic.com/api/tenant/settings \
-H "Authorization: Bearer $COA_API_KEY"{
"hasOpenRouterKey": true,
"openRouterKeyLast4": "9f3c",
"defaultModel": "openai/gpt-4o-mini"
}POST /api/tenant/openrouter-test
Check that the stored model key is still accepted by OpenRouter
Asks OpenRouter to validate the stored key. The key is not returned and no model is called. Useful as a pre-flight check before a batch of runs.
Access: API key with the admin scope, or a signed-in workspace member.
Returns: { ok, detail }. ok is true when OpenRouter accepts the key, and detail is then the label OpenRouter reports for it (or valid key). When the key is rejected, ok is false and detail reads Key rejected (HTTP <status>).
| Status | Code | When |
|---|---|---|
| 400 | no_key | No model key is stored for the workspace. |
curl -X POST https://centerofagentic.com/api/tenant/openrouter-test \
-H "Authorization: Bearer $COA_API_KEY"{
"ok": true,
"detail": "valid key"
}PUT /api/tenant/settings
Set the model key or the default model
Send either field or both. A new key is validated with OpenRouter before it replaces the stored one. Every change, and every attempt refused because the caller is not a workspace admin, is written to the audit log; of the key, only its last four characters are recorded.
Access: A signed-in workspace admin only. API keys are not accepted. Workspace admin signed in to the web workspace. API keys and device tokens are refused.
| Name | Type | Description |
|---|---|---|
openRouterKey | string | The OpenRouter API key to store for the workspace. |
defaultModel | string | null | Model id to use when a run names none; null clears it. Batch-only variants (ids with a :batch suffix) are refused, and a value that is neither a string nor null is ignored. |
Returns: The updated settings, in the same shape as the read: { hasOpenRouterKey, openRouterKeyLast4, defaultModel }.
| Status | Code | When |
|---|---|---|
| 403 | admin_required | The caller is not a workspace admin signed in to the web workspace. |
| 400 | invalid_key | OpenRouter rejected the supplied key; nothing was stored. |
| 400 | batch_model_not_supported | defaultModel is a batch-only model variant; nothing was changed. |
DELETE /api/tenant/settings
Remove the stored model key
The default model is kept. Runs are refused with no_model_key until a new key is stored.
Access: A signed-in workspace admin only. API keys are not accepted. Workspace admin signed in to the web workspace. API keys and device tokens are refused.
Returns: The updated settings: { hasOpenRouterKey, openRouterKeyLast4, defaultModel }, with hasOpenRouterKey now false.
| Status | Code | When |
|---|---|---|
| 403 | admin_required | The caller is not a workspace admin signed in to the web workspace. |
Workspace configuration
The configuration is one JSON object per workspace. Its top-level keys are setting names, many of them dotted, such as spend.monthlyBudgetUsd, retention.receiptsDays or ratelimit.<class> (see Rate limits). Ordinary keys can be written with an admin-scope key; protected keys, which decide spending, retention, rate limits and policy, can be changed only by a workspace admin signed in to the web workspace.
GET /api/tenant/config
Read the workspace configuration
Returns everything stored in the configuration object, including values written by the web workspace's Settings screens. Keys that begin with model.system are never included; the reviewed system model profiles are read with the systemProfiles parameter instead.
Access: API key with the read scope, or a signed-in workspace member.
| Name | Type | Description |
|---|---|---|
systemProfiles | "1" | Set to 1 to return the reviewed system model profiles instead of the configuration: { profiles, revision, captureId }, which is { "profiles": {}, "revision": 0, "captureId": null } before any review. These profiles list the models the platform's built-in features may use. |
Returns: The configuration object, or {} when nothing is stored. Values keep the JSON type they were written with.
| Status | Code | When |
|---|---|---|
| 503 | profile_capture_unavailable | systemProfiles=1 was requested and the profile store cannot be read. |
curl https://centerofagentic.com/api/tenant/config \
-H "Authorization: Bearer $COA_API_KEY"{
"assistant.model": "openai/gpt-4o-mini",
"spend.monthlyBudgetUsd": 250,
"retention.receiptsDays": 90
}PUT /api/tenant/config
Merge keys into the workspace configuration
The body is a JSON object that is merged into the stored configuration one top-level key at a time: each key you send replaces that key's whole value, and keys you do not send are kept. A key cannot be deleted, only overwritten (for example with null or false). Protected keys are refused for API keys: the families spend., ratelimit., retention., workspace., deepagents., idea. and model.system, and the keys requiredDatasetId, spendMonthlyBudgetUsd, clarificationQuestions and toolPolicy. Successful changes are written to the audit log.
Access: API key with the admin scope, or a signed-in workspace member. Protected keys need a workspace admin signed in to the web workspace; API keys and device tokens cannot change them. If the body contains one protected key, the whole request is refused.
| Name | Type | Description |
|---|---|---|
<setting key> | any JSON value | One or more top-level keys to set, for example "assistant.model": "openai/gpt-4o-mini" to pin the model of the in-app assistant. The keys customSkills, mcp, anything starting with mcp. and anything starting with agentGrants. are never accepted here because they have dedicated controls. |
Returns: The merged configuration object, in the same shape as the read.
| Status | Code | When |
|---|---|---|
| 400 | invalid_config_patch | The body is JSON but not an object, for example an array. |
| 403 | admin_required | The body contains a protected key and the caller is not a workspace admin signed in to the web workspace. |
| 400 | dedicated_skill_controls_required | The body contains customSkills; custom skills are changed through the skills endpoints. |
| 400 | dedicated_mcp_controls_required | The body contains mcp or a key starting with mcp.; use the MCP access controls. |
| 400 | dedicated_grant_controls_required | The body contains a key starting with agentGrants.. |
| 400 | profile_command_required | The body contains a key starting with model.system. Reviewed model profiles are not changed through this merge; a few of these keys answer admin_required or server_owned_profile_revision instead. Settings has no screen for reviewed model profiles today, and an API key cannot record one. |
| 409 | config_changed | The configuration kept changing while the request was applied; nothing was saved. Read it again and retry. |
curl -X PUT https://centerofagentic.com/api/tenant/config \
-H "Authorization: Bearer $COA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assistant.model": "openai/gpt-4o-mini"}'{
"assistant.model": "openai/gpt-4o-mini",
"spend.monthlyBudgetUsd": 250,
"retention.receiptsDays": 90
}GET /api/tenant/clarification
List the standard clarifying questions for new agents
These are the questions the agent builder asks when someone defines an agent, with the answer options the workspace offers. The built-in defaults are returned until a workspace admin customises them (at most 12 questions with 24 options each). An agent stores its answers in its clarification object, keyed by question key.
Access: API key with the read scope, or a signed-in workspace member.
Returns: { questions: [{ key, question, options, allowCustom }] }. allowCustom says whether a free-text answer is accepted in place of one of options.
{
"questions": [
{
"key": "produce",
"question": "What should this agent produce?",
"options": ["A written summary", "A structured report", "Recommendations"],
"allowCustom": true
},
{
"key": "authority",
"question": "How much authority should it have?",
"options": ["Answer questions only", "Draft content", "Recommend actions"],
"allowCustom": false
}
]
}Tool policy
The tool policy is a workspace-wide rule set checked on every connector tool call an agent makes. It can refuse a call or attach obligations such as approval; it never grants access by itself. It holds per-tool rules (a read or write classification, argument constraints and obligations) and allow and deny lists per connection. Changing it requires a workspace admin signed in to the web workspace.
GET /api/tenant/tool-policy
Read the tool policy and, optionally, one connection's tools
Without parameters it returns the stored policy and whether it is valid. When valid is false, policy is returned empty, errors lists the reasons, and connector tool calls are refused until a valid policy is saved. With connectionId it also lists that connection's tools with the classification in effect for each. For some connectors the tool list is fetched live from the connected system; if that fails, tools is empty and toolsError says why.
Access: API key with the read scope, or a signed-in workspace member. Listing the tools of a generic MCP server connection needs a workspace admin signed in to the web workspace.
| Name | Type | Description |
|---|---|---|
connectionId | uuid | A connector connection in the workspace whose tools should be listed with their policy status. |
Returns: { policy, valid, errors }. policy is { tools?, connections? }: tools maps <provider>:<tool> to { classification?, constraints?, obligations? } and connections maps a connection id to { allow?, deny? }. Obligations are log, approval, spend or redact:<class>. With connectionId the response adds connection: { id, name, provider }, allowListActive (whether an allow list is set for the connection), toolsError and tools. Each tool has name, key, heuristic (the classification guessed from the tool name), override (read, write or null), effective (the classification in use), rule (the tool's entry in policy.tools, or null) and list (allow, deny or null). heuristic and effective are objects { kind, basis, heuristic, verb }, where kind is read or write and basis is read_verb, write_verb, unrecognised or admin_override.
| Status | Code | When |
|---|---|---|
| 404 | not_found | connectionId does not match a connection in the workspace. |
| 403 | admin_session_required | connectionId names a generic MCP server connection and the caller is not a workspace admin signed in to the web workspace. |
curl "https://centerofagentic.com/api/tenant/tool-policy?connectionId=3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11" \
-H "Authorization: Bearer $COA_API_KEY"{
"policy": {
"tools": {
"jira:jira_create_issue": { "obligations": ["approval"] }
},
"connections": {
"3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11": { "deny": ["jira_transition_issue"] }
}
},
"valid": true,
"errors": [],
"connection": {
"id": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
"name": "Example Jira site",
"provider": "jira"
},
"allowListActive": false,
"toolsError": null,
"tools": [
{
"name": "jira_create_issue",
"key": "jira:jira_create_issue",
"heuristic": { "kind": "write", "basis": "write_verb", "heuristic": true, "verb": "create" },
"override": null,
"effective": { "kind": "write", "basis": "write_verb", "heuristic": true, "verb": "create" },
"rule": { "obligations": ["approval"] },
"list": null
},
{
"name": "jira_transition_issue",
"key": "jira:jira_transition_issue",
"heuristic": { "kind": "write", "basis": "write_verb", "heuristic": true, "verb": "transition" },
"override": null,
"effective": { "kind": "write", "basis": "write_verb", "heuristic": true, "verb": "transition" },
"rule": null,
"list": "deny"
}
]
}MCP access
The MCP server is closed today for every workspace, because Center of Agentic has not turned on the platform-wide switch. The workspace MCP switch and the per-key grants cannot be used yet either; this section documents the controls as they are built. Access to the MCP endpoint (POST /api/mcp) is granted per API key. A call is accepted only when all of these hold: the platform-wide switch that Center of Agentic controls is on (reported as platformEnabled), the workspace switch is on, and the calling key holds an active grant. A grant gives the key one fixed read-only profile, coa.read_metadata.v1, and never widens what the key can do over REST. Every check is made on each call, so switching off or revoking takes effect on the next one. These controls need a workspace admin signed in to the web workspace.
GET /api/tenant/mcp-clients
GatedRead the workspace MCP switch, the grants and the keys that can be granted
Status: Gated. Shipped, but closed until a switch described on this page is turned on.
Access: A signed-in workspace admin only. API keys are not accepted. Workspace admin signed in to the web workspace; API keys and device tokens are refused. This operation cannot be used yet. MCP calls are served only while the platform-wide switch that Center of Agentic controls is on.
Returns: { platformEnabled, tenant: { enabled, epoch, changedBy, changedAt }, limits: { activeGrantsPerTenant, revokedRetentionDays }, grants, eligibleKeys }. platformEnabled is the platform-wide switch that Center of Agentic controls and tenant.enabled is the workspace switch. Each grant has id, apiKeyId, keyName, profile, status (active or revoked), epoch, grantedBy, grantedAt, revokedBy and revokedAt; active grants come first. eligibleKeys lists { id, name, scopes } for keys that can still be granted. At most 200 grants and 200 keys are returned, and no key secret or prefix is included.
| Status | Code | When |
|---|---|---|
| 403 | admin_required | The signed-in caller is not a workspace admin. |
PUT /api/tenant/mcp
GatedTurn MCP access on or off for the workspace
Status: Gated. Shipped, but closed until a switch described on this page is turned on.
The workspace switch is off until a workspace admin turns it on. Turning it off refuses the next MCP call from every key in the workspace; REST access and the web workspace are not affected. epoch is a counter that increases with every change.
Access: A signed-in workspace admin only. API keys are not accepted. Workspace admin signed in to the web workspace; API keys and device tokens are refused. This operation cannot be used yet. The workspace switch has an effect only while the platform-wide switch that Center of Agentic controls is on.
| Name | Type | Description |
|---|---|---|
enabled required | boolean | true to allow MCP calls from granted keys, false to refuse them. |
Returns: { enabled, epoch }: the new switch state.
| Status | Code | When |
|---|---|---|
| 403 | admin_required | The signed-in caller is not a workspace admin. |
| 400 | enabled_required | enabled is missing or not a boolean. |
POST /api/tenant/mcp-clients
GatedGrant MCP access to an existing API key
Status: Gated. Shipped, but closed until a switch described on this page is turned on.
The default profile permits five metadata reads. Explicitly selecting the product-help profile also permits the fixed documentation reader, two documentation resources and two inspection prompts. Existing grants never change scope: revoke and grant again to expand one. A workspace can hold at most 10 active grants, and a key can hold one.
Access: A signed-in workspace admin only. API keys are not accepted. Workspace admin signed in to the web workspace; API keys and device tokens are refused. The grant has an effect only while the platform-wide switch that Center of Agentic controls and the workspace switch are both on.
| Name | Type | Description |
|---|---|---|
apiKeyId required | uuid | The id of an active API key in this workspace. |
profile | "coa.read_metadata.v1" | "coa.read_metadata_help.v1" | Optional fresh consent for metadata only (default) or metadata plus fixed product help. Does not edit an existing grant. |
Returns: 201 with { grant }, in the same shape as an entry of grants in the read.
| Status | Code | When |
|---|---|---|
| 403 | admin_required | The signed-in caller is not a workspace admin. |
| 400 | api_key_id_required | apiKeyId is missing or not a UUID. |
| 400 | invalid_profile | The requested profile is not supported. |
| 503 | documentation_profile_unavailable | The product-help profile is not ready on this deployment. |
| 404 | key_not_found | No key with that id exists in this workspace. |
| 400 | revoked_key | The key has been revoked. |
| 400 | expired_key | The key has expired. |
| 400 | external_agent_key | The key belongs to a registered external agent. |
| 400 | no_read_scope | The key carries no valid scope. |
| 409 | already_granted | The key already holds an active grant. |
| 409 | grant_limit_reached | The workspace already has 10 active grants. |
DELETE /api/tenant/mcp-clients/{id}
GatedRevoke an MCP grant
Status: Gated. Shipped, but closed until a switch described on this page is turned on.
Revocation is final: the key's next MCP call is refused, while the key keeps working for REST. Granting the same key again creates a new grant.
Access: A signed-in workspace admin only. API keys are not accepted. Workspace admin signed in to the web workspace; API keys and device tokens are refused. This operation cannot be used yet.
| Name | Type | Description |
|---|---|---|
id required | uuid | The grant's id from the read (not the API key id). |
Returns: { grant }, with status now revoked and revokedBy and revokedAt set.
| Status | Code | When |
|---|---|---|
| 403 | admin_required | The signed-in caller is not a workspace admin. |
| 404 | grant_not_found | No active grant has that id, or the id is not a UUID. |
App building access
App building is the Idea Room feature that turns a described idea into a working prototype app. A workspace admin chooses in the web workspace which roles may build. This read-only call reports that choice together with the workspace's monthly build allowance.
GET /api/tenant/build-access
Read who can build apps and the monthly build allowance
available says whether the platform is accepting builds right now. capacity gives the workspace's allowance for the current month in US dollars, how much of it is used and when it resets. App building itself is for people signed in to the web workspace, so for an API key yourRole is member and yourRoleCanBuild and operatorGrant are always false.
Access: API key with the read scope, or a signed-in workspace member.
Returns: { available, capacity: { paused, allowanceUsd, allowanceUsedUsd, resetsAt }, roles, yourRole, yourRoleCanBuild, operatorGrant }. roles has one entry for org:admin (workspace admins) and one for org:member, each with role, enabled, changedAt and changedByYou; workspace admins signed in to the web workspace also see changedBy.
| Status | Code | When |
|---|---|---|
| 503 | build_access_unavailable | App building access is not set up on the deployment. |
curl https://centerofagentic.com/api/tenant/build-access \
-H "Authorization: Bearer $COA_API_KEY"{
"available": true,
"capacity": {
"paused": false,
"allowanceUsd": 25,
"allowanceUsedUsd": 3,
"resetsAt": "2026-12-01T00:00:00.000Z"
},
"roles": [
{ "role": "org:admin", "enabled": true, "changedAt": "2026-11-20T09:14:02.000Z", "changedByYou": false },
{ "role": "org:member", "enabled": false, "changedAt": null, "changedByYou": false }
],
"yourRole": "member",
"yourRoleCanBuild": false,
"operatorGrant": false
}Voice readiness
Read the last verification of Idea Room voice for this workspace. This does not run a probe or call a model.
GET /api/tenant/voice-verification
Read the workspace's voice verification status
Returns the saved voice verification and the latest probe. A saved verification can expire or cease to match the workspace's current retention mode. If this deployment has not been set up for verification, the request returns 503 voice_verification_unavailable. A successful response does not establish that a new voice turn will succeed.
Access: API key with the read scope, or a signed-in workspace member. Read only. Running a new probe requires a workspace admin signed in to the web workspace and can incur model charges. canVerify is always false for an API key.
Returns: An object with verified (boolean), reason (null or no_model_key, no_row, expired, retention_mismatch, route_unverified), verifiedAt and expiresAt (ISO 8601 timestamps or null), route (standard or zero-retention), retention (standard or zero), maximumTurnUsd (number or null), lastProbe, canVerify and retryAt (ISO 8601 timestamp or null). lastProbe is null or an object with at (ISO 8601), ok (boolean or null), code (string or null), costUsd (number or null) and trigger (string). The response is sent with Cache-Control: no-store.
| Status | Code | When |
|---|---|---|
| 503 | voice_verification_unavailable | Voice verification has not been set up on the deployment. |
curl https://centerofagentic.com/api/tenant/voice-verification \
-H "Authorization: Bearer $COA_API_KEY"Something missing or unclear? Tell us and we will improve this page.