API

Every public Mergestorm endpoint: 56 operations across 12 groups. The mg CLI and the MCP server call these same endpoints, so anything they do, you can do over HTTP.

Base URL: https://api.mergestorm.ai. This page is generated from docs/openapi.v1.yaml (OpenAPI 3.1), which tests keep in step with the server's routes.

Authentication

Send an API key as a Bearer token on every request: Authorization: Bearer msk_live_…. Keys belong to one account and can do anything that account can.

  • mg login opens the browser, and after you approve it stores a new key for the CLI. An agent runs mg login --start, sends you the link, then runs mg login --finish.
  • For your own scripts, create a key on Settings → API. The full key is shown once.

The API keys and CLI sign-in endpoints are the exception: they use the dashboard session cookie, because they are how a key gets made.

CLI and MCP

The mergestorm CLI (also mg) wraps this API for terminals and agents. It needs Node.js 22 or newer.

curl -fsSL https://mergestorm.ai/install.sh | bash   # or: npm install -g mergestorm
mg login
mg stack create feat/my-first-layer
git commit -am "feat: first layer"
mg stack submit

Agents can use the hosted MCP server at https://api.mergestorm.ai/api/v1/mcp with the same key, or run it locally with claude mcp add mergestorm -- npx -y mergestorm-mcp.

Errors

Errors return a JSON body with a machine-readable error code and a readable message:

{ "error": "invalid_input", "message": "owner and repo are required" }

401 means the key is missing, wrong or revoked. 429 means a rate limit was hit; wait for the number of seconds in the Retry-After header.

Rate limits

Limits apply per API key unless the name says otherwise. GET requests use the read budget. Requests that start work, such as reviews, agent jobs and issues, use the submit budget.

submit_per_key10 per 1 min
read_per_key300 per 1 min
auth_failures_per_ip30 per 1 min
device_start_per_ip10 per 10 min
device_token_per_ip_and_code20 per 1 min
in_flight_per_account5 at once, retry after 30 s

Reviews

Review a diff or a set of files without opening a pull request. Reviews run on the same engine as pull request reviews and debit review credits. Reviews with the same thread name are grouped into a thread.

List recent review jobs

GET/api/v1/reviews

Auth: API key

Parameters

NameInTypeDescription
limitqueryintegerdefault 10 · min 1 · max 50

Responses

200 Recent Review Jobs.

object

FieldTypeDescription
itemsrequiredarray of ReviewJobListItem
  • 401 500 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/reviews' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Submit a diff or files for review

POST/api/v1/reviews

Auth: API key

Request body

CreateReviewRequest

FieldTypeDescription
threadrequiredstringmin length 1 · max length 120 · pattern ^[A-Za-z0-9][A-Za-z0-9._/-]{0,119}$
diffstringCapped at 1,000,000 UTF-8 bytes at runtime; maxLength 250000 guarantees that byte budget.min length 1 · max length 250000
filesarray of ReviewFileFiles to review; at least one non-empty path/content pair, up to 2,000,000 content characters total.min items 1 · max items 40
base_labelstringmax length 200
head_labelstringmax length 200
contextstringmax length 60000
context_filesarray of ReviewFileContext files; up to 16,000 content characters per file and 60,000 total. Oversized entries are truncated at runtime.max items 10
router_modeRouterMode (enum)
specialistsarray of Specialist (enum)max items 5
webhook_urlstring (uri)
webhook_secretstringmax length 128
idempotency_keystringmax length 128
ownerstringRepo owner, used with repo for thread identity.max length 200
repostringRepo slug (owner/name) or repo name when owner is set.max length 200
branchstringBranch name, used for thread identity.max length 200
recheckobjectThin recheck selectors. At least one selector array must be non-empty.
recheck.finding_keysarray of stringmax items 40
recheck.pathsarray of stringmax items 40
recheck.specialistsarray of Specialist (enum)max items 5

One of: requires diff

One of: requires files

Responses

200 Review Job.

ReviewJob

FieldTypeDescription
job_idrequiredstring
thread_idrequiredstring | null
thread_slugrequiredstring | null
thread_job_numberrequiredinteger | null
statusrequiredJobStatus (enum)
base_labelrequiredstring | null
head_labelrequiredstring | null
router_moderequiredRouterMode (enum)
specialists_requestedrequiredarray of Specialist (enum)
specialists_runrequiredarray of string | null
creditsrequiredCredits
summaryrequiredstring | null
verdictrequiredVerdict (enum)
truncatedrequiredboolean
findingsrequiredFindings
recheckReviewRecheckPresent only for thin-recheck jobs; omitted for ordinary jobs.
errorrequiredstring | null
created_atrequiredstring (date-time)
started_atrequiredstring (date-time) | null
finished_atrequiredstring (date-time) | null
202 Accepted; webhook_secret is create-response-only.

object

FieldTypeDescription
job_idrequiredstring
thread_idrequiredstring | null
thread_slugrequiredstring | null
thread_job_numberrequiredinteger | null
statusrequiredJobStatus (enum)
base_labelrequiredstring | null
head_labelrequiredstring | null
router_moderequiredRouterMode (enum)
specialists_requestedrequiredarray of Specialist (enum)
specialists_runrequiredarray of string | null
creditsrequiredCredits
summaryrequiredstring | null
verdictrequiredVerdict (enum)
truncatedrequiredboolean
findingsrequiredFindings
recheckReviewRecheckPresent only for thin-recheck jobs; omitted for ordinary jobs.
errorrequiredstring | null
created_atrequiredstring (date-time)
started_atrequiredstring (date-time) | null
finished_atrequiredstring (date-time) | null
webhook_secretstringReturned only on create when webhook_url was requested.
  • 400 401 402 413 500 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/reviews' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "thread": "<thread>",
  "diff": "<diff>"
}'

Read one review job and its findings

GET/api/v1/reviews/{job_id}

Auth: API key

Parameters

NameInTypeDescription
job_idrequiredpathstring

Responses

200 Review Job.

ReviewJob

FieldTypeDescription
job_idrequiredstring
thread_idrequiredstring | null
thread_slugrequiredstring | null
thread_job_numberrequiredinteger | null
statusrequiredJobStatus (enum)
base_labelrequiredstring | null
head_labelrequiredstring | null
router_moderequiredRouterMode (enum)
specialists_requestedrequiredarray of Specialist (enum)
specialists_runrequiredarray of string | null
creditsrequiredCredits
summaryrequiredstring | null
verdictrequiredVerdict (enum)
truncatedrequiredboolean
findingsrequiredFindings
recheckReviewRecheckPresent only for thin-recheck jobs; omitted for ordinary jobs.
errorrequiredstring | null
created_atrequiredstring (date-time)
started_atrequiredstring (date-time) | null
finished_atrequiredstring (date-time) | null
  • 401 404 500 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/reviews/<job_id>' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

List review threads

GET/api/v1/threads

Auth: API key

Parameters

NameInTypeDescription
limitqueryintegerdefault 20 · min 1 · max 50

Responses

200 Recently active review threads.

object

FieldTypeDescription
itemsrequiredarray of ThreadListItem
  • 401 500 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/threads' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Read one review thread

GET/api/v1/threads/{slug}

Auth: API key

Parameters

NameInTypeDescription
slugrequiredpathstring

Responses

200 Active thread and recent job timeline.

Thread

FieldTypeDescription
thread_idrequiredstring
slugrequiredstring
sourcerequired"api" | "github"
branchrequiredstring | null
ownerrequiredstring | null
reporequiredstring | null
pr_numberrequiredinteger | null
statusrequiredstring
pr_linked_atrequiredstring (date-time) | null
job_countrequiredinteger
created_atrequiredstring (date-time)
jobsrequiredarray of ThreadJob
  • 401 404 500 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/threads/<slug>' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Pull request reviews

Read and dismiss Vortex reviews of open pull requests, and wake a Breeze chat when one finishes.

Read the latest Vortex review of a pull request

GET/api/v1/stacks/pr-review

Auth: API key

pass and after_pass are exclusive and require after_sha. Reads latest matching attempt. A resting result with newer_pass_pending=true must continue polling. Access remains scoped to the bearer account and authorized monitored-repository review visibility.

Parameters

NameInTypeDescription
ownerrequiredquerystring
reporequiredquerystring
pr_numberrequiredqueryintegermin 1
after_shaquerystringpattern ^[0-9a-fA-F]{7,}$
passqueryintegermin 1
after_passqueryintegermin 1
waitqueryintegerLong poll timeout in seconds.default 0 · min 0 · max 45

Responses

200 Successful response.

StackPrReview

FieldTypeDescription
schemarequired"mergestorm.pr_review/v1"
idrequiredstring
ownerrequiredstring
reporequiredstring
pr_numberrequirednumber
statusrequiredstring
raw_statusrequiredstring
phaserequirednull | string
verdictrequirednull | string
head_sharequirednull | string
passrequirednumber
review_countrequirednumber
skip_reasonrequirednull | string
reviewed_atrequirednull | string
finding_countrequirednull | number
findingsrequirednull | ReviewFindings
dismissed_findingsrequiredarray of object
dismissed_findings.pathrequiredstring
dismissed_findings.linerequirednumber
dismissed_findings.titlerequiredstring
dismissed_findings.severityrequired"error" | "info" | "warning"
dismissed_findings.finding_keyrequiredstring
dismissed_findings.github_comment_idrequirednull | number
patch_policyrequirednull | ReviewPatchPolicy
newer_pass_pendingtrue
  • 400 401 404 500 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/stacks/pr-review?owner=%3Cowner%3E&repo=%3Crepo%3E&pr_number=1' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Wake a Breeze chat when a Vortex review or a stack finishes

POST/api/v1/stacks/chat-waits

Auth: API key

Records that a Breeze chat waits on a Vortex review of a pull request (at a head and from a pass) or on a stack's merge queue entry. When it finishes, the chat gets a new turn with the result. Idempotent per chat and target.

Request body

StackChatWaitRequest

FieldTypeDescription
chat_idrequiredstring (uuid)
kindrequired"vortex" | "stack"
ownerstring
repostring
pr_numberintegermin 1
head_shastringpattern ^[0-9a-fA-F]{7,64}$
min_passintegermin 1
stack_idstring (uuid)

Responses

200 Successful response.

StackChatWait

