Skip to content

Set or clear a plan's spend ceiling (operator-only)

PATCH
/agents/plans/{id}
curl --request PATCH \
--url https://example.com/api/agents/plans/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "max_cost_usd": 1 }'

Superadmin-only budget editor. The pump supervisor pauses every in-flight lane once the plan’s priced usage reaches max_cost_usd.

id
required
string format: uuid
Media type application/json
object
max_cost_usd
required
number | null
<= 100000

Updated plan

Media type application/json
object
plan
required
object
max_cost_usd
number | null
planner_source
string
Allowed values: llm deterministic
planner_rationale
string | null
id
required
string format: uuid
project_id
required
string format: uuid
billing_account_id
required
string format: uuid
milestone_id
required
string format: uuid
created_by_user_id
string | null format: uuid
title
required
string
status
required
string
Allowed values: pending approved rejected
source_ticket_ids
required
Array<string>
lanes
required
Array<object>
object
laneKey
required
string
title
required
string
role
required
string
Allowed values: frontend backend test design devops qa other
ticketIds
required
Array<string>
brief
string
risk
string
Allowed values: low medium high
suggestedFiles
Array<string>
dependsOn
Array<string>
rejection_reason
string | null
approved_at
string | null format: date-time
rejected_at
string | null format: date-time
created_at
required
string format: date-time
updated_at
required
string format: date-time

Invalid request

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number

Not authenticated

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number
reconnect

True if re-linking GitHub may fix the issue

boolean

Forbidden

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number

Not found

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number

Rate limited

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number
retryAfter

Seconds until the rate limit resets

number
Retry-After
string

Server error

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number