Skip to content

Reject a pending plan with a reason

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

Marks a pending plan rejected. Idempotent on an already-rejected plan; rejecting an approved plan returns 409. Rate limited (30/min/IP).

id
required
string format: uuid
Media type application/json
object
reason
required
string
>= 1 characters <= 2000 characters

Plan rejected

Media type application/json
object
plan
required
object
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>
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

Resource state conflict

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