---
title: "Biocompile API scopes and permissions"
description: "Every Biocompile API scope, what it allows, which scopes to choose for common tasks, and why spending:approve, contributions:write and agent:converse need care"
url: https://www.biocompile.com/docs/api-scopes/
section: "API and integrations"
last_updated: 2026-11-20
app_url: https://app.biocompile.com/settings
---

# Biocompile API scopes and permissions

> Every Biocompile API scope, what it allows, which scopes to choose for common tasks, and why spending:approve, contributions:write and agent:converse need care

Source: https://www.biocompile.com/docs/api-scopes/. Index of all Biocompile documentation: https://www.biocompile.com/docs/index.md

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, their revisions, project versions and contributions, and your workbenches and drafts. | |
| `entities:write` | Open workbenches and draft changes to research records in them. | `entities:read` |
| `contributions:write` | Contribute drafts from your workbenches to projects you can change. A contribution merges at once. | `entities:write` |
| `files:read` | Read published files and the files in your workbenches, and download them. | |
| `files:write` | Upload, rename, move, replace and delete files in your workbenches, as drafts. | `files:read` |
| `runs:read` | Read the catalog of analyses, Computes, 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 your 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:write` contributes drafts, which merges them into the project at once and
records you as the person who decided. Service accounts can never contribute, whatever their
scopes: they draft, and a person contributes.

> **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 Auto Mode settings. Approving one the assistant asks to make
  through the API needs `contributions: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](https://www.biocompile.com/docs/api-conversations.md).

## 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:write` | Merging a contribution into a project 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 a workbench | `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 draft changes for you to contribute | `projects:read entities:write files:write` |
| Let an AI assistant manage a project end to end | `projects:write contributions:write 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:write` and `agent:converse`. The first commits credits,
the second merges changes into 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

- [API authentication](https://www.biocompile.com/docs/api-authentication.md)
- [Run analyses and approve spending](https://www.biocompile.com/docs/api-runs-and-spending.md)
- [Read a project's history through the API](https://www.biocompile.com/docs/api-contributions.md)
- [Biocompile API reference](https://www.biocompile.com/docs/api-reference.md)

## Get access to Biocompile

Biocompile is used in the browser at https://app.biocompile.com. It is free to start and no payment method is required: sign up at https://app.biocompile.com/signup?mc_cta=docs-md&mc_path=/docs/api-scopes.md. If your team already uses Biocompile, ask an organization admin to invite you. Research teams that want hands-on setup can apply for the founder-led pilot at https://www.biocompile.com/pilot/. Questions: https://www.biocompile.com/contact/.
