Purchase a policy
Submits purchasePolicyFor from the API’s relayer wallet on behalf of buyer. Pre-flights relayer authorization, the local pause flag, the global pause registry, and the product’s active status before broadcasting. Honours Idempotency-Key for safe retries.
Authorizations
Issued via POST /api/v1/agent/onboard or POST /api/v1/keys/generate. Format: lk_<64-hex>.
Headers
Optional per-agent idempotency key. Repeating a request with the same key returns the cached response.
128Body
32-byte 0x-prefixed hex string (e.g. a productId or txHash).
^0x[0-9a-fA-F]{64}$"0x0000000000000000000000000000000000000000000000000000000000000000"
USDC base units (6 decimals).
^\d+$"1000000"
32-byte 0x-prefixed hex string (e.g. a productId or txHash).
^0x[0-9a-fA-F]{64}$"0x0000000000000000000000000000000000000000000000000000000000000000"
Ethereum 0x-prefixed checksummed or lowercase address.
^0x[a-fA-F0-9]{40}$"0x0000000000000000000000000000000000000000"
Response
Idempotent replay (same Idempotency-Key already processed).
true
32-byte 0x-prefixed hex string (e.g. a productId or txHash).
^0x[0-9a-fA-F]{64}$"0x0000000000000000000000000000000000000000000000000000000000000000"
A non-negative integer encoded as a decimal string (used for token amounts, prices, and other on-chain bigint values).
^\d+$"1000000"
Ethereum 0x-prefixed checksummed or lowercase address.
^0x[a-fA-F0-9]{40}$"0x0000000000000000000000000000000000000000"
32-byte 0x-prefixed hex string (e.g. a productId or txHash).
^0x[0-9a-fA-F]{64}$"0x0000000000000000000000000000000000000000000000000000000000000000"
A non-negative integer encoded as a decimal string (used for token amounts, prices, and other on-chain bigint values).
^\d+$"1000000"
A non-negative integer encoded as a decimal string (used for token amounts, prices, and other on-chain bigint values).
^\d+$"1000000"