Skip to content

Biocompile API scopes and permissions

Last updated

On this page

A scope in the Biocompile API names one kind of access, such as reading Runs or uploading files. Every credential carries a set of scopes, and every operation names the scopes it needs. A token that lacks one is refused with 403 and the code insufficient_scope.

Scopes limit and never grant

A scope never gives access you do not already have. What a token can do is the overlap of two things:

  • Your own permissions in the app, checked live on every call.
  • The token’s scopes.

projects:read lets a token list the projects you can see, not every project in the organization. If your role changes or you leave an organization, your tokens change with you on the next call. A service account is checked the same way, limited to the projects granted to it.

The scopes

Biocompile has twelve scopes. A write scope includes reading the same resource, and nothing else:

ScopeAllowsIncludes
projects:readList and read organizations and research projects you can access.
projects:writeCreate, rename and archive research projects.projects:read
entities:readRead research records: hypotheses, observations and other records.
entities:writePropose changes to a project, staged for a person to review.entities:read
contributions:reviewAccept, decline or send back contributions. Accepting applies the changes.entities:read
files:readList, read and download Knowledge Atlas files.
files:writeUpload, organize and delete Knowledge Atlas files.files:read
runs:readRead the catalog of analyses, Runs, Run logs and artifacts.
runs:executePlan and start analyses, and cancel Runs.runs:read
spending:approveApprove spending and network access without the app, open conversations in full auto mode, and let Auto Mode approve paid analyses.
agent:converseHold conversations with the AI research assistant, read them and answer its questions and approvals.
webhooks:manageCreate, change and delete webhook subscriptions.

runs:execute does not include files:read. To start an analysis on Knowledge Atlas files, the token needs both.

Sensitive scopes

Three scopes let a token make a decision that otherwise needs a person in the app. Biocompile marks them Sensitive wherever you choose or approve scopes.

spending:approve commits credits without anyone opening Biocompile. With runs:execute, the token can approve the cost of an analysis and start it. With agent:converse, it can open conversations in full auto mode and approve the assistant’s paid analyses. Your organization’s spending limits and paid-tool settings still apply. A leaked token holding it can spend up to those limits until you revoke it.

contributions:review accepts contributions, which applies their changes to the project at once. A token that also holds entities:write can accept changes it proposed itself, just as you can in the app. Service accounts can never decide a contribution, whatever their scopes.

Note: Grant the sensitive scopes only to credentials you trust to make that decision for you, and give them the shortest lifetime that works.

The agent:converse scope

agent:converse is broader than its name suggests. A conversation behaves the same whether it is opened in the app, through the API or over MCP, and the assistant acts as you. A token with only this scope can read anything you can read in the organization, run code in your sandboxes, write files and run analyses. Grant it only to a credential you would let work in Biocompile as you. Some things stay out of its reach:

  • Approving a paid analysis, and opening a conversation in full auto mode, need spending:approve too, because they commit credits.
  • Contributions follow your review settings. Submitting one for review through the API needs entities:write.
  • Service accounts cannot hold conversations, and an OAuth app sees only the conversations it opened.

The full rules are under Talk to the Biocompile assistant through the API.

Scopes a service account cannot hold

A service account cannot be given three scopes. An admin who tries gets the error invalid_scope (400) that names the scope and the reason:

ScopeWhy a service account cannot hold it
agent:converseThe assistant works only for a person.
contributions:reviewAccepting or declining a contribution is a person’s decision.
webhooks:manageWebhooks need an organization admin, and a service account is never one.

Two other scopes work only in part. projects:write lets a service account rename and archive the projects granted to it, but not create one. spending:approve approves the account’s own plans and network access, but cannot open full auto mode.

Choose scopes for a task

Most scripts need two or three scopes:

TaskScopes
Report on projectsprojects:read
Export hypotheses and observationsprojects:read entities:read
Sync files into Biocompilefiles:write
Download the results of finished Runsruns:read
Start analyses on uploaded files and fetch the resultsruns:execute files:read
Run paid analyses with no one in the appruns:execute spending:approve files:read
Let an AI assistant manage a project end to endprojects:write entities:write contributions:review files:write runs:execute

Common questions

Can a scope give a token more access than I have?

No. Scopes only narrow your own permissions. A token with every scope still sees only what you can see in the app.

Which Biocompile scopes are sensitive?

spending:approve, contributions:review and agent:converse. The first commits credits, the second applies changes to projects, and the third lets the assistant act as you, all without anyone opening the app.

What happens when a token is missing a scope?

The API answers 403 with the code insufficient_scope, and the WWW-Authenticate header names the scope. Add it to the credential, then exchange the credential again.

Controller: Biocompile, Inc.

Your first project starts here.

Free to start, with credits included.

We use this address to prefill your signup. A founder may email you once to help you get started. No newsletter. Privacy Policy

Already have an account? Sign in