Skip to content

Review Biocompile contributions through the API

Last updated

On this page

The Biocompile API reads a project’s contributions and decides them as you would in the app. With entities:read a token reads the review queue, and with contributions:review it accepts, declines or sends back a contribution for you. Accepting applies the changes to the project in the same call.

A contribution is the reviewed set of changes through which work from a Biocompile conversation reaches a project. The assistant creates them, and so does submitting a workbench through the API.

Read the review queue

GET .../research-projects/{project_id}/contributions lists a project’s contributions, newest first. Filter with status=awaiting_approval for the ones that wait for review:

curl -s "https://app.biocompile.com/api/v1/organizations/$ORG_ID/research-projects/$PROJECT_ID/contributions?status=awaiting_approval" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Each contribution lists its proposed changes with a before and after, any conflicts, the decision once made, and a review_url that opens it in Biocompile. available_actions says what your token may do with it now. Pages hold up to 100 items, and next_cursor fetches the next page.

A contribution has one of these statuses:

StatusMeaning
awaiting_approvalWaits for a person to review it
appliedAccepted, and its changes are in the project
revision_requestedSent back to its author with instructions
conflictedThe project changed and the changes no longer fit
withdrawnDeclined by a reviewer, or withdrawn by its author

Decide a contribution

Each decision matches a button in the app:

OperationIn the appWhat happens
POST .../acceptAccept contributionThe changes are applied to the project at once.
POST .../withdrawDecline, or Withdraw for your ownThe contribution is closed, and the project does not change.
POST .../request-revisionRequest revisionThe contribution goes back to its author with your instructions.

The paths continue from .../contributions/{contribution_id}. Accepting and declining take an optional reason:

curl -s --request POST "https://app.biocompile.com/api/v1/organizations/$ORG_ID/research-projects/$PROJECT_ID/contributions/$CONTRIBUTION_ID/accept" \
  -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \
  -d '{"reason": "Checked against the raw plate reader data."}'

Only a contribution that is awaiting_approval can be accepted or declined. If the project changed and the changes no longer fit, accepting applies nothing and the contribution becomes conflicted. Request a revision to resolve it.

Who may decide

The rule is the app’s: whoever can open the project may decide its contributions, including their own. Through the API, a person decides:

  • A personal access token decides as you.
  • An AI assistant or partner app with contributions:review decides as you, and the record names the app.
  • A service account can read contributions but never decide them.
  • A project whose change policy is observe only refuses accept, but declining still works.

Note: A token with both entities:write and contributions:review can accept changes it proposed itself. Grant contributions:review only to credentials you use to review.

Every decision sends the contribution.decided webhook event, as a decision in the app does.

Common questions

Can a script accept contributions without anyone opening Biocompile?

Yes, with a personal access token or an app acting for you that holds contributions:review. The decision is recorded as yours.

Can a service account accept a contribution?

No. A service account is not a person, so it is refused with 403 and the code service_account_not_supported. It can still read contributions.

What does accepting do when the project has changed?

It applies nothing. The contribution becomes conflicted with its conflicts listed, and you request a revision.

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