Skip to main content
POST
Build a signable delegate-authorization intent (gasless onboarding)

Body

application/json
trader
string
required

The trader granting access; must sign this intent themselves.

delegate
string
required

Address being authorized to trade on the trader's behalf (e.g. an agent/bot key).

expirySeconds
integer
required

Delegation expiry as a unix timestamp in SECONDS (not milliseconds). Must be in the future.

Required range: x >= 0
nonce

Replay-protection nonce (uint256; unordered Permit2-style bitmap, not sequential). A random one is generated when omitted — only pass a value to pre-reserve or deterministically retry an intent. Check availability via GET /v2/nonce.

deadlineMs

Intent expiry as a unix timestamp in MILLISECONDS (not seconds). Defaults to now + the service value shown in /v2/meta → defaults.intentDeadlineMs.

Response

Success envelope: ok is true and data carries the payload documented below.

ok
enum<boolean>
required

Always true on success.

Available options:
true
data
object
required

A ready-to-sign EIP-712 payload. Sign {domain, types, primaryType, message} with signTypedData (trader or a registered delegate, per signerRule) and hand the 65-byte r||s||v signature to the Avantis service that executes this intent kind.