FieldTypeDescription
resultrequired"waiting" | "existing" | "finished"
idrequiredstring (uuid)
min_passinteger | null
  • 400 401 404 409 500 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/chat-waits' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "chat_id": "00000000-0000-4000-8000-000000000000",
  "kind": "vortex"
}'

Dismiss Vortex findings on a pull request

POST/api/v1/stacks/pr-review/dismiss

Auth: API key

Request body

StackDismissRequest

A write requires a reason whose trimmed, whitespace-normalized text has 20–4000 characters and at least three distinct words of three or more characters. Raw-text length bounds do not represent that normalization. findings scope requires finding_ids; review scope rejects them. Preview bypasses reason and scope/finding selection write requirements. Numeric comment ids are also accepted.

FieldTypeDescription
ownerrequiredstring
reporequiredstring
pr_numberrequiredintegermin 1
head_sharequiredstringpattern ^[0-9a-fA-F]{40}$
review_idrequiredintegermin 1
scope"findings" | "review"default "findings"
finding_idsarray of string | integermax items 50
reasonstring
evidence_urlstringpattern ^https://\S{1,2000}$
previewbooleandefault false

Responses

200 Successful response.

FindingDismissResult

FieldTypeDescription
statusrequired"dismissed" | "preview"
ownerrequiredstring
reporequiredstring
pr_numberrequirednumber
head_sharequiredstring
review_idrequirednumber
review_kindrequired"seam" | "core"
scoperequired"findings" | "review"
dismissedrequiredarray of FindingDismissFinding
already_dismissedrequiredarray of object
already_dismissed.finding_idrequiredstring
already_dismissed.finding_keyrequiredstring
already_dismissed.pathrequirednull | string
already_dismissed.linerequirednull | number
already_dismissed.titlerequiredstring
already_dismissed.actor_loginrequiredstring
already_dismissed.dismissed_atrequiredstring
remainingrequiredarray of FindingDismissFinding
all_dismissedrequiredboolean
gaterequiredFindingDismissGate
stack_idrequirednull | string
threadsrequiredarray of object
threads.finding_idrequiredstring
threads.staterequired"failed" | "resolved" | "already_resolved" | "not_found"
  • 400 401 403 404 409 422 500 502 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/pr-review/dismiss' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "owner": "<owner>",
  "repo": "<repo>",
  "pr_number": 1,
  "head_sha": "<head_sha>",
  "review_id": 1
}'

Stacks

Stacks are chains of pull requests that Mergestorm reviews and lands layer by layer. These endpoints list, adopt, configure and repair them.

List the account's stacks

GET/api/v1/stacks

Auth: API key

Parameters

NameInTypeDescription
enrichquerystring1 or true requests GitHub enrichment; otherwise DB-only.

Responses

200 Successful response.

StackList

FieldTypeDescription
stacksrequiredarray of StackDto
  • 401 500 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/stacks' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

List stacks with live GitHub state

GET/api/v1/stacks/enrich

Auth: API key

Parameters

NameInTypeDescription
stackIdquerystring

Responses

200 Successful response.

StackList

FieldTypeDescription
stacksrequiredarray of StackDto
  • 401 500 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/stacks/enrich' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Change a stack's policy

PATCH/api/v1/stacks/{id}

Auth: API key

Only supplied policy keys are echoed. Null clears review/patch/conflict/CI overrides to account defaults. Auto land accepts only boolean. archived and unknown keys are rejected. Enabling Cyclone overrides requires a connected Cyclone account.

Parameters

NameInTypeDescription
idrequiredpathstring

Request body

StackPolicyRequest

FieldTypeDescription
autoEnqueueWhenReadyboolean
autoReviewOverrideboolean | null
autoPatchOverrideboolean | null
autoResolveConflictsOverrideboolean | null
autoFixCiOverrideboolean | null

Responses

200 Successful response.

StackPolicyPatch

FieldTypeDescription
autoEnqueueWhenReadyboolean
autoReviewOverrideboolean | null
autoPatchOverrideboolean | null
autoResolveConflictsOverrideboolean | null
autoFixCiOverrideboolean | null
  • 400 401 404 500 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X PATCH 'https://api.mergestorm.ai/api/v1/stacks/<id>' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Adopt an open pull request chain as a stack

POST/api/v1/stacks/adopt

Auth: API key

Requires the bearer account infrastructure installation and uses its account policy and credits. Policy uses camelCase; MCP snake_case inputs are mapped by the shared client.

Parameters

NameInTypeDescription
x-mergestorm-chat-idheaderstring (uuid)A Breeze chat of the caller. When the stack is registered, its pull request is linked to that chat and the chat follows the stack's landing and the pull request's Vortex reviews as background tasks. mg sends it from MERGESTORM_CHAT_ID.

Request body

StackAdoptRequest

FieldTypeDescription
ownerrequiredstring
reporequiredstring
prNumberrequiredintegermin 1
autoEnqueueWhenReadyboolean
autoReviewOverrideboolean | null
autoPatchOverrideboolean | null
autoResolveConflictsOverrideboolean | null
autoFixCiOverrideboolean | null

Responses

200 Successful response.

StackAdoptResponse

One of: Option 1

FieldTypeDescription
stackrequirednull | EngineStackRecord
chainrequiredarray of EngineStackLayer
  • 400 409 422 500 502 Adoption validation, installation, topology or control failure.
  • 401 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/adopt' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "owner": "<owner>",
  "repo": "<repo>",
  "prNumber": 1
}'

Repair the stored display state of stacks

POST/api/v1/stacks/repair

Auth: API key

Request body

StackRepairRequest

FieldTypeDescription
stackIdstring

Responses

200 Successful response.

StackDisplayRepairResult

FieldTypeDescription
outcomerequired"failed" | "skipped" | "complete" | "partial"
stacksrequiredarray of StackDto
repairedrequiredarray of string
partialrequiredarray of string
skippedrequiredarray of string
truncatedrequiredboolean
errorstring
  • 401 500 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/repair' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Restack layers after a base changed

POST/api/v1/stacks/{id}/restack

Auth: API key

Proxies the shipped stacks control operation. Control failures retain their error and optional message/detail fields; unconfigured control returns 503, unreachable control returns 502. Bearer account owns the stack.

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

200 Successful response.

StackRestackResponse

One of: Option 1

FieldTypeDescription
fromBranchrequiredstring
fromOldSharequiredstring
outcomerequiredEngineRestackOutcome
  • 400 404 422 500 502 503 Control failure. error identifies the refusal; message and operation-specific handoff fields may be present.
  • 401 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/<id>/restack' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Resume an interrupted handover between layers

POST/api/v1/stacks/{id}/resume-seam

Auth: API key

Proxies the shipped stacks control operation. Control failures retain their error and optional message/detail fields; unconfigured control returns 503, unreachable control returns 502. Bearer account owns the stack.

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

200 Successful response.

StackResumeSeamResponse

One of: Option 1

FieldTypeDescription
seamPrNumberrequirednumber
headSharequiredstring
duplicaterequiredboolean
  • 400 404 409 500 502 503 Control failure. error identifies the refusal; message and operation-specific handoff fields may be present.
  • 401 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/<id>/resume-seam' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Open or find the stack's land pull request

POST/api/v1/stacks/{id}/ensure-land-pr

Auth: API key

Proxies the shipped stacks control operation. Control failures retain their error and optional message/detail fields; unconfigured control returns 503, unreachable control returns 502. Bearer account owns the stack.

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

200 Successful response.

StackEnsureLandPrResponse

One of: Option 1

FieldTypeDescription
landPrNumberrequirednumber
createdrequiredboolean
unitIdrequiredstring
uNumberrequirednumber
  • 400 404 422 500 502 503 Control failure. error identifies the refusal; message and operation-specific handoff fields may be present.
  • 401 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/<id>/ensure-land-pr' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Abandon the stack's review unit without landing it

POST/api/v1/stacks/{id}/abandon-unit

Auth: API key

Proxies the shipped stacks control operation. Control failures retain their error and optional message/detail fields; unconfigured control returns 503, unreachable control returns 502. Bearer account owns the stack.

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

200 Successful response.

StackAbandonUnitResponse

One of: Option 1

FieldTypeDescription
unitIdrequiredstring
uNumberrequirednumber
ownedTrunkrequiredstring
  • 400 404 422 500 502 503 Control failure. error identifies the refusal; message and operation-specific handoff fields may be present.
  • 401 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/<id>/abandon-unit' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Close a stack

POST/api/v1/stacks/{id}/close

Auth: API key

Proxies the shipped stacks control operation. Control failures retain their error and optional message/detail fields; unconfigured control returns 503, unreachable control returns 502. Bearer account owns the stack.

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

200 Successful response.

StackCloseStackResponse

One of: Option 1

FieldTypeDescription
closedrequiredarray of number
abandonedrequiredboolean
deletedrequiredboolean
  • 400 404 422 500 502 503 Control failure. error identifies the refusal; message and operation-specific handoff fields may be present.
  • 401 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/<id>/close' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Park upper layers on a frozen base

POST/api/v1/stacks/{id}/ensure-upper-park

Auth: API key

Proxies the shipped stacks control operation. Control failures retain their error and optional message/detail fields; unconfigured control returns 503, unreachable control returns 502. Bearer account owns the stack.

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

200 Successful response.

StackEnsureUpperParkResponse

One of: Option 1

FieldTypeDescription
freezeBranchrequiredstring
createdrequiredboolean
  • 400 404 422 500 502 503 Control failure. error identifies the refusal; message and operation-specific handoff fields may be present.
  • 401 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/<id>/ensure-upper-park' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Sync a stack with GitHub

POST/api/v1/stacks/{id}/sync

Auth: API key

Proxies the shipped stacks control operation. Control failures retain their error and optional message/detail fields; unconfigured control returns 503, unreachable control returns 502. Bearer account owns the stack.

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

200 Successful response.

StackSyncResponse

One of: Option 1

FieldTypeDescription
stackrequirednull | EngineStackRecord
chainrequiredarray of EngineStackLayer
deletedrequiredboolean
repairrequiredStackDisplayRepairResult
agentHealobject
agentHeal.clearedPostedFindingKeyrequirednumber
agentHeal.clearedAwaitingFixVerdictrequirednumber
agentHeal.clearedPendingPostrequirednumber
  • 400 404 500 502 503 Control failure. error identifies the refusal; message and operation-specific handoff fields may be present.
  • 401 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/<id>/sync' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Merge queue

