Skip to main content
POST
/
token-layer
Execute token-layer action
curl --request POST \
  --url https://api.tokenlayer.network/functions/v1/token-layer \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source": "Mainnet",
  "expiresAfter": 300000,
  "action": {
    "type": "register",
    "method": "web3",
    "message": "TokenLayer register\\naddress: 0xafe140dbfe00606990d913c04efd318701c99d17\\ntimestamp: 1737600000000",
    "signature": "0xaabb..."
  },
  "nonce": 1737600000000,
  "signature": "0x5f2a...",
  "signatureChainId": "0x1"
}
'
{
  "actionType": "register",
  "name": "register",
  "success": true,
  "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "walletAddress": "<string>",
  "method": "web3"
}
See the integration guide for action-by-action examples and flow:

Authorizations

Authorization
string
header
required

JWT token or API key

Body

application/json

Envelope for register action

source
enum<string>
required

Environment indicator included in typed-data payload

Available options:
Mainnet,
Testnet
expiresAfter
integer
required

Expiration window in milliseconds

Required range: x > 0
Example:

300000

action
Register · object
required

Register a new wallet address with Token Layer

nonce
integer

Nonce timestamp in milliseconds. Required for wallet-signature authentication.

Required range: x > 0
Example:

1737600000000

signature
string

Required when using wallet signature auth (Bearer wallet address)

Pattern: ^0x[a-fA-F0-9]{130}$
Example:

"0x5f2a..."

signatureChainId
string

Required when using wallet signature auth. EIP-712 domain chainId in hex.

Pattern: ^0x[0-9a-fA-F]+$
Example:

"0x1"

Response

Successful response

actionType
enum<string>
required
Available options:
register
name
enum<string>
required
Available options:
register
success
enum<boolean>
required
Available options:
true
userId
string<uuid>
required
walletAddress
string
required
Pattern: ^0x[a-fA-F0-9]{40}$
method
enum<string>
required
Available options:
web3