Skip to main content
POST
Prepare RAMS grant mandate
Maps to ramsGrantMandate. The principal must already be eligible with the selected ComplianceProvider.

Authorization modes

Key fields

agent, principal, validUntil, identityRef, asset, both value caps, and at least one actions entry are required. validFrom defaults to immediate. Values are raw base units; caps accept max/unlimited. Actions accept bytes32 values or 4-byte selectors.

Response

Returns txId, unsigned transactions, and info with the contract, authorization mode, and EIP-712 nonce when applicable. Preparing is free; x402 is charged at send.

Authorizations

X-Payment
string
header
required

Base64-encoded x402 payment payload. Supported for x402-eligible agentic methods on /x402/... facades, /prepare-transactions, and eligible /send-transactions retries.

Body

application/json
chainId
string
default:11155111
required

Target operation chain ID. RAMS is available on Ethereum Sepolia (11155111) only at launch. Decimal and 0x hex values are accepted.

Examples:

"11155111"

"0xaa36a7"

agent
string
required

Agent wallet receiving the mandate.

Pattern: ^0x[a-fA-F0-9]{40}$
principal
string
required

Principal delegating authority. Direct mode: must equal signerAddress.

Pattern: ^0x[a-fA-F0-9]{40}$
validUntil
required

Mandate expiry. Must be greater than now and greater than validFrom. Unix timestamp in seconds (uint48).

identityRef
string
required

Compliance identity reference (bytes32, 0x + 64 hex). Must match the principal's record on the compliance provider.

Pattern: ^0x[a-fA-F0-9]{64}$
asset
string
required

Asset (token) the mandate is scoped to.

Pattern: ^0x[a-fA-F0-9]{40}$
maxTransactionValue
required

Per-transaction value cap. Alias "max" / "unlimited" (case-insensitive) = 2^256-1 (no cap). Raw base units — no decimals scaling is applied. Decimal string (canonical), 0x hex string, or number accepted.

maxCumulativeValue
required

Cumulative value cap over the mandate lifetime. Alias "max" / "unlimited" = 2^256-1 (no cap). Raw base units — no decimals scaling is applied. Decimal string (canonical), 0x hex string, or number accepted.

actions
string[]
required

Allowed actions. Each item is a bytes32 action or a 4-byte function selector, e.g. 0x23b872dd for transferFrom.

Minimum array length: 1

bytes32 action (0x + 64 hex) or 4-byte selector (0x + 8 hex). Selectors are normalized by right-padding to 32 bytes (left-aligned, Solidity bytes32(selector)).

signerAddress
string

Required for direct/client-signed mode. Omit for brickken-relayed execution; Brickken supplies its operation signer.

Pattern: ^0x[a-fA-F0-9]{40}$
validFrom

Mandate start time. Defaults to 0 (immediately valid). Unix timestamp in seconds (uint48).

complianceProvider
string

Compliance provider contract chosen by the principal. Must be non-zero. Defaults to the chain's configured RAMS ComplianceProvider address.

Pattern: ^0x[a-fA-F0-9]{40}$
metadata
string

Optional opaque metadata (bytes32). Defaults to the zero value.

Pattern: ^0x[a-fA-F0-9]{64}$
signature
string

Optional EIP-712 signature from the principal (never the operator). At least 65 bytes for EOAs (r||s||v); longer payloads are allowed for EIP-1271 contract wallets. Omit for direct mode (the transaction sender authorizes on-chain). Obtain the payload to sign from GET /rams/typed-data/{operation}.

Pattern: ^0x([a-fA-F0-9]{2})*$
deadline

Unix-seconds signature deadline (uint256). Required when signature is provided and must be greater than now — it must equal the deadline that was signed. Ignored (encoded as 0) in direct mode.

executionMode
enum<string>

Optional. Only valid together with signature + deadline: Brickken's relayer becomes the transaction sender and the on-chain authorization rides on the principal's EIP-712 signature. Omit for client-signed execution (default on all /x402/rams facades).

Available options:
brickken-relayed
agentMandateAddress
string

Optional AgentMandate contract override; defaults to the chain's configured RAMS AgentMandate address.

Pattern: ^0x[a-fA-F0-9]{40}$
gasLimit

Optional explicit gas limit.

nonce
number

Optional explicit transaction nonce when managing nonces manually.

ownerEmail
string<email>

Optional owner attribution email.

email
string<email>

Alias for ownerEmail where supported.

Response

Prepared unsigned transaction payload.

data
object