Queue a stack for verified landing, read the queue, land or promote the next layer, and cancel an entry.

Read merge queue entries

GET/api/v1/stacks/queue

Auth: API key

Parameters

NameInTypeDescription
stackIdquerystringA UUID scopes entries; invalid UUID is treated as no filter.
waitqueryintegerLong poll timeout in seconds.default 0 · min 0 · max 45
seenquerystringPrevious fingerprint; unchanged or empty entries wait for an event.
landedquery"1"With a valid stackId, include the latest landed entry or null.

Responses

200 Successful response.

StackQueue

FieldTypeDescription
entriesrequiredarray of MergeQueueEntryDto
fingerprintrequiredstringpattern ^[0-9a-f]{32}$
landednull | MergeQueueEntryDto
  • 400 401 500 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/stacks/queue' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Add a stack to the merge queue

POST/api/v1/stacks/{id}/enqueue

Auth: API key

Proxies the shipped stacks control operation. Control failures retain their error and optional message/detail fields; unconfigured control returns 503, unreachable control returns 502. Bearer account owns the stack.

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

200 Successful response.

StackQueueEnqueueResponse

One of: EngineEnqueueMergeQueueEntryResult

  • 400 404 409 500 502 503 Control failure. error identifies the refusal; message and operation-specific handoff fields may be present.
  • 401 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/<id>/enqueue' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Land the next layer

POST/api/v1/stacks/{id}/land-next

Auth: API key

Proxies the shipped stacks control operation. Control failures retain their error and optional message/detail fields; unconfigured control returns 503, unreachable control returns 502. Bearer account owns the stack.

Parameters

NameInTypeDescription
idrequiredpathstring

Request body

StackOptionalPrRequest

Optional JSON body; absent, null or malformed JSON is treated as no selection. A numeric string is also accepted by runtime coercion. force is ignored on the bearer surface.

FieldTypeDescription
prNumberinteger | null

Responses

200 Successful response.

StackLandNextResponse

One of: Option 1

FieldTypeDescription
mergedPrNumberrequirednumber
mergedBranchrequiredstring
mergeHandledrequiredobject
mergeHandled as Option 1
mergeHandled.handledrequiredfalse
mergeHandled.reasonrequired"not_in_stack" | "foreign_parked_child"
mergeHandled as Option 2
mergeHandled.handledrequiredtrue
mergeHandled.outcomerequiredEngineRestackOutcome

One of: Option 2

FieldTypeDescription
seamPrNumbernumber
seamEnqueuedboolean
mergedPrNumberrequirednumber
mergedBranchrequiredstring
unitIdrequiredstring
uNumberrequirednumber
promotedHeadSharequiredstring
mergeHandledrequiredobject
mergeHandled as Option 1
mergeHandled.handledrequiredfalse
mergeHandled.reasonrequired"not_in_stack" | "foreign_parked_child"
mergeHandled as Option 2
mergeHandled.handledrequiredtrue
mergeHandled.outcomerequiredEngineRestackOutcome
  • 400 404 409 422 500 502 503 Control failure. error identifies the refusal; message and operation-specific handoff fields may be present.
  • 401 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/<id>/land-next' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Promote the next layer into the review unit

POST/api/v1/stacks/{id}/promote-next

Auth: API key

Proxies the shipped stacks control operation. Control failures retain their error and optional message/detail fields; unconfigured control returns 503, unreachable control returns 502. Bearer account owns the stack.

Parameters

NameInTypeDescription
idrequiredpathstring

Request body

StackOptionalPrRequest

Optional JSON body; absent, null or malformed JSON is treated as no selection. A numeric string is also accepted by runtime coercion. force is ignored on the bearer surface.

FieldTypeDescription
prNumberinteger | null

Responses

200 Successful response.

StackPromoteNextResponse

One of: Option 1

FieldTypeDescription
seamPrNumbernumber
seamEnqueuedboolean
mergedPrNumberrequirednumber
mergedBranchrequiredstring
unitIdrequiredstring
uNumberrequirednumber
promotedHeadSharequiredstring
mergeHandledrequiredobject
mergeHandled as Option 1
mergeHandled.handledrequiredfalse
mergeHandled.reasonrequired"not_in_stack" | "foreign_parked_child"
mergeHandled as Option 2
mergeHandled.handledrequiredtrue
mergeHandled.outcomerequiredEngineRestackOutcome
  • 400 404 409 422 500 502 503 Control failure. error identifies the refusal; message and operation-specific handoff fields may be present.
  • 401 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/<id>/promote-next' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Cancel a merge queue entry

POST/api/v1/stacks/queue/{entryId}/cancel

Auth: API key

Parameters

NameInTypeDescription
entryIdrequiredpathstring

Responses

200 Successful response.

StackQueueCancelResponse

One of: Option 1

FieldTypeDescription
entryrequiredEngineMergeQueueEntry
cancelRequestedrequiredboolean

One of: Option 2

FieldTypeDescription
entryrequiredEngineMergeQueueEntry
202 Successful response.

StackQueueCancelResponse

One of: Option 1

FieldTypeDescription
entryrequiredEngineMergeQueueEntry
cancelRequestedrequiredboolean

One of: Option 2

FieldTypeDescription
entryrequiredEngineMergeQueueEntry
  • 400 404 409 500 502 503 Queue cancellation failure; already_finished includes the latest entry.
  • 401 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/queue/<entryId>/cancel' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Pull requests and issues

Open pull requests and issues and push branches through the Mergestorm GitHub App, without a local GitHub token.

Find the open pull request for a branch

GET/api/v1/stacks/pulls

Auth: API key

Parameters

NameInTypeDescription
ownerrequiredquerystring
reporequiredquerystring
headrequiredquerystring

Responses

200 Successful response.

StackPullLookup

FieldTypeDescription
numberrequiredinteger | null
urlrequiredstring | null
  • 400 401 403 500 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/stacks/pulls?owner=%3Cowner%3E&repo=%3Crepo%3E&head=%3Chead%3E' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Open a pull request

POST/api/v1/stacks/pulls

Auth: API key

Request body

StackPullRequest

FieldTypeDescription
ownerrequiredstring
reporequiredstring
headrequiredstring
baserequiredstring
titlerequiredstring
bodystring

Responses

200 Successful response.

StackPullOpened

FieldTypeDescription
numberrequiredintegermin 1
urlrequiredstring
createdrequiredboolean
basestring
201 Successful response.

StackPullOpened

FieldTypeDescription
numberrequiredintegermin 1
urlrequiredstring
createdrequiredboolean
basestring
  • 400 401 403 500 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/pulls' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "owner": "<owner>",
  "repo": "<repo>",
  "head": "<head>",
  "base": "<base>",
  "title": "<title>"
}'

Claim branches before opening their pull requests

POST/api/v1/stacks/pull-claims

Auth: API key

Request body

StackPullClaimRequest

FieldTypeDescription
ownerrequiredstring
reporequiredstring
headsrequiredarray of stringmin items 1 · max items 20

Responses

200 Successful response.

StackPullClaimResponse

FieldTypeDescription
claimedrequiredinteger
expiresAtrequiredstring
  • 400 401 500 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/pull-claims' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "owner": "<owner>",
  "repo": "<repo>",
  "heads": [
    "<heads>"
  ]
}'

Open a GitHub issue

POST/api/v1/stacks/issues

Auth: API key

Request body

StackIssueRequest

FieldTypeDescription
ownerrequiredstring
reporequiredstring
titlerequiredstringmax length 256
bodystringmax length 60000
labelsarray of stringmax items 10

Responses

200 An open issue this route already made for the caller with the same title.

StackPullOpened

FieldTypeDescription
numberrequiredintegermin 1
urlrequiredstring
createdrequiredboolean
basestring
201 The issue was created.

StackPullOpened

FieldTypeDescription
numberrequiredintegermin 1
urlrequiredstring
createdrequiredboolean
basestring
  • 400 401 403 413 500 502 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/issues' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "owner": "<owner>",
  "repo": "<repo>",
  "title": "<title>"
}'

Read a branch's publication status

GET/api/v1/stacks/publications

Auth: API key

Parameters

NameInTypeDescription
ownerrequiredquerystring
reporequiredquerystring
branchrequiredquerystring

Responses

200 Successful response.

StackPublicationStatus

FieldTypeDescription
staterequired"absent" | "pushed" | "opened" | "registered"
ownerrequiredstring
reporequiredstring
branchrequiredstring
headrequiredStackPublicationHead | null
prrequiredobject | null
pr as Option 1
pr.numberrequiredinteger
pr.urlrequiredstring
pr.baserequiredstring
pr as Option 2: null
stackrequiredStackPublicationStack | null
  • 400 401 403 500 502 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/stacks/publications?owner=%3Cowner%3E&repo=%3Crepo%3E&branch=%3Cbranch%3E' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Push commits to a branch and open its pull request

POST/api/v1/stacks/publications

Auth: API key

Parameters

NameInTypeDescription
x-mergestorm-chat-idheaderstring (uuid)A Breeze chat of the caller. When the stack is registered, its pull request is linked to that chat and the chat follows the stack's landing and the pull request's Vortex reviews as background tasks. mg sends it from MERGESTORM_CHAT_ID.

Request body

StackPublicationRequest

FieldTypeDescription
ownerrequiredstring
reporequiredstring
branchrequiredstring
baserequiredobject
base.branchrequiredstring
base.sharequiredstring
expectedHeadrequiredstring | nullThe head the branch must have now. Null means the branch must not exist.
ontorequired"base" | "head"base starts the commits at base.sha; head appends them to expectedHead.
commitsrequiredarray of StackPublicationCommitmax items 20
prrequiredobject
pr.titlerequiredstring
pr.bodystring
autoLandboolean

Responses

200 Neither the branch nor the pull request was created by this request; the stack is registered.

StackPublication

FieldTypeDescription
staterequired"registered"
ownerrequiredstring
reporequiredstring
branchrequiredstring
baserequiredobject
base.branchrequiredstring
base.sharequiredstring
headrequiredStackPublicationHead
commitsrequiredarray of StackPublicationHead
branchCreatedrequiredboolean
branchUpdatedrequiredboolean
prrequiredStackPullOpened
stackrequiredStackPublicationStack
201 The branch or the pull request was created.

StackPublication

