Skip to main content
The Bentra API lets scripts, integrations and AI agents do what people do in the Bentra UI: create and configure workflows, submit and approve requests, trigger and follow runs, and administer the organization. The Bentra MCP server is built on it. Every call acts as a user and can only do what that user can do in the UI.

Base URL

Paths on these pages are relative to that base. Swagger UI for your organization is at /orgs/<org-id>/api/v1/docs/ when you’re signed in.

Authentication

Send a token as a bearer token:
A token belongs to one organization; using it on another organization’s URL returns 401.

Scopes

Personal tokens carry * (all scopes). Delegated tokens carry the named scopes, and every endpoint lists the scope it needs. Scopes narrow what a token can reach; they never grant more than the user’s own permissions.

What stays in the UI

Anything that takes or mints a secret stays in the UI: adding VCS connectors or changing their credentials, runner tokens and personal API tokens. You can list connectors and runner pools so you can choose one, and rename, move or re-share a connector. Single sign-on is partly here: domains, provisioning and setup links, but a person connects the identity provider in the WorkOS assistant.

Conventions

Pagination. Lists return {"count", "next", "previous", "results"}. Use page and page_size (default 25, max 100). Success. Writes return {"success": true, ...} with the changed object, 201 on create. Deletes return 204 or {"success": true}. Errors. Naming people and groups. Where a body takes a user, pass a user id, username or email of a member of the organization. Where it takes a group, pass the group’s id or name.

Resources

  • Organization: connectors, repositories, branches and tags, runner pools, portal branding
  • Administration: organization details, members, invitations, workspaces, groups
  • Workflows: create (local or repo-backed), details, settings, schedule, status
  • Workflow access: approvers, roles, form visibility
  • Files and versions: files of Bentra-stored workflows, publishing and pinning versions
  • Variables: variable collections and workflow variables
  • Requests: submit, follow, comment, update, approve
  • Runs: trigger jobs, follow runs, logs, re-run, cancel
  • Job datasets: versions, promote, freeze, data scope and read grants
  • Single sign-on: status, allowed domains, member provisioning, setup links