Skip to main content
POST
/
intents
Create new intent
curl --request POST \
  --url https://api.chainrails.io/api/v1/intents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sender": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "amount": "1000000",
  "tokenIn": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "source_chain": "ETHEREUM_MAINNET",
  "destination_chain": "STARKNET_MAINNET",
  "recipient": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
  "refund_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "metadata": {
    "orderId": "12345"
  }
}
'
{
  "id": 2,
  "client_id": "e1ee3675-cb26-4a76-8206-a84f86e85862",
  "sender": "0xdA3ECb2E5362295E2b802669dD47127A61d9Ce54",
  "initialAmount": "1000000",
  "fees": "500",
  "totalAmount": "1010500",
  "tokenIn": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
  "tokenOut": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
  "intent_address": "0x4E60e01263E750eD9D087157e19D2480Fd86A900",
  "source_chain": "BASE_TESTNET",
  "destination_chain": "ARBITRUM_TESTNET",
  "recipient": "0xb79541Be080a59fdcE6C0b43219ba56c725eC65e",
  "refund_address": "0xb79541Be080a59fdcE6C0b43219ba56c725eC65e",
  "relayer": "",
  "coordinator": "0x989f47053F188778575113DcF39dB8960Fc450e2",
  "bridger": "0xa1c943058a631D5506eb7d96036eAbF6968e2338",
  "bridgeExtraData": "0x00000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000000300000000000000000000000075faf114eafb1bdbe2f0316df893fd58ce46aa4d",
  "intent_nonce": 4267684716645197,
  "intent_status": "PENDING",
  "tx_hash": null,
  "needs_relay": false,
  "expires_at": "2025-11-11T02:31:23.000Z",
  "metadata": {
    "priority": "normal",
    "description": "Cross-chain USDC transfer"
  },
  "created_at": "2025-11-11T01:31:23.390Z",
  "updated_at": "2025-11-11T01:31:23.390Z"
}

Authorizations

Authorization
string
header
required

Enter your Chainrails API key as a Bearer token

Body

application/json

Intent creation parameters

amount
string
required

Amount to transfer in smallest unit (e.g., wei for ETH).

Example:

"1000000000000000000"

tokenIn
string
required

Token address on the source chain

Example:

"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"

source_chain
enum<string>
required

Source blockchain network

Available options:
ARBITRUM_MAINNET,
ARBITRUM_TESTNET,
AVALANCHE_MAINNET,
AVALANCHE_TESTNET,
BASE_MAINNET,
BASE_TESTNET,
STARKNET_MAINNET,
STARKNET_TESTNET,
BSC_MAINNET,
ETHEREUM_MAINNET,
ETHEREUM_TESTNET
Example:

"ETHEREUM_MAINNET"

destination_chain
enum<string>
required

Destination blockchain network

Available options:
ARBITRUM_MAINNET,
ARBITRUM_TESTNET,
AVALANCHE_MAINNET,
AVALANCHE_TESTNET,
BASE_MAINNET,
BASE_TESTNET,
STARKNET_MAINNET,
STARKNET_TESTNET,
BSC_MAINNET,
ETHEREUM_MAINNET,
ETHEREUM_TESTNET
Example:

"STARKNET_MAINNET"

recipient
string
required

Recipient wallet address on the destination chain

Example:

"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"

sender
string
default:Default address from config

Sender wallet address on the source chain

Example:

"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"

refund_address
string
default:Defaults to sender address

Refund address on the source chain if intent fails

Example:

"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"

metadata
object

Additional metadata for the intent

Example:
{ "orderId": "12345", "userId": "user-abc" }

Response

Intent successfully created

id
number
Example:

2

client_id
string
Example:

"e1ee3675-cb26-4a76-8206-a84f86e85862"

sender
string
Example:

"0xdA3ECb2E5362295E2b802669dD47127A61d9Ce54"

initialAmount
string
Example:

"1000000"

fees
string
Example:

"500"

totalAmount
string
Example:

"1010500"

tokenIn
string
Example:

"0x036CbD53842c5426634e7929541eC2318f3dCF7e"

tokenOut
string
Example:

"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"

intent_address
string
Example:

"0x4E60e01263E750eD9D087157e19D2480Fd86A900"

source_chain
string
Example:

"BASE_TESTNET"

destination_chain
string
Example:

"ARBITRUM_TESTNET"

recipient
string
Example:

"0xb79541Be080a59fdcE6C0b43219ba56c725eC65e"

refund_address
string
Example:

"0xb79541Be080a59fdcE6C0b43219ba56c725eC65e"

relayer
string
Example:

""

coordinator
string
Example:

"0x989f47053F188778575113DcF39dB8960Fc450e2"

bridger
string
Example:

"0xa1c943058a631D5506eb7d96036eAbF6968e2338"

bridgeExtraData
string
Example:

"0x00000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000000300000000000000000000000075faf114eafb1bdbe2f0316df893fd58ce46aa4d"

intent_nonce
number
Example:

4267684716645197

intent_status
enum<string>
Available options:
PENDING,
PROCESSING,
COMPLETED,
FAILED
Example:

"PENDING"

tx_hash
string | null
Example:

null

needs_relay
boolean
Example:

false

expires_at
string<date-time>
Example:

"2025-11-11T02:31:23.000Z"

metadata
object
Example:
{
"priority": "normal",
"description": "Cross-chain USDC transfer"
}
created_at
string<date-time>
Example:

"2025-11-11T01:31:23.390Z"

updated_at
string<date-time>
Example:

"2025-11-11T01:31:23.390Z"