FieldTypeDescription
staterequired"registered"
ownerrequiredstring
reporequiredstring
branchrequiredstring
baserequiredobject
base.branchrequiredstring
base.sharequiredstring
headrequiredStackPublicationHead
commitsrequiredarray of StackPublicationHead
branchCreatedrequiredboolean
branchUpdatedrequiredboolean
prrequiredStackPullOpened
stackrequiredStackPublicationStack
  • 400 401 403 409 413 422 500 502 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/stacks/publications' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "owner": "<owner>",
  "repo": "<repo>",
  "branch": "<branch>",
  "base": {
    "branch": "<branch>",
    "sha": "<sha>"
  },
  "expectedHead": "<expectedHead>",
  "onto": "base",
  "commits": [
    {
      "message": "<message>",
      "author": {
        "name": "<name>",
        "email": "<email>",
        "date": "<date>"
      },
      "committer": {
        "name": "<name>",
        "email": "<email>",
        "date": "<date>"
      },
      "tree": "<tree>",
      "changes": [
        {}
      ]
    }
  ],
  "pr": {
    "title": "<title>"
  }
}'

Agents

Start Vortex reviews, Cyclone fixes and builds, and Surge CI setup on a repository.

Start a Vortex review of an open pull request

POST/api/v1/agents/vortex/review

Auth: API key

Starts a Vortex review of the pull request at its current head (one standard credit). With head_sha, nothing starts unless that is still the head. With chat_id, the Breeze chat is woken with the result. A review already running at that head answers 200 with already_running. A repository without the Vortex App answers 409 vortex_not_installed with setup_gate {app, owner, repo, install_url}.

Request body

AgentPullRequestRequest

FieldTypeDescription
ownerrequiredstring
reporequiredstring
pr_numberrequiredintegermin 1
head_shastringreview only: the head the review must start at
chat_idstring (uuid)review only: the Breeze chat to wake with the result

Responses

200 Successful response.

AgentRunResult

FieldTypeDescription
messagerequiredstringWhat happened, ready to show
202 Successful response.

AgentRunResult

FieldTypeDescription
messagerequiredstringWhat happened, ready to show
  • 400 401 402 409 500 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/agents/vortex/review' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "owner": "<owner>",
  "repo": "<repo>",
  "pr_number": 1
}'

Cancel the Vortex review running on a pull request

POST/api/v1/agents/vortex/stop

Auth: API key

Starts nothing. Answers stopped false with reason not_running when no review runs.

Request body

AgentPullRequestRequest

FieldTypeDescription
ownerrequiredstring
reporequiredstring
pr_numberrequiredintegermin 1
head_shastringreview only: the head the review must start at
chat_idstring (uuid)review only: the Breeze chat to wake with the result

Responses

200 Successful response.

AgentRunResult

FieldTypeDescription
messagerequiredstringWhat happened, ready to show
  • 400 401 402 409 500 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/agents/vortex/stop' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "owner": "<owner>",
  "repo": "<repo>",
  "pr_number": 1
}'

Have Cyclone fix a pull request or build a new project

POST/api/v1/agents/cyclone/jobs

Auth: API key

task fix_findings, fix_ci or resolve_conflicts pushes a fix to pr_number; build builds brief into an empty repository and opens a pull request. A pull request with nothing to do (CI green, no conflicts, no open findings) is refused with 409 nothing_to_do and the reason. A repository without the Cyclone App answers 409 cyclone_not_installed with setup_gate {app, owner, repo, install_url}. With chat_id, the Breeze chat is woken with the job's result.

Request body

CycloneJobRequest

FieldTypeDescription
taskrequired"fix_findings" | "fix_ci" | "resolve_conflicts" | "build"
ownerrequiredstring
reporequiredstring
pr_numberintegerrequired unless task is buildmin 1
failing_checkstringfix_ci only: the check to fix
briefstringbuild only: what to buildmax length 4000
chat_idstring (uuid)

Responses

200 Successful response.

AgentRunResult

FieldTypeDescription
messagerequiredstringWhat happened, ready to show
202 Successful response.

AgentRunResult

FieldTypeDescription
messagerequiredstringWhat happened, ready to show
  • 400 401 402 409 500 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/agents/cyclone/jobs' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "task": "fix_findings",
  "owner": "<owner>",
  "repo": "<repo>"
}'

Read a Cyclone job started through the agents API

GET/api/v1/agents/cyclone/jobs/{dispatch_id}

Auth: API key

Parameters

NameInTypeDescription
dispatch_idrequiredpathstring (uuid)

Responses

200 Successful response.

CycloneJob

FieldTypeDescription
dispatch_idrequiredstring (uuid)
task"fix_findings" | "fix_ci" | "resolve_conflicts" | "build" | null
ownerstring
repostring
pr_numberinteger | null
branchstring | null
staterequired"queued" | "running" | "pushed" | "completed" | "failed"
outcomestring | null
detailstring | null
start_shastring | null
result_shastring | null
changed_filesarray of string
queued_atstring (date-time)
started_atstring (date-time) | null
finished_atstring (date-time) | null
  • 400 401 404 500 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/agents/cyclone/jobs/00000000-0000-4000-8000-000000000000' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Serve a repository on Surge and open its Surge CI setup pull request

POST/api/v1/agents/surge/setup

Auth: API key

Serves the repository on Surge when the account does not serve it yet, then opens the pull request that points its workflow jobs at Surge runners and adds the merge queue batch trigger.

Request body

AgentRepositoryRequest

FieldTypeDescription
ownerrequiredstring
reporequiredstring

Responses

200 Successful response.

AgentRunResult

FieldTypeDescription
messagerequiredstringWhat happened, ready to show
  • 400 401 402 409 500 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/agents/surge/setup' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "owner": "<owner>",
  "repo": "<repo>"
}'

Memories

Read and write what Breeze remembers about the user and their repositories.

List the account's memories, newest first

GET/api/v1/memories

Auth: API key

Lists the memories of the key's own account, at most 1,000. Filters combine. Listing works with memory off, so the user can still see and delete what is stored.

Parameters

NameInTypeDescription
scopequeryMemoryScope (enum)
repoquerystringA repository as owner/repo.
kindqueryMemoryKind (enum)

Responses

200 Successful response.

MemoryList

FieldTypeDescription
memory_moderequiredMemoryMode (enum)
itemsrequiredarray of Memory
  • 400 401 413 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/memories' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Save one memory

POST/api/v1/memories

Auth: API key

Saves one memory for the key's own account. With repo it is a memory about that repository, otherwise about the user. A save that matches an existing memory updates it (merged true). Refused with memory_off when the effective memory mode is off: the Breeze chat's own mode when chat_id names a chat that has one, otherwise the account mode. Also refused with memory_full at 1,000 memories. Text that looks like a key, token or password is refused.

Request body

CreateMemoryRequest

FieldTypeDescription
textrequiredstringmin length 1 · max length 500
kindrequiredMemoryKind (enum)
repostring | nullA repository as owner/repo.
chat_idstring (uuid) | nullThe Breeze chat the memory comes from.

Responses

201 Saved.

MemorySaved

FieldTypeDescription
idrequiredstring (uuid)
mergedrequiredboolean
  • 400 401 409 413 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/memories' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "<text>",
  "kind": "rule"
}'

Search the account's memories by meaning

GET/api/v1/memories/search

Auth: API key

Searches the user's memories, and with repo that repository's memories too, best match first. rules holds the standing rules for repo. Nothing is returned when the effective memory mode is off. That mode is the chat's own mode when chat_id names a chat that has one, and the account mode otherwise, so an account mode of off does not block a chat set to all or on_request.

Parameters

NameInTypeDescription
queryrequiredquerystringmin length 1 · max length 2000
repoquerystringA repository as owner/repo.
limitqueryintegerdefault 20 · min 1 · max 20
chat_idquerystring (uuid)The Breeze chat the search is for.

Responses

200 Successful response.

MemorySearch

FieldTypeDescription
memory_moderequiredMemoryMode (enum)
rulesrequiredarray of Memory
itemsrequiredarray of Memory
totalrequiredintegermin 0
  • 400 401 413 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/memories/search?query=%3Cquery%3E' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Read the account's memory mode

GET/api/v1/memories/mode

Auth: API key

Responses

200 Successful response.

MemoryModeSetting

FieldTypeDescription
memory_moderequiredMemoryMode (enum)
  • 401 413 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/memories/mode' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Set the account's memory mode

PUT/api/v1/memories/mode

Auth: API key

This sets the account default. A chat with its own memory mode keeps that mode, so with the account at off a chat set to all or on_request still saves and recalls. Where a chat has no override, off stops saving and recall, on_request saves only when the user asks, and all lets Breeze save on its own.

Request body

MemoryModeSetting

FieldTypeDescription
memory_moderequiredMemoryMode (enum)

Responses

200 Successful response.

MemoryModeSetting

FieldTypeDescription
memory_moderequiredMemoryMode (enum)
  • 400 401 413 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X PUT 'https://api.mergestorm.ai/api/v1/memories/mode' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "memory_mode": "off"
}'

Correct one of the account's memories

PATCH/api/v1/memories/{memory_id}

Auth: API key

Parameters

NameInTypeDescription
memory_idrequiredpathstring (uuid)

Request body

UpdateMemoryRequest

FieldTypeDescription
textrequiredstringmin length 1 · max length 500
kindMemoryKind (enum)

Responses

200 Updated.

MemoryUpdated

FieldTypeDescription
idrequiredstring (uuid)
textrequiredstring
kindMemoryKind (enum)
  • 400 401 404 413 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X PATCH 'https://api.mergestorm.ai/api/v1/memories/00000000-0000-4000-8000-000000000000' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "<text>"
}'

Delete one of the account's memories

DELETE/api/v1/memories/{memory_id}

Auth: API key

Parameters

NameInTypeDescription
memory_idrequiredpathstring (uuid)

Responses

200 Deleted.

MemoryDeleted

FieldTypeDescription
idrequiredstring (uuid)
deletedrequiredtrue
  • 401 404 413 503 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X DELETE 'https://api.mergestorm.ai/api/v1/memories/00000000-0000-4000-8000-000000000000' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Account

The account behind the API key.

Read the account and credits behind the API key

GET/api/v1/me

Auth: API key

Responses

200 API-key metadata and credit usage.

Account

