REST API

Read workflows, runs, flags, teams and insights from your own systems, queue runs, resolve flags and draft workflows.

The OpsBrain API lets your ERP, WMS, BI tool or a script of your own read what your teams do and act on it. It uses JSON over HTTPS, with one API key per system.

Your first call

Every endpoint lives under url.

Send your API key on every request in the header header. A manager creates keys in Integrations, API keys. See

API keys

path tells you which organization and key a request uses, and what the key can do. It's the quickest way to check a key works:

Response

Bodies are JSON with snake_case fields. Ids are UUIDs and times are ISO 8601 in UTC.

A key only sees its own organization. An id from another organization answers status, the same as an id that doesn't exist.

The API is meant for servers. Websites on other domains can't call it from a browser, so keep the key and the calls on your server.

Endpoints

Paths are relative to the base address. Each endpoint needs the scope shown, and the key's scopes are chosen when a manager creates it.

Endpoint

What it does

Scope

Any key

The organization, the key, its scopes and owner.

Lists workflows, with their status and live version.

One workflow with its live steps, choices, decisions and which steps ask for a photo or file.

Every version of a workflow, newest first.

Health score, completion and the steps where people skip or raise flags, for the last 7 or 30 days (?window=7 or 30).

Starts a draft workflow from a written description. A manager reviews and publishes it in OpsBrain.

Lists runs, with who did them, when, and how they went.

One run with every step: the answer, skips and their reasons, notes and flags.

Puts a run in a team's queue, with a reference from your system and answers filled in ahead.

Lists flags workers raised on steps.

One flag.

Resolves a flag.

Reopens a resolved flag.

Lists teams.

One team, with how many members and workflows it has.

The runs waiting in a team's queue for someone to claim them.

A team's health score and bottlenecks for the last 7 or 30 days.

Members of the organization with their email, role and teams.

Suggestions OpsBrain made to improve workflows. Read only.

What the API never does

It can't publish a workflow, accept or reject a suggestion, archive or delete anything, or manage members, teams, billing, settings or keys. A manager does those in OpsBrain.

Lists, filters and sorting

Lists return 25 items by default. Ask for up to 100 with limit, and page with cursor:

Request

Response

To get the next page, send nextCursor back as cursor with the same filters and sort. Stop when hasMore is false. Unlike page numbers, a cursor doesn't shift when new items arrive while you page.

Filters go in the query as filter and sorting as sort, where a minus sign means newest or highest first. Dates take ISO 8601. Each list accepts these:

List

filter[...]

sort

Default

None

Queue runs, resolve flags, draft workflows

path puts a run of a live workflow in a team's queue, the same way a trigger does. Someone on the team claims it on their phone and works through it:

Request

Response

Leave out field and any team assigned to the workflow can claim it. The team has to be assigned to the workflow.

field fills in short text, long text, number and date steps ahead of time. A worker can change an editable answer, can't change a readonly one, and has to check a confirm one before moving on. Step ids come from GET /workflows/{id}.

If one answer doesn't fit its step, nothing is queued and the error names the field, like path.

resolve and reopen change a flag. Both are safe to repeat: resolving a resolved flag changes nothing.

path takes fields and starts a draft from the description, the way capturing from text works in the app. The response includes reviewUrl, where a manager reviews and publishes it. A draft counts as a capture and an AI job, so your plan's limits apply as they do in the app.

Retry without doing it twice

Send a unique header with any POST. If the same key comes again within 24 hours, you get the first response back with replayed and nothing happens twice. Only successful requests are kept, so you can fix a rejected request and send it again with the same key.

Each write is recorded with the key's name. A queued run shows the key's name as its source in OpsBrain, and a resolved flag shows the key's owner as the person who resolved it.

Rate limits

Each key has its own limits. On top of them, all the keys in an organization share a limit set by its plan:

Limit

Requests

Reads per key

Writes per key

Writes per key per day

All keys together, Free plan

All keys together, Growth plan

All keys together, Business and Enterprise plans

Responses to a valid key carry limit and remaining for the limit you're closest to. Over a limit, you get status with retry, the number of seconds to wait. Calls from AI assistants through the MCP server count against the same limits.

Versions and the OpenAPI file

The version is in the address: version. Within v1 we only add things: new endpoints, new fields, new error codes. Ignore fields you don't recognize and your code keeps working.

A change that could break your code gets a new version. When v2 arrives, v1 keeps working for at least six months, and its responses carry deprecation and sunset headers so you know when it ends.

The whole contract is in an OpenAPI 3.1 file at url. It needs no key, so you can load it into Postman, an SDK generator or your API gateway.

A run, a workflow and a flag use the same field names as in webhook payloads, so code that reads one can read the other. See

the webhooks article