Create / revoke / spend a mandate

Three actions selected by the 'action' field in the body:

  • (no action): create a new mandate
  • action=revoke: revoke a mandate by id
  • action=spend: record a spend against a mandate (called internally by /api/agent-purchase after a successful on-chain payment)
post/api/mandates

Request

  • Base URL: https://marketnow.site
  • URL: https://marketnow.site/api/mandates
  • Auth: none declared

Request body

action'revoke' | 'spend'
ownerstring

wallet address (create only)

agentIdstring

create only

agentNamestring

create only, optional

spendingLimitUsdnumber

create only

perPurchaseCapUsdnumber

create only, optional

categoriesstring[]

create only, optional (defaults to ['*'])

expiresAtstring date-time

create only, optional

signaturestring

EIP-191 signature over mandate hash, optional but recommended

idstring

required for revoke / spend

amountnumber

required for spend

txHashstring

optional for spend, on-chain tx reference

Response

Action completed

Changes

No recorded changes to this operation across all 1 revision of this API.