Page options
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:
| Scope | Allows | Includes |
|---|---|---|
projects:read | List and read organizations and research projects you can access. | |
projects:write | Create, rename and archive research projects. | projects:read |
entities:read | Read research records: hypotheses, observations and other records. | |
entities:write | Propose changes to a project, staged for a person to review. | entities:read |
contributions:review | Accept, decline or send back contributions. Accepting applies the changes. | entities:read |
files:read | List, read and download Knowledge Atlas files. | |
files:write | Upload, organize and delete Knowledge Atlas files. | files:read |
runs:read | Read the catalog of analyses, Runs, Run logs and artifacts. | |
runs:execute | Plan and start analyses, and cancel Runs. | runs:read |
spending:approve | Approve spending and network access without the app, open conversations in full auto mode, and let Auto Mode approve paid analyses. | |
agent:converse | Hold conversations with the AI research assistant, read them and answer its questions and approvals. | |
webhooks:manage | Create, 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:approvetoo, 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:
| Scope | Why a service account cannot hold it |
|---|---|
agent:converse | The assistant works only for a person. |
contributions:review | Accepting or declining a contribution is a person’s decision. |
webhooks:manage | Webhooks 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:
| Task | Scopes |
|---|---|
| Report on projects | projects:read |
| Export hypotheses and observations | projects:read entities:read |
| Sync files into Biocompile | files:write |
| Download the results of finished Runs | runs:read |
| Start analyses on uploaded files and fetch the results | runs:execute files:read |
| Run paid analyses with no one in the app | runs:execute spending:approve files:read |
| Let an AI assistant manage a project end to end | projects: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.
Related
Was this page helpful?
Something wrong or missing?