---
title: "REST API: ModernCI docs"
description: "Every REST operation, its path and its auth; OpenAPI at /openapi.json."
url: https://modernci.dev/docs/api/
---

# REST API reference

> Generated from the operation table in the ModernCI source (`crates/mci-api/src/ops.rs`, commit `32cae87556`), so the REST API, MCP tools and CLI stay in step. ModernCI is pre-launch: names and fields may change.

The API is served by the region that holds your project. Send a bearer token created by a tenant admin. A machine-readable description is at [/openapi.json](/openapi.json).

| Method and path | Operation | What it does | Auth | Status |
|---|---|---|---|---|
| `GET /health` | `health.get` | Is this install up | none | available |
| `GET /v1/health/detail` | `health.detail` | Health with the engine lease holder, server version and standing alarms | token | available |
| `GET /v1/auth/methods` | `auth.methods` | Which sign-in methods this install offers | none | available |
| `POST /v1/probe/canned` | `probe.canned` | Run the canned PR request end to end for the outside prober | token | available |
| `POST /v1/tokens` | `tokens.create` | Create a person or agent with a token (shown once) | token | available |
| `POST /v1/support-access` | `support.grant` | Let the platform operator support this tenant for a limited time | token | available |
| `DELETE /v1/support-access/{tenant}` | `support.revoke` | End operator support access to this tenant | token | available |
| `GET /v1/audit` | `audit.list` | Read a tenant's audit log | token | available |
| `PUT /v1/delegated-approval` | `delegated.set` | Turn delegated-approval mode on or off for the named tenant | token | available |
| `GET /v1/repos/{repo}/prs` | `prs.list` | List PRs with their status and wait reason | token | available |
| `GET /v1/prs/{pr}` | `prs.get` | Show one PR: diff, checks, logs, approvals, cost, wait reason | token | available |
| `POST /v1/prs` | `prs.done` | Submit a pushed branch as a PR and leave | token | available |
| `POST /v1/prs/{pr}/claim` | `prs.claim` | Claim an unclaimed PR | token | available |
| `GET /v1/work` | `work.mine` | My open work: reds, conflicts, approvals | token | available |
| `POST /v1/work/{item}/claim` | `work.claim` | Claim a work item | token | available |
| `POST /v1/work/{item}/report` | `work.report` | Report progress and agent spend | token | available |
| `POST /v1/work/{item}/ask` | `work.ask` | Ask a person a question about a work item | token | available |
| `POST /v1/work/{item}/release` | `work.release` | Let go of a claimed work item | token | available |
| `POST /v1/prs/{pr}/dequeue` | `prs.dequeue` | Take my PR out of the merge queue | token | available |
| `GET /v1/prs/{pr}/queue-exits` | `prs.queue_exits` | Why a PR left the merge queue | token | available |
| `GET /v1/prs/{pr}/activity` | `prs.activity` | Activity log of a PR: pushes, checks, approvals, queue exits | token | available |
| `POST /v1/requests/pause` | `requests.pause` | Ask a person to pause or resume runs in a project | token | available |
| `POST /v1/config/check` | `config.check` | Check .ci files: schema errors with file and line | token | available |
| `POST /v1/config/simulate` | `config.simulate` | What a .ci change would run, and whether it changes the gate | token | available |
| `GET /v1/projects/{project}/savings` | `savings.get` | Spend, waste and agent spend for a project | token | available |
| `GET /v1/agents/bundle` | `agents.bundle` | The agent skill bundle for a client, generated from this table | none | available |
| `GET /v1/agents/errors` | `agents.errors` | The closed agent error catalogue | none | available |
| `GET /v1/events` | `events.watch` | Stream my events with replay from a sequence number | token | available |
| `GET /v1/runs/{run}/log` | `runs.log` | Read a run's log | token | available |
| `POST /v1/prs/{pr}/checks/{check}/rerun` | `checks.rerun` | Re-run a check with a stated reason | token | coming (not implemented yet) |
| `POST /v1/prs/{pr}/approvals` | `approvals.create` | Approve or reject a guarded change with a passkey | token + passkey | available |
| `GET /v1/signer/keys` | `signer.keys.pending` | Signer keys waiting for owner approval: each key's purpose, kind, rotation and new public key | token | available |
| `POST /v1/signer/keys/challenge` | `signer.keys.challenge` | Get a passkey challenge bound to the exact signer key request | token | available |
| `POST /v1/signer/keys/approve` | `signer.keys.approve` | Approve the signer key request with a passkey; the signer verifies it itself | token | available |
| `GET /v1/passkeys` | `passkeys.list` | My passkeys in this region and whether each is confirmed; for a tenant admin, members' passkeys waiting for confirmation | token | available |
| `POST /v1/passkeys/bind/challenge` | `passkeys.bind.challenge` | Get a passkey challenge that confirms one passkey here (cosigned by another of mine, confirmed by a tenant admin, enrolled with a code from the operator) or proves I hold it | token | available |
| `POST /v1/passkeys/bind` | `passkeys.bind` | Confirm a passkey here with an assertion by a passkey already confirmed here (mine, or a tenant admin's for a member) | token | available |
| `POST /v1/passkeys/enrol` | `passkeys.enrol` | Confirm my first passkey here with the one-time code from the operator and an assertion by that passkey | token | available |
| `POST /v1/passkeys/revoke` | `passkeys.revoke` | Revoke a passkey here (mine, or a member's as a tenant admin): it never approves again | token | available |
| `GET /v1/settings/{level}/{scope}/{setting}` | `settings.get` | Effective value of a setting, where it comes from, and its lock | token | available |
| `PUT /v1/settings/{level}/{scope}/{setting}` | `settings.set` | Set or lock a setting at a level | token | available |
| `POST /v1/tenants` | `tenants.create` | Create a tenant | token | available |
| `POST /v1/projects` | `projects.create` | Create a project | token | available |
| `POST /v1/projects/{project}/repos` | `repos.create` | Add a repo to a project | token | available |
| `POST /v1/forges` | `forges.connect` | Choose the forge plugin for a tenant or project, with its config | token | available |
| `POST /v1/computes` | `computes.connect` | Choose the compute plugin for a tenant or project, with its config and overflow classes | token | available |
| `POST /v1/roles` | `roles.grant` | Grant a role | token | available |
| `POST /v1/roles/revoke` | `roles.revoke` | Take a role away | token | available |
| `GET /v1/members` | `members.list` | List a tenant's people and agents with their roles | token | available |
| `PUT /v1/projects/{project}/secrets/{name}` | `secrets.put` | Write a secret (write-only) | token | coming (not implemented yet) |
| `POST /v1/pause` | `runs.pause` | Pause new runs at a scope | token | available |
| `POST /v1/resume` | `runs.resume` | Resume runs at a scope | token | available |
| `POST /v1/stop` | `runs.stop` | Stop: pause and cancel running jobs | token | available |
| `GET /v1/plan` | `runs.plan` | Jobs and worst-case cost that would start now | token | coming (not implemented yet) |
| `GET /v1/me` | `me.get` | Who I am: identity, tenant, roles, passkeys | token | available |
| `POST /v1/users/link` | `users.link` | Link a globally signed-in user to an identity of this tenant | token | available |
| `GET /v1/repos` | `repos.list` | Repos I can see, with open and red PR counts | token | available |
| `GET /v1/prs` | `prs.search` | Search PRs across the repos I can see | token | available |
| `GET /v1/prs/{pr}/diff` | `prs.diff` | A PR's diff against its target, guarded files marked | token | available |
| `POST /v1/prs/{pr}/approvals/challenge` | `approvals.challenge` | Get a passkey challenge bound to a PR's exact head and guarded files | token | available |
| `GET /v1/repos/{repo}/promotions` | `promotions.list` | List promotion, revert and reconcile PRs: kind, source, target, promoted commit, hold reason, checks | token | available |
| `GET /v1/promotions/{pr}` | `promotions.get` | Show one promotion, revert or reconcile PR with its checks, approvals and hold reason | token | available |
| `GET /v1/repos/{repo}/promotion-status` | `promotion.status` | Each promotion pair of a repo (dev -> qa -> main): tips, what is ahead, held and why | token | available |
| `POST /v1/promotions/{pr}/challenge` | `promotion.challenge` | Start a passkey ceremony bound to a promotion's exact commit and the guarded files it changes | token | available |
| `POST /v1/promotions/{pr}/approvals` | `promotion.approve` | Approve a promotion, or reject it with a reason (which opens the revert), with a person's passkey | token + passkey | available |
| `GET /v1/settings/{level}/{scope}` | `settings.list` | Every setting and feature at a level, with value, source and lock | token | available |
| `GET /v1/stats` | `stats.flow` | Merge queue flow: PRs arrived, landed and red, cost, time to land | token | available |
| `POST /v1/events/ack` | `events.ack` | Acknowledge my events up to a sequence number | token | available |
| `GET /v1/projects/{project}/runs` | `runs.list` | Runs started with `mci run`, newest first, by status and requester | token | available |
| `POST /v1/projects/{project}/runs/quote` | `run.quote` | Estimate the cost and duration of an on-demand run | token | available |
| `POST /v1/projects/{project}/runs` | `run.create` | Start an on-demand run, or reuse an identical earlier result of yours | token | available |
| `POST /v1/projects/{project}/workspace/sync` | `workspace.sync` | Find the nearest commit the region already has, to send only a diff | token | available |
| `PUT /v1/runs/{run}/context` | `run.upload` | Upload an on-demand run's working tree | token | available |
| `GET /v1/runs/{run}/events` | `run.attach` | Stream an on-demand run's output and result | token | available |
| `POST /v1/runs/{run}/cancel` | `run.cancel` | Stop an on-demand run (Ctrl-C) | token | available |
| `GET /v1/runs/{run}/context` | `run.context` | A runner downloads the working tree of the on-demand run it runs | job token | available |
| `GET /v1/compute` | `compute.overview` | Runners, pools, cloud accounts, placement and spend at a glance | token | available |
| `POST /v1/compute/runners/enrol` | `runners.enrol` | Add a runner from the console: the commands to run and an enrolment to watch | token + passkey | available |
| `GET /v1/compute/runners/enrol/{code}` | `runners.enrolment` | A runner enrolment by its code: the machine, its scope and status | token | available |
| `POST /v1/compute/runners/enrol/{code}/approve` | `runners.approve` | Approve or deny a machine that asked to become a runner | token + passkey | available |
| `POST /v1/compute/runners/tokens` | `runners.tokens.create` | Create a one-time registration token for unattended runners (shown once) | token + passkey | available |
| `GET /v1/compute/machines/{machine}` | `runners.status` | One runner: health, jobs, capabilities, policy | token | available |
| `PUT /v1/compute/machines/{machine}` | `runners.update` | Set a runner's labels and which jobs may use it | token | available |
| `POST /v1/compute/machines/{machine}/drain` | `runners.drain` | Let a runner finish its jobs and take no new ones | token | available |
| `POST /v1/compute/machines/{machine}/resume` | `runners.resume` | Let a drained runner take jobs again | token | available |
| `DELETE /v1/compute/machines/{machine}` | `runners.deregister` | Remove a runner (it must be idle) | token | available |
| `PUT /v1/compute/pools/{pool}/spill` | `pools.spill` | When a pool's jobs wait too long, run them on another pool within a daily spend | token | available |
| `GET /v1/runs/{run}/live` | `runs.live` | A running job live: phases, log, tests, resources, then the result | token | available |
| `GET /v1/runs/{run}/log/search` | `runs.log_search` | Search a run's whole log | token | available |
| `POST /v1/runs/{run}/report` | `runs.report` | A runner reports a job's result | job token | available |
| `POST /v1/hooks/push/{forge}` | `hooks.push` | Push notification from a git host | forge hook | coming (not implemented yet) |

**Auth:** *token* is an API token whose identity holds the needed permission; *token + passkey* also needs a fresh passkey assertion from a person; *forge hook* and *job token* are used by forges and runners, not by people or agents.