FieldTypeDescription
keyrequiredobject
key.prefixrequiredstring
key.namerequiredstring
key.created_atrequiredstring (date-time)
key.last_used_atrequiredstring (date-time) | null
plan_keyrequiredstring
plan_label_keyrequiredstring
resets_atrequiredstring (date-time)
usagerequiredobject
usage.standardrequiredobject
usage.standard.usedrequiredinteger
usage.standard.limitrequiredinteger | null
usage.standard.remainingrequiredinteger | null
  • 401 500 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/me' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Settings

Account and per-repository agent settings.

Read the account's agent settings

GET/api/v1/settings

Auth: API key

Responses

200 Bearer-visible account settings (allowlist only).

AccountSettings

FieldTypeDescription
ignored_bot_loginsrequiredarray of stringBot logins; trimmed, lowercased, and trailing [bot] removed. Empty, invalid, or duplicate canonical logins are rejected. An empty array clears the list.
vortex_bot_skip_checkrequired"none" | "neutral"
vortex_findings_checkrequired"failure" | "neutral" | "success"
cyclone_patch_failure_checkrequired"failure" | "neutral"
auto_review_enabledrequiredboolean
auto_patch_enabledrequiredboolean
auto_resolve_conflicts_enabledrequiredbooleanOff by default. Setting for Cyclone to resolve merge conflicts on stack pull requests. Nothing reads it yet.
auto_fix_ci_enabledrequiredbooleanOff by default. Setting for Cyclone to fix failing CI on stack pull requests. Nothing reads it yet.
cyclone_connectedrequiredbooleanRead-only. Cyclone GitHub app installed for this account.
github_connectedrequiredbooleanRead-only. Vortex GitHub app installed for this account.
stacks_readyrequiredbooleanRead-only. The account has a Mergestorm Surge installation that is not suspended and has its permissions approved. Stacks, the merge queue and Auto land run only through Surge.
vortex_show_thinking_tracesrequiredboolean
repo_overview_enabledrequiredboolean
cyclone_review_unit_land_prs_enabledrequiredbooleanMirror of auto_patch_enabled; land PRs follow the account auto-patch setting.
cyclone_skip_ci_enabledrequiredbooleanWhen true (the default), Cyclone prefixes bot patch subjects with [skip ci]. Explicit false opts the account out.
cyclone_patch_unverified_languagesrequiredbooleanOff by default. When false, Cyclone auto-patch commits TypeScript, Python, SQL, Swift, and recognized text and config file findings. TypeScript and Python have an owned typecheck gate, SQL is parsed as PostgreSQL, and Swift is parsed with swiftc -parse. When true, Cyclone also patches other languages and pushes them without a verify gate. Independent of auto_patch_enabled; human chat-fix dispatches bypass it.
vortex_seam_specialist_enabledrequiredboolean
vortex_auto_overflow_enabledrequiredboolean
vortex_skip_all_clear_commentsrequiredbooleanOff by default. When true, Vortex skips the GitHub All-clear / nothing-new review body for a wave with no new actionable findings. The check run and coverage still complete; reviews with findings still post.
auto_land_defaultrequiredbooleanAccount default for Auto land. Copied onto each stack once when it is opened; changing it never touches existing stacks.
auto_land_settle_secondsrequiredintegerSeconds Auto land waits after a stack looks ready before it queues or promotes it. Defaults to 60. A new value applies to settle clocks that start after the change; a running clock keeps the window it started with. min 15 · max 300
merge_queue_batch_enabledrequiredbooleanOff by default. When true, the merge queue may test several of the account's queued single-PR stacks on one CI run. A repository batches once its CI runs on mq-batch-** branches.
merge_queue_batch_sizerequiredintegerThe normal batch limit: the most pull requests the merge queue tests together in one batch. Defaults to 4. Read when a batch is planned. While merge queue overdrive resolves on for a repository, that repository's queue batches up to 10 regardless of this value. min 2 · max 10
merge_queue_overdriverequiredbooleanAccount default for merge queue overdrive, off by default. While it resolves on for a repository, that repository's merge queue batches up to 10 queued pull requests, even with batching off, and merge_queue_batch_size is kept. It stays on until turned off. A repository setting overrides it.
merge_queue_lands_alone_pathsrequiredarray of stringAccount default for the merge queue path rule. A queued pull request that changes any file matching one of these patterns is never batched with other pull requests. A pattern without wildcards is a folder or file prefix (db/migrate); * matches within one folder, ** across folders, ? one character (**/*.sql), and a glob ending in / means that folder (**/migrations/ is **/migrations/**). At most 8 wildcards per pattern. Defaults to **/migrations/**, db/migrate/** and .github/workflows/**. An empty list keeps only the built-in rule that a stack with more than one open pull request lands alone. Read when a batch is planned. max items 50
  • 401 500 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/settings' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Change the account's agent settings

PATCH/api/v1/settings

Auth: API key

Request body

PatchSettingsRequest

Fail-closed typed allowlist. Unknown or read-only keys, invalid values, and empty objects are rejected with 400. Enabling auto_patch_enabled, auto_resolve_conflicts_enabled, or auto_fix_ci_enabled requires cyclone_connected (400 cyclone_not_connected). Disabling any of them always succeeds.

FieldTypeDescription
ignored_bot_loginsarray of stringBot logins; trimmed, lowercased, and trailing [bot] removed. Empty, invalid, or duplicate canonical logins are rejected. An empty array clears the list.
vortex_bot_skip_check"none" | "neutral"
vortex_findings_check"failure" | "neutral" | "success"
cyclone_patch_failure_check"failure" | "neutral"
auto_review_enabledboolean
auto_patch_enabledboolean
auto_resolve_conflicts_enabledboolean
auto_fix_ci_enabledboolean
vortex_show_thinking_tracesboolean
repo_overview_enabledboolean
cyclone_skip_ci_enabledboolean
cyclone_patch_unverified_languagesboolean
vortex_seam_specialist_enabledboolean
vortex_auto_overflow_enabledboolean
vortex_skip_all_clear_commentsboolean
auto_land_defaultboolean
auto_land_settle_secondsintegerWhole seconds from 15 through 300. Anything else is rejected with 400 invalid_value.min 15 · max 300
merge_queue_batch_enabledboolean
merge_queue_batch_sizeintegerA whole number from 2 through 10. Anything else is rejected with 400 invalid_value.min 2 · max 10
merge_queue_lands_alone_pathsarray of stringThe whole list, at most 50 folder prefixes or globs with no spaces; blank entries are dropped and duplicates folded. An empty list is a value. Anything else is rejected with 400 invalid_value. max items 50
merge_queue_overdriveboolean

Responses

200 Updated settings; same shape as GET so clients can confirm.

AccountSettings

FieldTypeDescription
ignored_bot_loginsrequiredarray of stringBot logins; trimmed, lowercased, and trailing [bot] removed. Empty, invalid, or duplicate canonical logins are rejected. An empty array clears the list.
vortex_bot_skip_checkrequired"none" | "neutral"
vortex_findings_checkrequired"failure" | "neutral" | "success"
cyclone_patch_failure_checkrequired"failure" | "neutral"
auto_review_enabledrequiredboolean
auto_patch_enabledrequiredboolean
auto_resolve_conflicts_enabledrequiredbooleanOff by default. Setting for Cyclone to resolve merge conflicts on stack pull requests. Nothing reads it yet.
auto_fix_ci_enabledrequiredbooleanOff by default. Setting for Cyclone to fix failing CI on stack pull requests. Nothing reads it yet.
cyclone_connectedrequiredbooleanRead-only. Cyclone GitHub app installed for this account.
github_connectedrequiredbooleanRead-only. Vortex GitHub app installed for this account.
stacks_readyrequiredbooleanRead-only. The account has a Mergestorm Surge installation that is not suspended and has its permissions approved. Stacks, the merge queue and Auto land run only through Surge.
vortex_show_thinking_tracesrequiredboolean
repo_overview_enabledrequiredboolean
cyclone_review_unit_land_prs_enabledrequiredbooleanMirror of auto_patch_enabled; land PRs follow the account auto-patch setting.
cyclone_skip_ci_enabledrequiredbooleanWhen true (the default), Cyclone prefixes bot patch subjects with [skip ci]. Explicit false opts the account out.
cyclone_patch_unverified_languagesrequiredbooleanOff by default. When false, Cyclone auto-patch commits TypeScript, Python, SQL, Swift, and recognized text and config file findings. TypeScript and Python have an owned typecheck gate, SQL is parsed as PostgreSQL, and Swift is parsed with swiftc -parse. When true, Cyclone also patches other languages and pushes them without a verify gate. Independent of auto_patch_enabled; human chat-fix dispatches bypass it.
vortex_seam_specialist_enabledrequiredboolean
vortex_auto_overflow_enabledrequiredboolean
vortex_skip_all_clear_commentsrequiredbooleanOff by default. When true, Vortex skips the GitHub All-clear / nothing-new review body for a wave with no new actionable findings. The check run and coverage still complete; reviews with findings still post.
auto_land_defaultrequiredbooleanAccount default for Auto land. Copied onto each stack once when it is opened; changing it never touches existing stacks.
auto_land_settle_secondsrequiredintegerSeconds Auto land waits after a stack looks ready before it queues or promotes it. Defaults to 60. A new value applies to settle clocks that start after the change; a running clock keeps the window it started with. min 15 · max 300
merge_queue_batch_enabledrequiredbooleanOff by default. When true, the merge queue may test several of the account's queued single-PR stacks on one CI run. A repository batches once its CI runs on mq-batch-** branches.
merge_queue_batch_sizerequiredintegerThe normal batch limit: the most pull requests the merge queue tests together in one batch. Defaults to 4. Read when a batch is planned. While merge queue overdrive resolves on for a repository, that repository's queue batches up to 10 regardless of this value. min 2 · max 10
merge_queue_overdriverequiredbooleanAccount default for merge queue overdrive, off by default. While it resolves on for a repository, that repository's merge queue batches up to 10 queued pull requests, even with batching off, and merge_queue_batch_size is kept. It stays on until turned off. A repository setting overrides it.
merge_queue_lands_alone_pathsrequiredarray of stringAccount default for the merge queue path rule. A queued pull request that changes any file matching one of these patterns is never batched with other pull requests. A pattern without wildcards is a folder or file prefix (db/migrate); * matches within one folder, ** across folders, ? one character (**/*.sql), and a glob ending in / means that folder (**/migrations/ is **/migrations/**). At most 8 wildcards per pattern. Defaults to **/migrations/**, db/migrate/** and .github/workflows/**. An empty list keeps only the built-in rule that a stack with more than one open pull request lands alone. Read when a batch is planned. max items 50
  • 400 401 500 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X PATCH 'https://api.mergestorm.ai/api/v1/settings' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

List per-repository settings

GET/api/v1/settings/repos

Auth: API key

Responses

200 One entry per repository connected to this account, with the repository-level value of each automation switch.

object

FieldTypeDescription
reposrequiredarray of RepoAutomationSettings
  • 401 500 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl 'https://api.mergestorm.ai/api/v1/settings/repos' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY"

Change one repository's settings

PATCH/api/v1/settings/repos/{owner}/{repo}

Auth: API key

Parameters

NameInTypeDescription
ownerrequiredpathstring
reporequiredpathstring

Request body

PatchRepoSettingsRequest

Unknown keys, invalid values, and empty objects are rejected with 400. null clears the repository value so the account setting applies again. Setting auto_patch_enabled to true requires Cyclone to be connected (400 cyclone_not_connected). merge_queue_batch_size takes a whole number from 2 through 10; merge_queue_lands_alone_paths takes a list of at most 50 path patterns, as on the account setting, and an empty list is a value.

FieldTypeDescription
auto_patch_enabledboolean | null
auto_review_enabledboolean | null
auto_land_defaultboolean | null
merge_queue_batch_enabledboolean | null
merge_queue_batch_sizeinteger | nullmin 2 · max 10
merge_queue_lands_alone_pathsarray of string | nullmax items 50
merge_queue_overdriveboolean | null

Responses

200 The stored repository settings.

RepoAutomationSettings

Repository-level settings for one connected repository. Each value is a value of its own or null. null means not set: the account setting applies. Precedence is the stack override, then the repository value, then the account setting. auto_land_default seeds new stacks in the repository; it does not change a stack that exists. The merge queue values override merge_queue_batch_enabled, merge_queue_batch_size and merge_queue_lands_alone_paths on the account for this repository; a repository path list replaces the account list as a whole.

FieldTypeDescription
ownerrequiredstring
reporequiredstring
auto_patch_enabledrequiredboolean | null
auto_review_enabledrequiredboolean | null
auto_land_defaultrequiredboolean | null
merge_queue_batch_enabledrequiredboolean | null
merge_queue_batch_sizerequiredinteger | nullmin 2 · max 10
merge_queue_lands_alone_pathsrequiredarray of string | nullmax items 50
merge_queue_overdriveboolean | null
  • 400 401 500 Request or server error.
  • 404 repo_not_connected: the repository is not connected to this account. Only the account that connected a repository can change its settings.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X PATCH 'https://api.mergestorm.ai/api/v1/settings/repos/<owner>/<repo>' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

API keys

Manage API keys. These endpoints use the dashboard session cookie, not an API key.

List the account's API keys

GET/api/v1/keys

Auth: Dashboard session cookie

Responses

200 Keys without secret material.

object

FieldTypeDescription
keysrequiredarray of ApiKey
  • 401 500 Request or server error.

Example

curl 'https://api.mergestorm.ai/api/v1/keys' \
  -H "Cookie: cra_session_v2=…"

Create an API key

POST/api/v1/keys

Auth: Dashboard session cookie + trusted Origin header

Request body

object

FieldTypeDescription
namestringmax length 80

Responses

201 Key created; key is returned once.

ApiKeyCreated

FieldTypeDescription
idrequiredstring (uuid)
namerequiredstring
key_prefixrequiredstring
created_atrequiredstring (date-time)
keyrequiredstringSecret shown once.
  • 400 401 403 500 Request or server error.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/keys' \
  -H "Cookie: cra_session_v2=…" \
  -H "Origin: https://mergestorm.ai" \
  -H "Content-Type: application/json" \
  -d '{}'

Revoke an API key

DELETE/api/v1/keys/{key_id}

Auth: Dashboard session cookie + trusted Origin header

Parameters

NameInTypeDescription
key_idrequiredpathstring (uuid)

Responses

200 Revoked.

object

FieldTypeDescription
okrequiredtrue
  • 401 403 404 500 Request or server error.

Example

curl -X DELETE 'https://api.mergestorm.ai/api/v1/keys/00000000-0000-4000-8000-000000000000' \
  -H "Cookie: cra_session_v2=…" \
  -H "Origin: https://mergestorm.ai"

CLI sign-in

The device sign-in flow mg login uses to mint an API key after approval in the browser.

Start a CLI sign-in and get a device code

POST/api/v1/cli/device

Auth: None

Responses

200 Device and user codes.

DeviceStart

FieldTypeDescription
device_coderequiredstring
user_coderequiredstring
verification_urirequiredstring (uri)
verification_uri_completerequiredstring (uri)
intervalrequiredinteger
expires_inrequiredinteger
  • 429 Per-key/IP window or account in-flight cap reached.
  • 500 Request or server error.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/cli/device'

Look up a pending CLI sign-in code

GET/api/v1/cli/device/lookup

Auth: Dashboard session cookie

Parameters

NameInTypeDescription
user_coderequiredquerystring

Responses

200 Device-code state.

DeviceLookup

FieldTypeDescription
statusrequired"pending" | "approved" | "redeemed" | "expired"
expires_atrequiredstring (date-time)
expiredrequiredboolean
  • 400 401 404 500 Request or server error.

Example

curl 'https://api.mergestorm.ai/api/v1/cli/device/lookup?user_code=%3Cuser_code%3E' \
  -H "Cookie: cra_session_v2=…"

Approve a CLI sign-in code

POST/api/v1/cli/device/approve

Auth: Dashboard session cookie + trusted Origin header

Request body

object

FieldTypeDescription
user_coderequiredstring

Responses

200 Approved.

object

FieldTypeDescription
okrequiredtrue
  • 400 401 403 404 409 410 500 Request or server error.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/cli/device/approve' \
  -H "Cookie: cra_session_v2=…" \
  -H "Origin: https://mergestorm.ai" \
  -H "Content-Type: application/json" \
  -d '{
  "user_code": "<user_code>"
}'

Exchange an approved device code for an API key

POST/api/v1/cli/device/token

Auth: None

Request body

object

FieldTypeDescription
device_coderequiredstring

Responses

200 API key minted.

DeviceToken

FieldTypeDescription
api_keyrequiredstring
key_prefixrequiredstring
  • 400 Pending, invalid, expired, already redeemed, or slow_down.
  • 429 Per-key/IP window or account in-flight cap reached.
  • 500 Request or server error.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/cli/device/token' \
  -H "Content-Type: application/json" \
  -d '{
  "device_code": "<device_code>"
}'

MCP

The hosted Model Context Protocol server. Its tools call the endpoints on this page with the same API key.

Send a request to the hosted MCP server

POST/api/v1/mcp

Auth: API key

Streamable HTTP transport for the Mergestorm MCP server. Send JSON-RPC messages (initialize, tools/list, tools/call) with the API key as a Bearer token. The optional X-Mergestorm-Chat-Id header links tool calls to a Breeze chat. Requests are at most 262,144 bytes and use the read rate budget.

Parameters

NameInTypeDescription
X-Mergestorm-Chat-Idheaderstring

Request body

object

A JSON-RPC 2.0 request or notification.

FieldTypeDescription
jsonrpcrequired"2.0"
idstring | integer
methodrequiredstring
paramsobject

Responses

200 The JSON-RPC response, as JSON or as a server-sent event stream.

No JSON body.

  • 401 413 Request or server error.
  • 429 Per-key/IP window or account in-flight cap reached.

Example

curl -X POST 'https://api.mergestorm.ai/api/v1/mcp' \
  -H "Authorization: Bearer $MERGESTORM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "method": "<method>"
}'

Schemas

Named objects that endpoints send and return. Field types above link here.

ApiKey

ApiKey

FieldTypeDescription
idrequiredstring (uuid)
namerequiredstring
key_prefixrequiredstring
created_atrequiredstring (date-time)
last_used_atrequiredstring (date-time) | null
revokedrequiredboolean

Credits

Credits

FieldTypeDescription
standardrequiredintegermin 0

EngineAutoEnqueueSettle

EngineAutoEnqueueSettle

FieldTypeDescription
actionrequired"ready" | "promote" | "mergeability"
prNumberrequirednumber
headSharequiredstring
startedAtrequiredstring
windowSecondsnumber

EngineAutoLandWait

EngineAutoLandWait

FieldTypeDescription
reasonrequiredstring
prNumberrequirednull | number
headSharequirednull | string
sincerequiredstring
attemptsrequirednull | number
detailrequirednull | string

EngineEnqueueMergeQueueEntryResult

EngineEnqueueMergeQueueEntryResult

FieldTypeDescription
entryrequiredEngineMergeQueueEntry
duplicaterequiredboolean

EngineMergeQueueBounceDetail

EngineMergeQueueBounceDetail

FieldTypeDescription
kindrequired"ci_failure" | "ci_timeout" | "head_moved" | "seam_findings" | "restack_conflict" | "pr_draft" | "must_consolidate" | "merge_failed" | "gh_error"
prNumbernumber
headShastring
failingCheckstring
conflictBranchstring
conflictDetailstring
conflictPathsarray of string
baseBranchstring
baseShastring
messagestring
warningstring
batchobject
batch.idrequiredstring
batch.withPrNumbersrequiredarray of number

EngineMergeQueueEntry

EngineMergeQueueEntry

FieldTypeDescription
idrequiredstring
userIdrequiredstring
stackIdrequiredstring
ownerrequiredstring
reporequiredstring
staterequired"cancelled" | "landed" | "bounced" | "queued" | "running" | "waiting"
waitReasonrequirednull | string
bounceReasonrequirednull | string
bounceDetailrequirednull | EngineMergeQueueBounceDetail
enqueuedByrequired"human" | "agent"
enqueuedViarequired"dashboard" | "cli" | "chat" | "api" | "mcp"
enqueuedAtrequiredstring
attemptsrequirednumber
healCountrequirednumber
claimedAtrequirednull | string
heartbeatAtrequirednull | string
claimedByrequirednull | string
landedPrNumbersrequiredarray of number
verifyHeadSharequirednull | string
verifyBaseSharequirednull | string
floorHeadSharequirednull | string
batchIdnull | string
batchPositionnull | number
batchStepTreeShanull | string
cancelRequestedAtnull | string
finishedAtrequirednull | string

EngineRestackConflict

EngineRestackConflict

FieldTypeDescription
kindrequired"rebase_conflict" | "checkout_failed" | "head_unresolved" | "push_failed" | "retarget_failed"
detailrequiredstring
headSharequiredstring
attemptedAtrequiredstring
attemptsrequirednumber
backupRefrequirednull | string
fromobject
from.branchrequiredstring
from.oldSharequiredstring
droppedMergeCommitboolean
branchrequiredstring
pathsrequiredarray of string
staterequired"needs_restack" | "conflict"

EngineRestackedLayer

EngineRestackedLayer

FieldTypeDescription
branchrequiredstring
fromrequiredstring
torequiredstring

EngineRestackOutcome

EngineRestackOutcome

FieldTypeDescription
restackedrequiredarray of EngineRestackedLayer
skippedrequiredarray of EngineSkippedLayer
conflictEngineRestackConflict

EngineSkippedLayer

EngineSkippedLayer

FieldTypeDescription
branchrequiredstring
reasonrequired"already_current" | "branch_gone"

EngineStackLayer

EngineStackLayer

FieldTypeDescription
branchrequiredstring
parentBranchrequirednull | string
prNumberrequirednumber
positionrequirednumber

EngineStackRecord

EngineStackRecord

FieldTypeDescription
idrequiredstring
userIdrequiredstring
ownerrequiredstring
reporequiredstring
trunkBranchrequiredstring
landTargetrequiredstring
archivedAtnull | string
autoEnqueueWhenReadyboolean
autoEnqueueArmGenerationnumber
autoEnqueueSettlenull | EngineAutoEnqueueSettle
autoLandWaitnull | EngineAutoLandWait
autoReviewOverrideboolean | null
autoPatchOverrideboolean | null
autoResolveConflictsOverrideboolean | null
autoFixCiOverrideboolean | null

Finding

Finding

FieldTypeDescription
finding_keystringStable path + normalized-title selector for thin rechecks.pattern ^F-[0-9a-f]{12}$
pathstring | null
lineinteger | null
severitystring
bodystring

FindingDismissFinding

FindingDismissFinding

FieldTypeDescription
finding_idrequiredstring
finding_keyrequiredstring
pathrequirednull | string
linerequirednull | number
titlerequiredstring

FindingDismissGate

FindingDismissGate

FieldTypeDescription
seamrequirednull | object
seam as Option 1: null
seam as Option 2
seam.staterequiredstring
seam.reviewed_sharequirednull | string
seam.review_idrequirednull | number
seam.clearedrequiredboolean
seam.blockingrequiredboolean
vortexrequirednull | object
vortex as Option 1: null
vortex as Option 2
vortex.clearedrequiredboolean
vortex.reasonrequirednull | string
vortex.messagerequiredstring
other_gatesrequired"unchanged"

Findings

Findings

FieldTypeDescription
inlinearray of Finding
off_diffarray of Finding
offDiffarray of Finding
recheck_resultsarray of ReviewRecheckResult

JobStatus

JobStatus (enum)

Values: "queued" | "in_progress" | "completed" | "failed" | "quota_exceeded"

Memory

Memory

FieldTypeDescription
idrequiredstring (uuid)
scoperequiredMemoryScope (enum)
reporequiredstring | null
kindrequiredMemoryKind (enum)
textrequiredstring
sourcerequired"breeze" | "user" | "github" | null
source_urlrequiredstring | null
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)

MemoryKind

MemoryKind (enum)

Values: "rule" | "style" | "preference" | "fact" | "project"

MemoryMode

MemoryMode (enum)

Values: "off" | "on_request" | "all"

MemoryScope

MemoryScope (enum)

Values: "user" | "repo"

MergeQueueAheadDto

MergeQueueAheadDto

FieldTypeDescription
stackIdrequirednull | string
staterequired"running" | "waiting"
claimedAtrequirednull | string
waitReasonrequirednull | string

MergeQueueBatchCiCheckDto

MergeQueueBatchCiCheckDto

FieldTypeDescription
namerequiredstring
staterequired"cancelled" | "failed" | "queued" | "skipped" | "passed" | "running"
startedAtrequirednull | string
completedAtrequirednull | string

MergeQueueBatchCiDto

MergeQueueBatchCiDto

FieldTypeDescription
sharequiredstring
observedAtrequiredstring
checksrequiredarray of MergeQueueBatchCiCheckDto

MergeQueueBounceBatch

MergeQueueBounceBatch

FieldTypeDescription
idrequiredstring
withPrNumbersrequiredarray of number

MergeQueueBounceDetail

MergeQueueBounceDetail

FieldTypeDescription
kindrequired"ci_failure" | "ci_timeout" | "head_moved" | "seam_findings" | "restack_conflict" | "pr_draft" | "must_consolidate" | "merge_failed" | "gh_error"
prNumbernumber
headShastring
failingCheckstring
conflictBranchstring
conflictDetailstring
conflictPathsarray of string
baseBranchstring
baseShastring
messagestring
warningstring
batchMergeQueueBounceBatch

MergeQueueEntryBatchDto

MergeQueueEntryBatchDto

FieldTypeDescription
idrequiredstring
positionrequirednumber
sizerequirednumber
staterequired"landed" | "bounced" | "verifying" | "landing" | "stopped" | "abandoned"
landedCountrequirednumber
cinull | MergeQueueBatchCiDto

MergeQueueEntryDto

MergeQueueEntryDto

FieldTypeDescription
idrequiredstring
stackIdrequiredstring
ownerrequiredstring
reporequiredstring
staterequired"cancelled" | "landed" | "bounced" | "queued" | "running" | "waiting"
positionrequirednumber
waitReasonrequirednull | string
bounceReasonrequirednull | string
bounceDetailrequirednull | MergeQueueBounceDetail
enqueuedByrequired"human" | "agent"
enqueuedViarequired"dashboard" | "cli" | "chat" | "api" | "mcp"
enqueuedAtrequiredstring
attemptsrequirednumber
landedPrNumbersrequiredarray of number
verifyHeadSharequirednull | string
verifyBaseSharequirednull | string
cancelRequestedAtnull | string
batchnull | MergeQueueEntryBatchDto
cinull | MergeQueueBatchCiDto
finishedAtrequirednull | string
claimedAtnull | string
aheadInReponull | MergeQueueAheadDto
repoQueuenull | MergeQueueRepoQueueDto

MergeQueueRepoQueueDto

MergeQueueRepoQueueDto

FieldTypeDescription
queuedAheadrequirednumber
progressAtrequirednull | string

RepoAutomationSettings

RepoAutomationSettings

Repository-level settings for one connected repository. Each value is a value of its own or null. null means not set: the account setting applies. Precedence is the stack override, then the repository value, then the account setting. auto_land_default seeds new stacks in the repository; it does not change a stack that exists. The merge queue values override merge_queue_batch_enabled, merge_queue_batch_size and merge_queue_lands_alone_paths on the account for this repository; a repository path list replaces the account list as a whole.

FieldTypeDescription
ownerrequiredstring
reporequiredstring
auto_patch_enabledrequiredboolean | null
auto_review_enabledrequiredboolean | null
auto_land_defaultrequiredboolean | null
merge_queue_batch_enabledrequiredboolean | null
merge_queue_batch_sizerequiredinteger | nullmin 2 · max 10
merge_queue_lands_alone_pathsrequiredarray of string | nullmax items 50
merge_queue_overdriveboolean | null

RestackError

RestackError

FieldTypeDescription
kindrequired"rebase_conflict" | "checkout_failed" | "head_unresolved" | "push_failed" | "retarget_failed"
detailrequiredstring
headSharequiredstring
attemptedAtrequiredstring
attemptsrequirednumber
backupRefrequirednull | string
fromobject
from.branchrequiredstring
from.oldSharequiredstring
droppedMergeCommitboolean

ReviewDismissalClear

ReviewDismissalClear

FieldTypeDescription
reviewIdrequirednumber
headSharequiredstring
verdictrequired"approve" | "comment"
openWarningsrequirednumber

ReviewFile

ReviewFile

FieldTypeDescription
pathrequiredstringmin length 1
contentrequiredstringmin length 1

ReviewFindingComment

ReviewFindingComment

FieldTypeDescription
pathrequiredstring
linerequirednumber
bodyrequiredstring
titlestring
severityrequired"error" | "info" | "warning"
category"bug" | "correctness" | "error_handling" | "race_condition" | "security" | "performance" | "style_nit" | "test" | "docs" | "other"
specialist"api" | "seam" | "security" | "performance" | "architecture" | "tests" | "data" | "frontend" | "governance"
githubCommentIdnumber
carriedFromShastring
dismissalKeystring

ReviewFindings

ReviewFindings

FieldTypeDescription
summaryrequiredstring
verdictrequired"approve" | "request_changes" | "comment"
inlinerequiredarray of ReviewFindingComment
offDiffrequiredarray of ReviewFindingComment
patchPolicyReviewPatchPolicy
replaceActionableboolean
dismissalClearReviewDismissalClear

ReviewJobListItem

ReviewJobListItem

FieldTypeDescription
job_idrequiredstring
thread_slugrequiredstring | null
thread_job_numberrequiredinteger | null
statusrequiredJobStatus (enum)
verdictrequiredVerdict (enum)
summaryrequiredstring | null
base_labelrequiredstring | null
head_labelrequiredstring | null
router_moderequiredRouterMode (enum)
specialists_requestedrequiredarray of string
specialists_runrequiredarray of string | null
created_atrequiredstring (date-time)
finished_atrequiredstring (date-time) | null
creditsrequiredCredits
key_prefixrequiredstring | nullPrefix of the API key that submitted the job. Null for cookie-only or pre-attribution jobs.

ReviewPatchPolicy

ReviewPatchPolicy

FieldTypeDescription
moderequired"hold" | "apply"
reasonstring

ReviewRecheck

ReviewRecheck

FieldTypeDescription
requestrequiredobject
resultsrequiredarray of ReviewRecheckResult | null

ReviewRecheckRequest

object

FieldTypeDescription
finding_keysrequiredarray of stringmax items 40
pathsrequiredarray of stringmax items 40
specialistsrequiredarray of Specialist (enum)max items 5

ReviewRecheckResult

ReviewRecheckResult

FieldTypeDescription
finding_keyrequiredstringpattern ^F-[0-9a-f]{12}$
statusrequired"fixed" | "still_open" | "not_in_diff" | "not_reviewed"

RouterMode

RouterMode (enum)

Values: "off" | "standard" | "max" | "manual" | null

Specialist

Specialist (enum)

Values: "security" | "performance" | "architecture" | "tests" | "data" | "api" | "frontend"

StackAgentRun

StackAgentRun

FieldTypeDescription
agentrequired"vortex" | "cyclone"
statusrequiredstring
sharequirednull | string
passnull | number
skipReasonnull | string
startedAtnull | string
finishedAtnull | string
phasenull | string
findingCountnull | number
coveragenull | object
coverage as Option 1: null
coverage as Option 2
coverage.reviewedrequirednumber
coverage.totalrequirednumber
detailnull | string

StackAgentsBusy

StackAgentsBusy

FieldTypeDescription
vortexrequiredboolean
cyclonerequiredboolean
headSharequirednull | string

StackCycloneHandoff

StackCycloneHandoff

FieldTypeDescription
headSharequiredstring
reasonrequiredstring
atrequirednull | string
detailnull | string

StackDisplayRepairResult

StackDisplayRepairResult

FieldTypeDescription
outcomerequired"failed" | "skipped" | "complete" | "partial"
stacksrequiredarray of StackDto
repairedrequiredarray of string
partialrequiredarray of string
skippedrequiredarray of string
truncatedrequiredboolean
errorstring

StackDto

StackDto

FieldTypeDescription
idrequiredstring
ownerrequiredstring
reporequiredstring
trunkBranchrequiredstring
landTargetrequiredstring
archivedAtrequirednull | string
autoEnqueueWhenReadyboolean
autoLandOffnull | object
autoLandOff as Option 1: null
autoLandOff as Option 2
autoLandOff.reasonrequired"user" | "archive" | "watcher" | "cancelled" | "landed" | "bounced"
autoLandOff.entryIdrequirednull | string
autoLandOff.atrequiredstring
autoEnqueueSettlenull | object
autoEnqueueSettle as Option 1: null
autoEnqueueSettle as Option 2
autoEnqueueSettle.actionrequired"ready" | "promote" | "mergeability"
autoEnqueueSettle.prNumberrequirednumber
autoEnqueueSettle.headSharequiredstring
autoEnqueueSettle.startedAtrequiredstring
autoEnqueueSettle.windowSecondsnumber
autoLandWaitnull | object
autoLandWait as Option 1: null
autoLandWait as Option 2
autoLandWait.reasonrequiredstring
autoLandWait.prNumberrequirednull | number
autoLandWait.headSharequirednull | string
autoLandWait.sincerequiredstring
autoLandWait.attemptsrequirednull | number
autoLandWait.detailrequirednull | string
autoReviewOverrideboolean | null
autoPatchOverrideboolean | null
autoResolveConflictsOverrideboolean | null
autoFixCiOverrideboolean | null
keyUserIdstring
cycloneInstallUserIdnull | string
cycloneOwnerMatch"same" | "different" | "none" | "lookup_failed"
cyclonePatchOff"stack_auto_patch_off" | "repo_auto_patch_off" | "repo_setting_unavailable" | "account_auto_patch_off" | "cyclone_not_connected"
vortexReviewOff"stack_auto_review_off" | "repo_auto_review_off" | "account_auto_review_off"
cycloneConflictOff"cyclone_not_connected" | "stack_auto_resolve_off" | "account_auto_resolve_off"
cycloneCiOff"cyclone_not_connected" | "stack_auto_fix_ci_off" | "account_auto_fix_ci_off"
infrastructureInstallUserIdnull | string
infrastructureOwnerMatch"same" | "different" | "none" | "lookup_failed"
layersrequiredarray of StackLayerDto
unitStackUnitDto

StackLayerChecks

StackLayerChecks

FieldTypeDescription
totalrequirednumber
successrequirednumber
pendingrequirednumber
failurerequirednumber
failingNamerequirednull | string
selfHostednumber
namedRunsSeededboolean
cancelledOnlyboolean
namedRunsCompleteHeadShastring
combinedStatusSeededboolean

StackLayerCiFix

StackLayerCiFix

FieldTypeDescription
statusrequired"failed" | "held" | "verified" | "unverified" | "no_changes"
failingCheckrequirednull | string
resultSharequirednull | string
reasonrequirednull | string
atrequiredstring
checkOnResult"pending" | "failed" | "passed" | "did_not_run"

StackLayerConflictResolution

StackLayerConflictResolution

FieldTypeDescription
resolvedAtrequiredstring
baseBranchrequirednull | string
filesrequiredarray of string
headSharequirednull | string
dispatchIdrequirednull | string

StackLayerDto

StackLayerDto

FieldTypeDescription
branchrequiredstring
parentBranchrequirednull | string
prNumberrequirednumber
openedAtrequirednull | string
mergedAtrequirednull | string
closedAtrequirednull | string
additionsrequirednull | number
deletionsrequirednull | number
openAdditionsrequirednull | number
openDeletionsrequirednull | number
positionrequirednumber
staterequired"clean" | "needs_restack" | "restacking" | "conflict" | "merged" | "closed"
titlerequirednull | string
htmlUrlrequirednull | string
ciStatusrequired"none" | "success" | "pending" | "failure" | "neutral" | "unknown"
reviewStatusrequired"none" | "unknown" | "approved" | "changes_requested" | "reviewed" | "failed"
checksrequirednull | StackLayerChecks
vortexStatusrequirednull | "failed" | "queued" | "skipped" | "reviewing" | "seam_pending" | "all_clear" | "findings" | "throttled" | "incomplete"
cycloneStatusrequirednull | "failed" | "patching" | "awaiting_fix" | "held"
agentRunsarray of StackAgentRun
vortexReviewStackVortexReviewView
agentsBusynull | StackAgentsBusy
cycloneHandoffnull | StackCycloneHandoff
cycloneConflictHandoffnull | StackCycloneHandoff
cycloneConflictPendingSincenull | string
cycloneCiHandoffnull | StackCycloneHandoff
cycloneCiPendingSincenull | string
cycloneFindingsTakenAtHeadboolean
conflictDetailrequirednull | string
restackErrornull | RestackError
lastRestackedSharequirednull | string
mergeablerequiredboolean | null
mergeableStaterequirednull | string
headShanull | string
mergeableHeadShanull | string
draftboolean | null
linkedIssuesnull | array of StackLinkedIssue
specialistsRunnull | array of string
specialistRunCountsnull | map of number
coreRunsnull | number
conflictResolutionnull | StackLayerConflictResolution
ciFixnull | StackLayerCiFix

StackLinkedIssue

StackLinkedIssue

FieldTypeDescription
numberrequirednumber
titlerequirednull | string

StackPublicationChange

StackPublicationChange

One of: Option 1

FieldTypeDescription
pathrequiredstring
deletedrequiredtrue

One of: Option 2

FieldTypeDescription
pathrequiredstring
deletedfalse
moderequired"100644" | "100755" | "120000"
sharequiredstringGit blob SHA of the content.
contentrequiredstringThe whole file, base64. A symlink carries its target path.

StackPublicationCommit

StackPublicationCommit

FieldTypeDescription
messagerequiredstring
authorrequiredStackPublicationIdentity
committerrequiredStackPublicationIdentity
treerequiredstringGit tree SHA of this commit. The branch moves only when GitHub builds the same tree.
changesrequiredarray of StackPublicationChangeEvery path that differs from the commit before it. A rename is a deletion and an addition.

StackPublicationHead

StackPublicationHead

FieldTypeDescription
sharequiredstring
treerequiredstring | null

StackPublicationIdentity

StackPublicationIdentity

FieldTypeDescription
namerequiredstring
emailrequiredstring
daterequiredstringISO 8601 with seconds and a UTC offset, for example 2026-10-11T15:03:00-04:00.

StackPublicationStack

StackPublicationStack

FieldTypeDescription
idrequiredstring
autoPatchOverriderequiredboolean | null
autoLandrequiredboolean

StackPullOpened

StackPullOpened

FieldTypeDescription
numberrequiredintegermin 1
urlrequiredstring
createdrequiredboolean
basestring

StackUnitDto

StackUnitDto

FieldTypeDescription
idrequiredstring
uNumberrequirednumber
staterequiredstring
branchrequiredstring
landTargetrequiredstring
membersrequiredarray of StackUnitMemberDto
landPrNumberrequirednull | number
landingBlockReasonrequirednull | string
landPrrequirednull | StackLayerDto

StackUnitMemberDto

StackUnitMemberDto

FieldTypeDescription
prNumberrequirednumber
openedAtrequirednull | string
mergedAtrequirednull | string
closedAtrequirednull | string
additionsrequirednull | number
deletionsrequirednull | number
openAdditionsrequirednull | number
openDeletionsrequirednull | number
branchrequiredstring
positionrequirednumber
seamStaterequiredstring
seamReviewedSharequirednull | string
promotedHeadSharequirednull | string
promotedAtrequiredstring
titlenull | string
linkedIssuesnull | array of StackLinkedIssue
specialistsRunnull | array of string
specialistRunCountsnull | map of number
coreRunsnull | number

StackVortexReviewView

StackVortexReviewView

FieldTypeDescription
statusrequired"none" | "failed" | "queued" | "skipped" | "reviewing" | "done"
skip_reasonrequirednull | string
passrequirednull | number
head_sharequirednull | string
phaserequirednull | string
started_atrequirednull | string
settled_atnull | string
stoppablerequiredboolean
sourcerequired"none" | "pr_reviews" | "github_webhook_jobs" | "lease"

ThreadJob

ThreadJob

FieldTypeDescription
job_idrequiredstring
statusrequiredJobStatus (enum)
summaryrequiredstring | null
verdictrequiredVerdict (enum)
thread_job_numberrequiredinteger | null
created_atrequiredstring (date-time)
finished_atrequiredstring (date-time) | null

ThreadListItem

ThreadListItem

FieldTypeDescription
slugrequiredstring
branchrequiredstring | null
ownerrequiredstring | null
reporequiredstring | null
pr_numberrequiredinteger | null
statusrequiredstring
job_countrequiredinteger
last_verdictrequiredVerdict (enum)
last_activity_atrequiredstring (date-time)

Verdict

Verdict (enum)

Values: "approve" | "comment" | "request_changes" | null