Docs
Agents and API

API keys and scopes

Create, scope, use, rotate and revoke API keys, the credentials scripts, integrations and agents use for programmatic access.

API keys authenticate programmatic callers (scripts, integrations and AI agents) as you, limited to the scopes and artifacts you grant. A key is a bearer credential issued by the platform's authentication service.

Create a key in the console

  1. Open Settings → API keys and choose Create key.
  2. Select the scopes the key needs. Read, write, render, share, publish and delete are distinct permissions; grant the minimum.
  3. Optionally restrict the key to particular artifacts.
  4. Copy the revealed key once. It is never shown again.

Use a key

Send the key as a bearer credential in the Authorization header of your requests:

curl -H "Authorization: Bearer <your-key>" \
  https://api.xentropy.ai/api/v1/artifacts

Scopes

Permissions are distinct and independently grantable:

ScopeAllowsAgent default
artifacts:readList and read artifacts, versions and outputs✓
artifacts:writeCreate, edit, refresh, trash and restore artifacts✓
artifacts:renderExport images and files; read and cancel export jobs✓
artifacts:shareCreate and revoke share linksopt-in
artifacts:publishPublish and unpublish with reviewed metadataopt-in
artifacts:deletePermanently delete trashed artifactsopt-in
dashboards:readList and read dashboards✓
dashboards:writeCreate, edit, trash and restore dashboards✓
dashboards:deletePermanently delete trashed dashboardsopt-in
data:readPreview and inspect dataset definitions and saved datasets✓
data:writeCreate, bind and delete reusable datasets; uploads✓
connections:readList your connections; discover, preview and read the sources you selected✓
connections:writeWrite through Google integrations (Sheets, Drive)opt-in
connections:manageVerify and create connections; requires unrestricted connection accessopt-in

Agent default is the set an assistant receives when you choose Allow access and saving while connecting it. Opt-in scopes are granted only when the assistant asks for them and you approve them. MCP lists only the tools your grant can call. An existing connection never gains new scopes: reconnect the assistant to approve a larger set.

Folders

Folders add no new scope. Reading folders needs any read scope; changing them needs any write scope. folders_items_move checks the scope of each item's kind: artifacts:write, dashboards:write, data:write for datasets, and data:write or connections:write for connections. Moving organises items and does not change who can see them. See Folder tools.

Restrictions

  • Artifact restriction: optionally pin the key to specific artifacts; requests outside the set fail authorization.
  • No credential minting: an agent cannot create or rotate another agent's credentials.
  • Ownership first: scopes never bypass ownership checks on another user's resources.

Rotate and revoke

  • Rotate replaces a key with a new credential in one step. Use it as routine hygiene or after any suspected exposure.
  • Revoke disables the key immediately; the next request with a revoked key fails authorization.

Handling rules

Treat keys like secrets

Keep keys in your secret manager or process environment. Never place them in source code, project files, command-line arguments, URLs, logs, or analytics.

  • One key per integration, named for what it belongs to.
  • Prefer artifact-restricted keys for agents working on specific artifacts.
  • Rotate on a schedule; revoke immediately when an integration is retired.

Agent data workflow

Use data_preview_definition to inspect a source before saving it with data_datasets_create. Alternatively, artifacts_create accepts a direct source: {definition, mode: "live" | "snapshot"} without a saved dataset. connections_create accepts configuration and an idempotency key. Inject credentials programmatically from a secure process environment, never in chat. Connection creation verifies TLS, login and selected relation permissions; responses include metadata only. Retry identical input with the same key.

On this page