Skip to main content
POST
Reject a pending agent action (and terminate its run)

Authorizations

Authorization
string
header
required

API key or personal access token (NEX-1042). Send as Authorization: Bearer <token>. Token format:

  • nex_live_… — live API key (server-to-server)
  • nex_test_… — sandbox API key
  • nex_pat_… — personal access token (acts as the issuing user)

Authorization is decided by the key's scopes array, not the owning user's RBAC role. See POST /api/api-keys to mint a key.

Headers

NexSpace-Version
string

Pin the request to a dated API version (e.g. 2026-05-10). Applied by app-level middleware to every /api route (server/routes/index.ts → apiVersionMiddleware), which echoes the resolved value back in the NexSpace-Version response header. Omit to get the latest version. Discover the catalog at GET /.well-known/api-versions.

Pattern: ^\d{4}-\d{2}-\d{2}$
Idempotency-Key
string

Replay guard for write requests. Applied by app-level middleware to every /api route (server/routes/index.ts → idempotencyMiddleware), which only acts on POST/PUT/PATCH — GET, DELETE and OPTIONS ignore the header. Re-sending the same key with an identical body within 24 hours replays the original response; the same key with a different body returns 409.

Maximum string length: 255

Path Parameters

approvalId
integer
required

Body

application/json
reason
string
Maximum string length: 2000

Response

Approval resolved

Result of resolving (approving/rejecting) a pending agent action.

outcome
enum<string>
required
Available options:
resolved
approvalId
integer
required
decision
enum<string>
Available options:
approve,
reject
runId
string | null

The headless run this approval belongs to.

runResumed
boolean

True when the owning run was re-driven (all its approvals now terminal).

runRejected
boolean

True when the owning run was terminated as rejected.

execution
object | null

Outcome of executing the deferred tool (approve only).