Aller au contenu
agentsub
Esc
↑↓naviguer↵ouvrir⌘Japerçu

Release a hold

Requires merchant scope redemptions:release. Returns the released funds to the agent.

POST/v1/redemptions/{id}/release
Authorization
AuthorizationBearer token · headerrequired

Scoped merchant API key (asm_...) issued via POST /v1/merchants/{id}/api-keys. Path/scope-restricted; cannot access human or agent routes.

Path parameters
idstringrequired

Hold id (jti of the voucher)

Header parameters
Idempotency-Keystringrequired

Reuse for the same operation and payload; payload changes conflict

min length 1 · max length 255
Request body
requiredapplication/json
object
Responses
200

Release record

idstring
agentIdstring
acceptorIdstring
offerIdstring
categorystring
amountUcMicrocredits

Integer microcredits as a decimal string. 1 credit = 1,000,000 microcredits = $0.01 USD.

matches ^[0-9]+$
statestring
Allowed:heldcapturedreleasedexpired
expiresAtinteger
createdAtinteger
capturedUcMicrocredits

Integer microcredits as a decimal string. 1 credit = 1,000,000 microcredits = $0.01 USD.

matches ^[0-9]+$
allocationsobject[]
Show properties
Array of object
lotIdstring
amountUcMicrocredits

Integer microcredits as a decimal string. 1 credit = 1,000,000 microcredits = $0.01 USD.

matches ^[0-9]+$
400

invalid_input problem

typestringrequired
titlestringrequired
statusintegerrequired
codestringrequired
401

unauthorized problem; live 401s advertise WWW-Authenticate: Bearer resource_metadata=...

typestringrequired
titlestringrequired
statusintegerrequired
codestringrequired
403

Identity, ownership, scope or policy denied (human_required, owner_claim_required, scope_required, FROZEN, CAP_EXCEEDED, SCOPE_FORBIDDEN)

typestringrequired
titlestringrequired
statusintegerrequired
codestringrequired
404

not_found problem

typestringrequired
titlestringrequired
statusintegerrequired
codestringrequired
503

Runtime or provider configuration unavailable (runtime_configuration_required, signing_configuration_required, runtime_unavailable, workspace_unavailable, provider_configuration_required)

typestringrequired
titlestringrequired
statusintegerrequired
codestringrequired
Request
curl -X POST 'https://api.agentsub.dev/v1/redemptions/string/release' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Idempotency-Key: string' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{}'
Response
{
  "id": "string",
  "agentId": "string",
  "acceptorId": "string",
  "offerId": "string",
  "category": "string",
  "amountUc": "string",
  "state": "held",
  "expiresAt": 0,
  "createdAt": 0,
  "capturedUc": "string",
  "allocations": [
    {
      "lotId": "string",
      "amountUc": "string"
    }
  ]
}