Authorization: Bearer mk_your_api_key and apply across the organization’s workspaces. X-Workspace-Id narrows a request; it does not grant access to a different organization.
Restricted mode
Restricted mode is off by default, granting full access. Enable it to reveal a None / Read / Write control for each entity:
The UI’s Write level grants both explicit scopes. At the API enforcement layer,
entity:write alone does not imply entity:read. Existing keys retain full access. A key’s scopes: null means full access; an empty list means no entity permissions. The editor requires at least one permission when creating a restricted key.
Entity scopes
Scopes grant permission to call an API surface; they do not enable a feature or bypass plan, organization, workspace, or product availability checks. Streaming is currently limited to enabled organizations.
/automations/runs requires agent_runs:read; /automations/ingest-batches requires triggers:read.
Give a dashboard agent read-only access
Enable Restricted mode. Set Agents, Agent runs, and Triggers to Read, and leave other entities at None. The resulting scopes are:GET /whoami verifies a valid key and returns its scopes even if the key has no entity permissions. It does not grant access to other endpoints. Keys cannot elevate their own permissions; ask an organization owner or admin for a replacement key when an integration needs additional access.
Handle permission errors
A missing scope returns HTTP 403 with a stablecode, required_scope, and the current granted_scopes. retryable: false means the agent must stop retrying this operation with the same key.
api_key_scope_required, explain the missing scope to the user and request an owner/admin-issued key with that permission. Do not silently request full access or attempt another endpoint to bypass the restriction.
For api_key_scope_unsupported, required_scope is null: the requested endpoint is not classified for restricted keys. Use a documented endpoint or contact Mosaic support. This is not a scope name to grant.
Other authorization failures, such as paid-plan requirements or a conflicting workspace, also return 403 with detail; do not assume every 403 is a scope denial. Invalid or revoked keys return 401.