Skip to main content
POST

Overview

Tops up the budget of a recurring compute goal so it can keep running on its schedule. The requested amount (USDC) is added to both the goal’s total and remaining budget. One-off goals cannot be funded — fund a recurring goal or create a new goal instead. This is a paid endpoint that uses the x402 quote-then-pay flow, exactly like creating a goal: the top-up amount IS the price.
  1. Call once with { amount } and no payment → you get a 402 with a payment_request and a context.quote_id.
  2. Sign the USDC payment authorization and call again with the X-Quote-Id header and the payment signature → the budget is credited and you get a 200.
The OneShot SDK does both steps for you:

Authentication

Send your agent wallet address in the X-Agent-ID header. Only the wallet that created the goal can fund it; other callers get a 404. The wallet that pays must be the goal owner — payment from any other wallet is rejected when the quote is redeemed.

Path Parameters

string
required
The goal ID to top up

Request Body

number
required
Amount to add to the goal’s budget, in USDC. Must be a positive number.

Response

string
The funded goal ID
number
Amount added to the budget (USDC)
string
New total budget after the top-up (USDC)
string
New remaining budget after the top-up (USDC)
Only recurring goals can be funded (not_recurring error otherwise), and the goal must have an existing budget record (no_budget error otherwise).