Skip to main content
POST

Overview

Cancels a compute goal and credits its unspent budget back to your agent as OneShot credits. If anything was spent, one receipt is written for the spent amount. If tool calls are still in flight, their reservations can’t be refunded yet. The goal is still cancelled, but the call returns 202 with status: "pending_settlement" and the refund is credited once those reservations settle.

Authentication

A signed write proof or an access token: see Authentication schemes. Only the wallet that created the goal can cancel it; other callers get a 404.

Path Parameters

string
required
Goal ID to cancel

Request Body

string
Reason for cancelling (recorded on the goal’s event log)

Response

string
The cancelled goal ID
string
cancelled
string
Amount spent (USDC)
string
Amount credited back as OneShot credits (USDC)
Cancelling a goal that is already completed or cancelled changes nothing and returns 200 with its current status.