Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Device-Authorization
string
required

Compact ES256 JWS that the Digital Asset Accounts SDK creates on the end user's device. It signs this request's method, path, and exact body bytes (an empty body for GET requests) with the authorization key the end user registered. The SDK creates a new value for every new request.

A missing value returns 400 (error code 420031). A value that isn't a well-formed compact JWS returns 401 (error code 420031).

The SDK gives each value an expiry at most 5 minutes after it signs it. Unless the operation says otherwise, Circle rejects a value whose expiry has passed or whose signing time is in the future, allowing 60 seconds of clock difference either way, with 400 (error code 420031). A device clock that's off by more than 60 seconds causes the same error. Retry within the value's lifetime, or let the SDK sign the request again.

Your backend relay must forward this header, and the request body, exactly as the SDK sent them. Don't parse, reformat, or re-serialize the body. If the bytes change, Circle rejects the request.

Compact ES256 JWS created by the Digital Asset Accounts SDK on the end user's device.

Required string length: 64 - 8192
Example:

"eyJhbGciOiJFUzI1NiJ9.e30.AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0-Pw"

Body

application/json

A contract call from a non-custodial account. Describe the call either with abiFunctionSignature and abiParameters, or with callData. Circle rejects unknown fields, duplicate keys, and null values. The body can be at most 64 KiB.

idempotencyKey
string<uuid>
required

Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests.

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
Example:

"ba943ff1-ca16-49b2-ba55-1057e70ca5c7"

accountId
string<uuid>
required

ID of the non-custodial account that makes the call. The account must be active and belong to your entity.

Example:

"22222222-2222-4222-8222-222222222222"

blockchain
enum<string>
required

Home blockchain of the account; must match it. Send CBASE for Base; responses return BASE. The environment, not this value, decides mainnet or testnet. Not every blockchain is available in every environment.

Available options:
ETH,
ARB,
CBASE,
OP,
UNI,
ARC
Example:

"ETH"

contractAddress
string
required

Address of the contract to call. Circle checks the format only, not that the contract implements the function.

Required string length: 42
Pattern: ^0x[0-9a-fA-F]{40}$
Example:

"0x1111111111111111111111111111111111111111"

callData
string
required

Encoded call data: 0x followed by an even number of hexadecimal digits, between 1 and 16,384 bytes. Can't be combined with abiFunctionSignature or abiParameters.

Required string length: 4 - 32770
Pattern: ^0x([0-9a-fA-F]{2})*$
Example:

"0xd0e30db0"

abiFunctionSignature
string

Canonical signature of the function, such as approve(address,uint256), with no spaces or parameter names. Supported parameter types are address, bool, string, bytes, bytes1 through bytes32, and int8 through int256 and uint8 through uint256 in steps of 8. Supported array types are uint256[], uint256[2], uint256[][], uint256[][2], address[], bool[2], bytes32[], string[], and bytes[]. For other types, such as tuples, uint, or other arrays, use callData.

Required string length: 1 - 1000
Pattern: ^[A-Za-z_$][A-Za-z0-9_$]*\((?:(?:(?:address|bool|string|bytes(?:[1-9]|[12][0-9]|3[0-2])?|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256))|uint256\[\]|uint256\[2\]|uint256\[\]\[\]|uint256\[\]\[2\]|address\[\]|bool\[2\]|bytes32\[\]|string\[\]|bytes\[\])(?:,(?:(?:address|bool|string|bytes(?:[1-9]|[12][0-9]|3[0-2])?|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256))|uint256\[\]|uint256\[2\]|uint256\[\]\[\]|uint256\[\]\[2\]|address\[\]|bool\[2\]|bytes32\[\]|string\[\]|bytes\[\]))*)?\)$
Example:

"approve(address,uint256)"

abiParameters
(string | integer | boolean | any[])[]

Arguments in the order of abiFunctionSignature. Send [] for a function without arguments. Each value is a string, a boolean, an integer, or a nested array. Send integers outside the safe JSON range (more than 2^53 - 1 in magnitude) as decimal strings. Arrays can nest up to eight levels, counting this array, and the tree can hold at most 1,024 values below this array.

Maximum array length: 1024

A string, a boolean, an integer, or a nested array. Circle rejects objects, null, numbers with a fractional part or an exponent (including 1.0 and 1e3), and integers outside the safe JSON range. A numeric string stays a string.

Example:
amount
string

Native value to send with the call, in whole units of the blockchain's native asset (ETH, or USDC on Arc). Omit it to send none; don't send "0" unless the end user signed it. This is separate from the network fee and from token amounts in abiParameters.

Maximum string length: 39
Pattern: ^(0|[1-9][0-9]{0,19})(\.[0-9]{1,18})?$
Example:

"0.1"

Response

Retry of an accepted request. Returns the execution in its current state.

data
object
required

A contract execution: the call that was requested, its status, and, once known, the blockchain transaction hash and network fee. Transaction lists and webhooks carry a shorter summary without callData or abiParameters.