Skip to content

Run and integrate

API reference

Every public endpoint, grouped by resource, from the API's OpenAPI schema.

On this page

The DOGM API is what the web app and the GitHub Action's hosted mode call. It's JSON over HTTPS at https://api.dogm.ai. Everything below is rendered from the API's OpenAPI schema (DOGM.ai API 0.1.0), so it lists the endpoints and fields the code actually has.

Authentication#

Every /v1/* request sends a bearer token, and there are two kinds:

  • A WorkOS session token. The web app signs you in with WorkOS AuthKit and sends your access token. Requests that act in an org also send X-Org-Id with an org ID from GET /v1/me; without it they get 400 E_ORG_HEADER.
  • A project API key, dogm_live_ and 52 more characters, for CI and scripts. Create one under Settings > API keys (or POST /v1/api-keys). It's shown once, belongs to one project, and carries scopes: specs:read, runs:read, runs:write. A key needs no X-Org-Id, because it names its own org and acts as a member of its project. Only the endpoints marked with a scope below accept keys.
Shell
curl https://api.dogm.ai/v1/runs?project_id=$PROJECT_ID \
  -H "Authorization: Bearer $DOGM_API_KEY"

On Free, API keys are paused: requests with one get 402 E_KEY_PAUSED. A missing scope is 403 E_SCOPE.

Errors#

Every error body has the same shape. The code is stable and meant for programs; the message is for people.

JSON
{ "detail": { "code": "E_SCOPE", "message": "this API key lacks the runs:write scope" } }

Validation errors are 422 E_VALIDATION and add fields, a list of { path, message }. A 500 adds request_id. Every response carries an X-Request-Id header; send your own (letters, digits, ., _, -, up to 128 characters) to trace a request end to end.

Rate limits#

An API key makes at most 60 requests a minute. Signed-in users can burst 30 writes (POST, PUT, PATCH, DELETE), then 30 a minute; requests without credentials are limited per IP. Over a limit, the API answers 429 E_RATE_LIMIT with Retry-After.

Idempotent runs#

POST /v1/runs accepts an Idempotency-Key header. Retrying with the same key in the same org returns the existing run with 200 instead of starting a second one, so a CI job can retry safely.

Account and orgs#

The signed-in user, their orgs, and the current org.

Me#

GET/v1/me

Auth: Session token.

Responses: 200 Me. Errors use the shape in Errors.

Fields of Me
FieldTypeDescription
userrequiredMeUser
orgsrequiredlist of MeOrg
bannerrequiredBanner

Create org#

POST/v1/orgs

Auth: Session token.

Request body: OrgCreate

FieldTypeDescription
namerequiredstring
localestringDefault "en-PH"

Responses: 201 Org. Errors use the shape in Errors.

Fields of Org
FieldTypeDescription
idrequiredstring (uuid)
namerequiredstring
localerequiredstring
planrequiredstring
effective_planrequiredstring
rolerequiredowner | admin | member | read_only
member_limitrequiredinteger
created_atrequiredstring (date-time)

Get current org#

GET/v1/orgs/current

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 Org. Errors use the shape in Errors.

Fields of Org
FieldTypeDescription
idrequiredstring (uuid)
namerequiredstring
localerequiredstring
planrequiredstring
effective_planrequiredstring
rolerequiredowner | admin | member | read_only
member_limitrequiredinteger
created_atrequiredstring (date-time)

Update current org#

PATCH/v1/orgs/current

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: OrgUpdate

FieldTypeDescription
namestring
localestring

Responses: 200 Org. Errors use the shape in Errors.

Fields of Org
FieldTypeDescription
idrequiredstring (uuid)
namerequiredstring
localerequiredstring
planrequiredstring
effective_planrequiredstring
rolerequiredowner | admin | member | read_only
member_limitrequiredinteger
created_atrequiredstring (date-time)

Members#

People in the current org and their roles.

List members#

GET/v1/members

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 list of Member. Errors use the shape in Errors.

Fields of Member
FieldTypeDescription
user_idrequiredstring (uuid)
emailrequiredstring
namerequiredstring
rolerequiredowner | admin | member | read_only
joined_atrequiredstring (date-time)

Change role#

PATCH/v1/members/{user_id}

Auth: Session token.

ParameterInTypeDescription
user_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: RoleChange

FieldTypeDescription
rolerequiredadmin | member | read_only

Responses: 200 Member. Errors use the shape in Errors.

Fields of Member
FieldTypeDescription
user_idrequiredstring (uuid)
emailrequiredstring
namerequiredstring
rolerequiredowner | admin | member | read_only
joined_atrequiredstring (date-time)

Remove member#

DELETE/v1/members/{user_id}

Auth: Session token.

ParameterInTypeDescription
user_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 204 Successful Response. Errors use the shape in Errors.

Transfer ownership#

POST/v1/members/transfer-ownership

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: Transfer

FieldTypeDescription
user_idrequiredstring (uuid)

Responses: 200 Member. Errors use the shape in Errors.

Fields of Member
FieldTypeDescription
user_idrequiredstring (uuid)
emailrequiredstring
namerequiredstring
rolerequiredowner | admin | member | read_only
joined_atrequiredstring (date-time)

Invites#

Invite by email; invites expire after 7 days.

List invites#

GET/v1/invites

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 list of Invite. Errors use the shape in Errors.

Fields of Invite
FieldTypeDescription
idrequiredstring (uuid)
emailrequiredstring
rolerequiredadmin | member | read_only
statusrequiredpending | accepted | revoked | expired
invited_byrequiredUserRef
expires_atrequiredstring (date-time)
created_atrequiredstring (date-time)

Create invite#

POST/v1/invites

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: InviteCreate

FieldTypeDescription
emailrequiredstring
roleadmin | member | read_onlyDefault "member"

Responses: 201 InviteCreated. Errors use the shape in Errors.

Fields of InviteCreated
FieldTypeDescription
idrequiredstring (uuid)
emailrequiredstring
rolerequiredadmin | member | read_only
statusrequiredpending | accepted | revoked | expired
invited_byrequiredUserRef
expires_atrequiredstring (date-time)
created_atrequiredstring (date-time)
invite_urlrequiredstring
email_queuedrequiredbool

Revoke invite#

DELETE/v1/invites/{invite_id}

Auth: Session token.

ParameterInTypeDescription
invite_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 204 Successful Response. Errors use the shape in Errors.

Accept invite#

POST/v1/invites/accept

Auth: Session token.

Request body: AcceptBody

FieldTypeDescription
tokenrequiredstring

Responses: 200 Accepted. Errors use the shape in Errors.

Fields of Accepted
FieldTypeDescription
org_idrequiredstring (uuid)
rolerequiredadmin | member | read_only

Projects#

Projects group specs, runs and API keys.

List projects#

GET/v1/projects

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 list of Project. Errors use the shape in Errors.

Fields of Project
FieldTypeDescription
idrequiredstring (uuid)
namerequiredstring
default_localerequiredstring
ai_samplesrequiredbool
created_byrequiredUserRef
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)

Create project#

POST/v1/projects

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: ProjectCreate

FieldTypeDescription
namerequiredstring
default_localestringDefault "en-PH"
ai_samplesboolDefault false

Responses: 201 Project. Errors use the shape in Errors.

Fields of Project
FieldTypeDescription
idrequiredstring (uuid)
namerequiredstring
default_localerequiredstring
ai_samplesrequiredbool
created_byrequiredUserRef
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)

Get project#

GET/v1/projects/{project_id}

Auth: Session token.

ParameterInTypeDescription
project_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 Project. Errors use the shape in Errors.

Fields of Project
FieldTypeDescription
idrequiredstring (uuid)
namerequiredstring
default_localerequiredstring
ai_samplesrequiredbool
created_byrequiredUserRef
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)

Update project#

PATCH/v1/projects/{project_id}

Auth: Session token.

ParameterInTypeDescription
project_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: ProjectUpdate

FieldTypeDescription
namestring
default_localestring
ai_samplesbool

Responses: 200 Project. Errors use the shape in Errors.

Fields of Project
FieldTypeDescription
idrequiredstring (uuid)
namerequiredstring
default_localerequiredstring
ai_samplesrequiredbool
created_byrequiredUserRef
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)

Delete project#

DELETE/v1/projects/{project_id}

Auth: Session token.

ParameterInTypeDescription
project_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 204 Successful Response. Errors use the shape in Errors.

Specs#

Specs, their versions, drafts and approval. Readable with an API key that has specs:read.

List templates#

GET/v1/templates

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 list of Template. Errors use the shape in Errors.

Fields of Template
FieldTypeDescription
templaterequiredstring
namerequiredstring
summaryrequiredstring
source_yamlrequiredstring

List specs#

GET/v1/projects/{project_id}/specs

Auth: Session token.

ParameterInTypeDescription
project_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 list of Spec. Errors use the shape in Errors.

Fields of Spec
FieldTypeDescription
idrequiredstring (uuid)
project_idrequiredstring (uuid)
namerequiredstring
templaterequiredstring
created_byrequiredUserRef
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)
latest_versionrequiredinteger
latest_statusrequireddraft | needs_review | approved | failed
approved_versionrequiredinteger
approved_hashrequiredstring

Create spec#

POST/v1/projects/{project_id}/specs

Auth: Session token.

ParameterInTypeDescription
project_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: SpecCreate

FieldTypeDescription
namerequiredstring
source_yamlrequiredstring

Responses: 201 SpecDetail. Errors use the shape in Errors.

Fields of SpecDetail
FieldTypeDescription
idrequiredstring (uuid)
project_idrequiredstring (uuid)
namerequiredstring
templaterequiredstring
created_byrequiredUserRef
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)
latest_versionrequiredinteger
latest_statusrequireddraft | needs_review | approved | failed
approved_versionrequiredinteger
approved_hashrequiredstring
versionsrequiredlist of VersionSummary

Create spec from template#

POST/v1/projects/{project_id}/specs:from-template

Templates are curated, so v1 is approved on creation, for members too (CONTRACT-phase3.md, question 1).

Auth: Session token.

ParameterInTypeDescription
project_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: SpecFromTemplate

FieldTypeDescription
templaterequiredstring
namestring

Responses: 201 SpecDetail. Errors use the shape in Errors.

Fields of SpecDetail
FieldTypeDescription
idrequiredstring (uuid)
project_idrequiredstring (uuid)
namerequiredstring
templaterequiredstring
created_byrequiredUserRef
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)
latest_versionrequiredinteger
latest_statusrequireddraft | needs_review | approved | failed
approved_versionrequiredinteger
approved_hashrequiredstring
versionsrequiredlist of VersionSummary

Get spec#

GET/v1/specs/{spec_id}

Auth: Session token.

ParameterInTypeDescription
spec_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org (user tokens only; a key names its own).

Responses: 200 SpecDetail. Errors use the shape in Errors.

Fields of SpecDetail
FieldTypeDescription
idrequiredstring (uuid)
project_idrequiredstring (uuid)
namerequiredstring
templaterequiredstring
created_byrequiredUserRef
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)
latest_versionrequiredinteger
latest_statusrequireddraft | needs_review | approved | failed
approved_versionrequiredinteger
approved_hashrequiredstring
versionsrequiredlist of VersionSummary

Rename spec#

PATCH/v1/specs/{spec_id}

Auth: Session token.

ParameterInTypeDescription
spec_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: SpecRename

FieldTypeDescription
namerequiredstring

Responses: 200 SpecDetail. Errors use the shape in Errors.

Fields of SpecDetail
FieldTypeDescription
idrequiredstring (uuid)
project_idrequiredstring (uuid)
namerequiredstring
templaterequiredstring
created_byrequiredUserRef
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)
latest_versionrequiredinteger
latest_statusrequireddraft | needs_review | approved | failed
approved_versionrequiredinteger
approved_hashrequiredstring
versionsrequiredlist of VersionSummary

Delete spec#

DELETE/v1/specs/{spec_id}

Deletes the spec and its versions; refused while runs reference a version (they keep it reproducible).

Auth: Session token.

ParameterInTypeDescription
spec_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 204 Successful Response. Errors use the shape in Errors.

Get version#

GET/v1/specs/{spec_id}/versions/{number}

Auth: Session token.

ParameterInTypeDescription
spec_idrequiredpathstring (uuid)
numberrequiredpathinteger
X-Org-IdheaderstringThe org (user tokens only; a key names its own).

Responses: 200 Version. Errors use the shape in Errors.

Fields of Version
FieldTypeDescription
idrequiredstring (uuid)
numberrequiredinteger
parent_version_idrequiredstring (uuid)
statusrequireddraft | needs_review | approved | failed
spec_hashrequiredstring
created_byrequiredUserRef
approved_byrequiredUserRef
approved_atrequiredstring (date-time)
created_atrequiredstring (date-time)
source_yamlrequiredstring
spec_jsonrequiredobject
compile_errorsrequiredlist of CompileError
planrequiredPlan

Save draft#

PUT/v1/specs/{spec_id}/draft

Edits the open version in place, or starts version n+1 (parent: n) when the latest is approved.

Auth: Session token.

ParameterInTypeDescription
spec_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: DraftUpdate

FieldTypeDescription
source_yamlrequiredstring

Responses: 200 Version. Errors use the shape in Errors.

Fields of Version
FieldTypeDescription
idrequiredstring (uuid)
numberrequiredinteger
parent_version_idrequiredstring (uuid)
statusrequireddraft | needs_review | approved | failed
spec_hashrequiredstring
created_byrequiredUserRef
approved_byrequiredUserRef
approved_atrequiredstring (date-time)
created_atrequiredstring (date-time)
source_yamlrequiredstring
spec_jsonrequiredobject
compile_errorsrequiredlist of CompileError
planrequiredPlan

Approve version#

POST/v1/specs/{spec_id}/versions/{number}:approve

Auth: Session token.

ParameterInTypeDescription
spec_idrequiredpathstring (uuid)
numberrequiredpathinteger
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 Version. Errors use the shape in Errors.

Fields of Version
FieldTypeDescription
idrequiredstring (uuid)
numberrequiredinteger
parent_version_idrequiredstring (uuid)
statusrequireddraft | needs_review | approved | failed
spec_hashrequiredstring
created_byrequiredUserRef
approved_byrequiredUserRef
approved_atrequiredstring (date-time)
created_atrequiredstring (date-time)
source_yamlrequiredstring
spec_jsonrequiredobject
compile_errorsrequiredlist of CompileError
planrequiredPlan

AI drafting#

Draft a spec from a description or schema, suggest PII labels, and explain a failed check.

Compile spec#

POST/v1/projects/{project_id}/specs:compile

Auth: Session token.

ParameterInTypeDescription
project_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: CompileRequest

FieldTypeDescription
namerequiredstring
input_kindrequireddescribe | ddl | prisma
inputrequiredstring

Responses: 201 SpecDetail. Errors use the shape in Errors.

Fields of SpecDetail
FieldTypeDescription
idrequiredstring (uuid)
project_idrequiredstring (uuid)
namerequiredstring
templaterequiredstring
created_byrequiredUserRef
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)
latest_versionrequiredinteger
latest_statusrequireddraft | needs_review | approved | failed
approved_versionrequiredinteger
approved_hashrequiredstring
versionsrequiredlist of VersionSummary

Get draft#

GET/v1/specs/{spec_id}/versions/{number}/ai

Auth: Session token.

ParameterInTypeDescription
spec_idrequiredpathstring (uuid)
numberrequiredpathinteger
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 AiDraft. Errors use the shape in Errors.

Fields of AiDraft
FieldTypeDescription
spec_idrequiredstring (uuid)
numberrequiredinteger
statusrequireddraft | needs_review | approved | failed
source_kindrequiredyaml | describe | ddl | prisma | template
source_inputrequiredstring
steprequiredqueued | drafting | checking | repairing | classifying | done
attemptsrequiredinteger
repairsrequiredinteger
max_repairsrequiredinteger
explanationrequiredstring
piirequiredlist of Pii

Update PII#

PATCH/v1/specs/{spec_id}/versions/{number}/pii

Confirms each listed column's PII type and mask mode (as suggested, or changed). Only while it needs review.

Auth: Session token.

ParameterInTypeDescription
spec_idrequiredpathstring (uuid)
numberrequiredpathinteger
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: PiiPatch

FieldTypeDescription
columnsrequiredlist of PiiChange

Responses: 200 AiDraft. Errors use the shape in Errors.

Fields of AiDraft
FieldTypeDescription
spec_idrequiredstring (uuid)
numberrequiredinteger
statusrequireddraft | needs_review | approved | failed
source_kindrequiredyaml | describe | ddl | prisma | template
source_inputrequiredstring
steprequiredqueued | drafting | checking | repairing | classifying | done
attemptsrequiredinteger
repairsrequiredinteger
max_repairsrequiredinteger
explanationrequiredstring
piirequiredlist of Pii

Explain check#

POST/v1/runs/{run_id}/checks/{check_id}:explain

A failed check's fix suggestion, made by the model once and then served from storage. At most MAX_EXPLANATIONS checks of one run are explained (429 E_EXPLAIN_LIMIT). No connection is held while Claude answers: one session reads, the call runs, another session stores.

Auth: Session token.

ParameterInTypeDescription
run_idrequiredpathstring (uuid)
check_idrequiredpathstring
X-Org-IdrequiredheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 Explanation. Errors use the shape in Errors.

Fields of Explanation
FieldTypeDescription
run_idrequiredstring (uuid)
check_idrequiredstring
explanationrequiredstring
modelrequiredstring
cachedrequiredbool
created_atrequiredstring (date-time)

Runs#

Start, list, cancel and download hosted runs, and read usage.

Create run#

POST/v1/runs

201 with the new run; 200 with the existing one when this Idempotency-Key was already used in the org.

Auth: Session token.

ParameterInTypeDescription
Idempotency-Keyheaderstring
X-Org-IdheaderstringThe org (user tokens only; a key names its own).

Request body: RunCreate

FieldTypeDescription
spec_version_idrequiredstring (uuid)
seedintegerRandom when omitted. A number or a decimal string (above 2**53).
rowsmap of integer
formatcsv | jsonl | sql | parquetDefault "csv"
maskboolDefault false
spec_hashstringThe hash the caller expects; 409 E_SPEC_HASH_MISMATCH, uncounted, if not.

Responses: 201 Run. Errors use the shape in Errors.

Fields of Run
FieldTypeDescription
idrequiredstring (uuid)
project_idrequiredstring (uuid)
spec_idrequiredstring (uuid)
spec_version_idrequiredstring (uuid)
spec_versionrequiredinteger
spec_hashrequiredstring
statusrequiredqueued | running | succeeded | failed | cancelled | error
steprequiredplan | generate | finalize | combine | complete
progressrequiredProgress
seedrequiredstring
rowsrequiredmap of integer
formatrequiredcsv | jsonl | sql | parquet
maskrequiredbool
mask_key_versionrequiredinteger
engine_versionrequiredstring
output_sha256requiredstring
checks_passedrequiredinteger
checks_totalrequiredinteger
errorrequiredRunError
started_byrequiredUserRef
created_atrequiredstring (date-time)
started_atrequiredstring (date-time)
finished_atrequiredstring (date-time)
duration_msrequiredinteger
expires_atrequiredstring (date-time)
row_countsrequiredmap of integer
checksrequiredlist of Check
artifactsrequiredlist of Artifact
reproducerequiredReproduce

List runs#

GET/v1/runs

Newest first. Pass next_cursor back as cursor for the next page; it is null on the last one.

Auth: Session token.

ParameterInTypeDescription
project_idquerystring (uuid)
statusqueryqueued | running | succeeded | failed | cancelled | error
fromquerystring (date-time)Created at or after (ISO 8601).
toquerystring (date-time)Created before (ISO 8601).
cursorquerystring
limitqueryinteger
X-Org-IdheaderstringThe org (user tokens only; a key names its own).

Responses: 200 RunPage. Errors use the shape in Errors.

Fields of RunPage
FieldTypeDescription
itemsrequiredlist of RunSummary
next_cursorrequiredstring

Get run#

GET/v1/runs/{run_id}

Auth: Session token.

ParameterInTypeDescription
run_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org (user tokens only; a key names its own).

Responses: 200 Run. Errors use the shape in Errors.

Fields of Run
FieldTypeDescription
idrequiredstring (uuid)
project_idrequiredstring (uuid)
spec_idrequiredstring (uuid)
spec_version_idrequiredstring (uuid)
spec_versionrequiredinteger
spec_hashrequiredstring
statusrequiredqueued | running | succeeded | failed | cancelled | error
steprequiredplan | generate | finalize | combine | complete
progressrequiredProgress
seedrequiredstring
rowsrequiredmap of integer
formatrequiredcsv | jsonl | sql | parquet
maskrequiredbool
mask_key_versionrequiredinteger
engine_versionrequiredstring
output_sha256requiredstring
checks_passedrequiredinteger
checks_totalrequiredinteger
errorrequiredRunError
started_byrequiredUserRef
created_atrequiredstring (date-time)
started_atrequiredstring (date-time)
finished_atrequiredstring (date-time)
duration_msrequiredinteger
expires_atrequiredstring (date-time)
row_countsrequiredmap of integer
checksrequiredlist of Check
artifactsrequiredlist of Artifact
reproducerequiredReproduce

Cancel run#

POST/v1/runs/{run_id}:cancel

Members cancel their own runs; admins and owners cancel any; an API key cancels runs started with a key (in its project). Chunks already written stay until retention.

Auth: Session token.

ParameterInTypeDescription
run_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org (user tokens only; a key names its own).

Responses: 200 Run. Errors use the shape in Errors.

Fields of Run
FieldTypeDescription
idrequiredstring (uuid)
project_idrequiredstring (uuid)
spec_idrequiredstring (uuid)
spec_version_idrequiredstring (uuid)
spec_versionrequiredinteger
spec_hashrequiredstring
statusrequiredqueued | running | succeeded | failed | cancelled | error
steprequiredplan | generate | finalize | combine | complete
progressrequiredProgress
seedrequiredstring
rowsrequiredmap of integer
formatrequiredcsv | jsonl | sql | parquet
maskrequiredbool
mask_key_versionrequiredinteger
engine_versionrequiredstring
output_sha256requiredstring
checks_passedrequiredinteger
checks_totalrequiredinteger
errorrequiredRunError
started_byrequiredUserRef
created_atrequiredstring (date-time)
started_atrequiredstring (date-time)
finished_atrequiredstring (date-time)
duration_msrequiredinteger
expires_atrequiredstring (date-time)
row_countsrequiredmap of integer
checksrequiredlist of Check
artifactsrequiredlist of Artifact
reproducerequiredReproduce

Download artifact#

GET/v1/runs/{run_id}/artifacts/{artifact_id}

A signed URL that works for 15 minutes, only after this org's read of the artifact row (RLS). Artifacts are downloadable once their run succeeded; parts of a run that didn't finish are left to retention.

Auth: Session token.

ParameterInTypeDescription
run_idrequiredpathstring (uuid)
artifact_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org (user tokens only; a key names its own).

Responses: 200 Download. Errors use the shape in Errors.

Fields of Download
FieldTypeDescription
urlrequiredstring
expires_atrequiredstring (date-time)
namerequiredstring
bytesrequiredinteger
sha256requiredstring

Get usage#

GET/v1/usage

This period's usage against the effective plan.

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 Usage. Errors use the shape in Errors.

Fields of Usage
FieldTypeDescription
planrequiredstring
effective_planrequiredstring
periodrequiredstring
period_ends_atrequiredstring (date-time)
runsrequiredMeter
ai_draftsrequiredMeter
storage_bytesrequiredMeter
concurrent_runsrequiredMeter
rows_per_runrequiredinteger
retention_daysrequiredinteger

Billing#

The plan and period, QR Ph payments, acknowledgements and downgrades.

Create payment#

POST/v1/billing/payments

Owners. Returns the org's pending payment for this plan while its QR is still valid (200), else abandons any pending payment and creates a new one with a fresh QR code (201).

Auth: Session token.

ParameterInTypeDescription
X-Org-IdrequiredheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: PaymentCreate

FieldTypeDescription
planrequiredpro | team

Responses: 201 Payment. Errors use the shape in Errors.

Fields of Payment
FieldTypeDescription
idrequiredstring (uuid)
planrequiredstring
amount_centavosrequiredinteger
currencyrequiredstring
statusrequiredpending | succeeded | failed | abandoned | refunded
livemoderequiredbool
kindrequirednew | renewal | upgrade | downgrade
extra_daysrequiredinteger
period_starts_atrequiredstring (date-time)
period_ends_atrequiredstring (date-time)
qr_image_urlrequiredstring
qr_expires_atrequiredstring (date-time)
test_urlrequiredstring
failure_reasonrequiredstring
created_atrequiredstring (date-time)
paid_atrequiredstring (date-time)
refunded_atrequiredstring (date-time)

Get payment#

GET/v1/billing/payments/{payment_id}

Owners; polled every 3 s by the pay screen. Answers from Postgres, asking PayMongo at most every 15 s.

Auth: Session token.

ParameterInTypeDescription
payment_idrequiredpathstring (uuid)
X-Org-IdrequiredheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 Payment. Errors use the shape in Errors.

Fields of Payment
FieldTypeDescription
idrequiredstring (uuid)
planrequiredstring
amount_centavosrequiredinteger
currencyrequiredstring
statusrequiredpending | succeeded | failed | abandoned | refunded
livemoderequiredbool
kindrequirednew | renewal | upgrade | downgrade
extra_daysrequiredinteger
period_starts_atrequiredstring (date-time)
period_ends_atrequiredstring (date-time)
qr_image_urlrequiredstring
qr_expires_atrequiredstring (date-time)
test_urlrequiredstring
failure_reasonrequiredstring
created_atrequiredstring (date-time)
paid_atrequiredstring (date-time)
refunded_atrequiredstring (date-time)

Refresh qr#

POST/v1/billing/payments/{payment_id}:refresh-qr

Owners. After the QR expires, attaches a new QR Ph payment method to the same Payment Intent. While the QR is still valid, returns the payment unchanged.

Auth: Session token.

ParameterInTypeDescription
payment_idrequiredpathstring (uuid)
X-Org-IdrequiredheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 Payment. Errors use the shape in Errors.

Fields of Payment
FieldTypeDescription
idrequiredstring (uuid)
planrequiredstring
amount_centavosrequiredinteger
currencyrequiredstring
statusrequiredpending | succeeded | failed | abandoned | refunded
livemoderequiredbool
kindrequirednew | renewal | upgrade | downgrade
extra_daysrequiredinteger
period_starts_atrequiredstring (date-time)
period_ends_atrequiredstring (date-time)
qr_image_urlrequiredstring
qr_expires_atrequiredstring (date-time)
test_urlrequiredstring
failure_reasonrequiredstring
created_atrequiredstring (date-time)
paid_atrequiredstring (date-time)
refunded_atrequiredstring (date-time)

Get billing#

GET/v1/billing

Owners: the plan, the period in effect, grace, a scheduled downgrade and the payment history.

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 Billing. Errors use the shape in Errors.

Fields of Billing
FieldTypeDescription
planrequiredstring
effective_planrequiredstring
betarequiredbool
livemoderequiredbool
configuredrequiredbool
periodrequiredPeriod
next_periodrequiredPeriod
gracerequiredGrace
pending_planrequiredstring
pricesrequiredmap of integer
paymentsrequiredlist of Payment

Schedule downgrade#

POST/v1/billing/downgrade

Owners. Schedules a smaller plan for the next renewal (null cancels). The current period runs to its end; renewing with any plan settles it. free means the org won't renew.

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: DowngradeSet

FieldTypeDescription
planrequiredfree | pro | team

Responses: 200 Billing. Errors use the shape in Errors.

Fields of Billing
FieldTypeDescription
planrequiredstring
effective_planrequiredstring
betarequiredbool
livemoderequiredbool
configuredrequiredbool
periodrequiredPeriod
next_periodrequiredPeriod
gracerequiredGrace
pending_planrequiredstring
pricesrequiredmap of integer
paymentsrequiredlist of Payment

Acknowledgement#

GET/v1/billing/payments/{payment_id}/acknowledgement

Owners: the printable payment acknowledgement (mvp.md 6.5). Not a BIR invoice.

Auth: Session token.

ParameterInTypeDescription
payment_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 Acknowledgement. Errors use the shape in Errors.

Fields of Acknowledgement
FieldTypeDescription
idrequiredstring (uuid)
org_namerequiredstring
planrequiredstring
plan_namerequiredstring
amount_centavosrequiredinteger
currencyrequiredstring
statusrequiredstring
livemoderequiredbool
test_noticerequiredstring
disclaimerrequiredstring
paid_atrequiredstring (date-time)
period_starts_atrequiredstring (date-time)
period_ends_atrequiredstring (date-time)
refunded_atrequiredstring (date-time)
referencerequiredstring
paid_byrequiredUserRef

Notifications#

Which emails the signed-in user gets.

Get notifications#

GET/v1/me/notifications

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 NotificationSettings. Errors use the shape in Errors.

Fields of NotificationSettings
FieldTypeDescription
run_succeededrequiredbool
run_failedrequiredbool
spec_readyrequiredbool
usage_warningsrequiredbool

Put notifications#

PUT/v1/me/notifications

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: NotificationSettings

FieldTypeDescription
run_succeededrequiredbool
run_failedrequiredbool
spec_readyrequiredbool
usage_warningsrequiredbool

Responses: 200 NotificationSettings. Errors use the shape in Errors.

Fields of NotificationSettings
FieldTypeDescription
run_succeededrequiredbool
run_failedrequiredbool
spec_readyrequiredbool
usage_warningsrequiredbool

API keys#

Project API keys for CI and scripts.

Create key#

POST/v1/api-keys

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: ApiKeyCreate

FieldTypeDescription
project_idrequiredstring (uuid)
namerequiredstring
scopesrequiredlist of specs:read | runs:read | runs:write

Responses: 201 ApiKeyCreated. Errors use the shape in Errors.

Fields of ApiKeyCreated
FieldTypeDescription
idrequiredstring (uuid)
project_idrequiredstring (uuid)
namerequiredstring
prefixrequiredstring
scopesrequiredlist of specs:read | runs:read | runs:write
pausedrequiredbool
created_byrequiredUserRef
created_atrequiredstring (date-time)
last_used_atrequiredstring (date-time)
keyrequiredstring

List keys#

GET/v1/api-keys

Keys that aren't revoked, newest first.

Auth: Session token.

ParameterInTypeDescription
project_idquerystring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 list of ApiKey. Errors use the shape in Errors.

Fields of ApiKey
FieldTypeDescription
idrequiredstring (uuid)
project_idrequiredstring (uuid)
namerequiredstring
prefixrequiredstring
scopesrequiredlist of specs:read | runs:read | runs:write
pausedrequiredbool
created_byrequiredUserRef
created_atrequiredstring (date-time)
last_used_atrequiredstring (date-time)

Revoke key#

DELETE/v1/api-keys/{key_id}

Takes effect at once: the next request with the key gets 401 E_KEY_REVOKED.

Auth: Session token.

ParameterInTypeDescription
key_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 204 Successful Response. Errors use the shape in Errors.

Webhooks#

Endpoints, deliveries, test events and re-enabling.

Create webhook#

POST/v1/webhooks

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: WebhookCreate

FieldTypeDescription
urlrequiredstring
eventsrequiredlist of run.succeeded | run.failed | spec.needs_review

Responses: 201 WebhookCreated. Errors use the shape in Errors.

Fields of WebhookCreated
FieldTypeDescription
idrequiredstring (uuid)
urlrequiredstring
eventsrequiredlist of run.succeeded | run.failed | spec.needs_review
statusrequiredactive | disabled | paused
disabled_atrequiredstring (date-time)
failing_sincerequiredstring (date-time)
created_byrequiredUserRef
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)
secretrequiredstring

List webhooks#

GET/v1/webhooks

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 list of Webhook. Errors use the shape in Errors.

Fields of Webhook
FieldTypeDescription
idrequiredstring (uuid)
urlrequiredstring
eventsrequiredlist of run.succeeded | run.failed | spec.needs_review
statusrequiredactive | disabled | paused
disabled_atrequiredstring (date-time)
failing_sincerequiredstring (date-time)
created_byrequiredUserRef
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)

Get webhook#

GET/v1/webhooks/{webhook_id}

Auth: Session token.

ParameterInTypeDescription
webhook_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 Webhook. Errors use the shape in Errors.

Fields of Webhook
FieldTypeDescription
idrequiredstring (uuid)
urlrequiredstring
eventsrequiredlist of run.succeeded | run.failed | spec.needs_review
statusrequiredactive | disabled | paused
disabled_atrequiredstring (date-time)
failing_sincerequiredstring (date-time)
created_byrequiredUserRef
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)

Update webhook#

PATCH/v1/webhooks/{webhook_id}

Auth: Session token.

ParameterInTypeDescription
webhook_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: WebhookUpdate

FieldTypeDescription
urlstring
eventslist of run.succeeded | run.failed | spec.needs_review

Responses: 200 Webhook. Errors use the shape in Errors.

Fields of Webhook
FieldTypeDescription
idrequiredstring (uuid)
urlrequiredstring
eventsrequiredlist of run.succeeded | run.failed | spec.needs_review
statusrequiredactive | disabled | paused
disabled_atrequiredstring (date-time)
failing_sincerequiredstring (date-time)
created_byrequiredUserRef
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)

Delete webhook#

DELETE/v1/webhooks/{webhook_id}

Deletes the endpoint and its deliveries; queued attempts find nothing and stop.

Auth: Session token.

ParameterInTypeDescription
webhook_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 204 Successful Response. Errors use the shape in Errors.

Enable webhook#

POST/v1/webhooks/{webhook_id}:enable

Re-enables an auto-disabled endpoint, with a clean failure record; a no-op on an enabled one.

Auth: Session token.

ParameterInTypeDescription
webhook_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 Webhook. Errors use the shape in Errors.

Fields of Webhook
FieldTypeDescription
idrequiredstring (uuid)
urlrequiredstring
eventsrequiredlist of run.succeeded | run.failed | spec.needs_review
statusrequiredactive | disabled | paused
disabled_atrequiredstring (date-time)
failing_sincerequiredstring (date-time)
created_byrequiredUserRef
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)

Test webhook#

POST/v1/webhooks/{webhook_id}:test

Queues a webhook.test event to this endpoint, whatever its events; watch its delivery for the result.

Auth: Session token.

ParameterInTypeDescription
webhook_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 202 Delivery. Errors use the shape in Errors.

Fields of Delivery
FieldTypeDescription
idrequiredstring (uuid)
webhook_idrequiredstring (uuid)
eventrequiredstring
event_idrequiredstring
payloadrequiredobject
statusrequiredpending | succeeded | failed
response_coderequiredinteger
attemptsrequiredinteger
next_attempt_atrequiredstring (date-time)
last_errorrequiredstring
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)

List deliveries#

GET/v1/webhooks/{webhook_id}/deliveries

The most recent first.

Auth: Session token.

ParameterInTypeDescription
webhook_idrequiredpathstring (uuid)
limitqueryinteger
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 200 list of Delivery. Errors use the shape in Errors.

Fields of Delivery
FieldTypeDescription
idrequiredstring (uuid)
webhook_idrequiredstring (uuid)
eventrequiredstring
event_idrequiredstring
payloadrequiredobject
statusrequiredpending | succeeded | failed
response_coderequiredinteger
attemptsrequiredinteger
next_attempt_atrequiredstring (date-time)
last_errorrequiredstring
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)

Retry delivery#

POST/v1/webhooks/{webhook_id}/deliveries/{delivery_id}:retry

Sends a failed delivery again, with the same body id (receivers dedupe on it) and a fresh signature.

Auth: Session token.

ParameterInTypeDescription
webhook_idrequiredpathstring (uuid)
delivery_idrequiredpathstring (uuid)
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 202 Delivery. Errors use the shape in Errors.

Fields of Delivery
FieldTypeDescription
idrequiredstring (uuid)
webhook_idrequiredstring (uuid)
eventrequiredstring
event_idrequiredstring
payloadrequiredobject
statusrequiredpending | succeeded | failed
response_coderequiredinteger
attemptsrequiredinteger
next_attempt_atrequiredstring (date-time)
last_errorrequiredstring
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)

Export and deletion#

Export or delete your data and your org.

Delete me#

DELETE/v1/me

Deletes the caller's account, confirming with their email address. 409 E_SOLE_OWNER (with orgs) while they are the only owner of an org: transfer ownership or delete the org first.

Auth: Session token.

Request body: Confirm

FieldTypeDescription
confirmrequiredstring

Responses: 204 Successful Response. Errors use the shape in Errors.

Delete org#

DELETE/v1/orgs/current

Owners, confirming with the org's exact name. Soft delete: restorable by staff for 7 days, then purged.

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Request body: Confirm

FieldTypeDescription
confirmrequiredstring

Responses: 200 OrgDeleted. Errors use the shape in Errors.

Fields of OrgDeleted
FieldTypeDescription
idrequiredstring (uuid)
deleted_atrequiredstring (date-time)
purge_onrequiredstring (date-time)

Export org#

POST/v1/orgs/current:export

Owners: the org's specs (every version's YAML), run metadata, members and payments as JSON; never artifacts.

Auth: Session token.

ParameterInTypeDescription
X-Org-IdheaderstringThe org this request acts in: an id from GET /v1/me.

Responses: 202 Export. Errors use the shape in Errors.

Fields of Export
FieldTypeDescription
idrequiredstring (uuid)
kindrequiredorg | user
statusrequiredqueued | ready | failed | expired
bytesrequiredinteger
created_atrequiredstring (date-time)
finished_atrequiredstring (date-time)
expires_atrequiredstring (date-time)
urlrequiredstring

Export me#

POST/v1/me:export

The caller's profile, memberships and the audit entries they are the actor of, as JSON.

Auth: Session token.

Responses: 202 Export. Errors use the shape in Errors.

Fields of Export
FieldTypeDescription
idrequiredstring (uuid)
kindrequiredorg | user
statusrequiredqueued | ready | failed | expired
bytesrequiredinteger
created_atrequiredstring (date-time)
finished_atrequiredstring (date-time)
expires_atrequiredstring (date-time)
urlrequiredstring

Get export#

GET/v1/exports/{export_id}

Auth: Session token.

ParameterInTypeDescription
export_idrequiredpathstring (uuid)

Responses: 200 Export. Errors use the shape in Errors.

Fields of Export
FieldTypeDescription
idrequiredstring (uuid)
kindrequiredorg | user
statusrequiredqueued | ready | failed | expired
bytesrequiredinteger
created_atrequiredstring (date-time)
finished_atrequiredstring (date-time)
expires_atrequiredstring (date-time)
urlrequiredstring

Health#

Liveness and readiness, with no auth.

Healthz#

GET/healthz

Auth: No authentication.

Responses: 200 map of string. Errors use the shape in Errors.

Readyz#

GET/readyz

Ready for traffic: Postgres and object storage both answer within 3 seconds. 503 names what failed.

Auth: No authentication.

Responses: 200 any. Errors use the shape in Errors.

From the API's OpenAPI schema, committed as content/docs/generated/openapi.json. Staff-only admin endpoints and the payment provider's callback are left out.