Routes - old
The Routes API allows partners to configure how incoming funds should be routed, swapped, or sent out for each user. These configurations support cross-chain and token-specific routing logic.
Parameter Reference
userId
string
Yes
ID of the user associated with the route
id
string
Required for update/delete
Route identifier
name
string
Optional
Friendly name for the route
incomingWallets
string[]
Optional
Specific wallets allowed to send to this route
incomingNetworks
string[]
Yes
Incoming chain identifiers (e.g., ETH, POL)
incomingTokens
string[]
Yes
Supported tokens for the route (e.g., USDC, ETH)
swapNetwork
string
Optional
Chain where token should be swapped
swapToken
string
Optional
Token to receive after swap
outgoingWallet
string
Yes
Final destination address for routed funds
routeId
string
Optional
Used in conflict checks when editing
1. Create Route
URL: POST /routes/create
Authentication: Required
Request Body
{
"userId": "user-id",
"name": "Default Route",
"incomingWallets": ["0x123...", "0x456..."],
"incomingNetworks": ["ETH", "POL"],
"incomingTokens": ["ETH", "USDC"],
"swapNetwork": "POL",
"swapToken": "USDC",
"outgoingWallet": "0x789..."
}Success Response — 201 Created
Error Responses
400 Bad Request
Missing or invalid parameters
409 Conflict
Duplicate configuration
500 Internal Server Error
Unexpected server failure
Example:
2. Update Route
URL: PUT /routes/edit-route
Authentication: Required
Request Body
Success Response — 200 OK
Error Responses
400 Bad Request
Missing required fields
403 Forbidden
Unauthorized to update the route
404 Not Found
Route does not exist
409 Conflict
Route config clashes with existing one
500 Internal Server Error
Server-side issue
3. Delete Route
URL: DELETE /routes/delete-route
Authentication: Required
Request Body
Success Response — 200 OK
Error Responses
400 Bad Request
Missing route ID
403 Forbidden
No permission to delete
404 Not Found
Route not found
500 Internal Server Error
Unexpected error
4. Get Routes
URL: GET /routes/get-routes
Authentication: Required
Query Parameters
userId(string, required)
Success Response — 200 OK
Error Responses
400 Bad Request
Missing userId
500 Internal Server Error
Server error
5. Check Route Conflicts
URL: POST /routes/route-exists
Authentication: Required
Request Body
Success Response — No Conflict (200 OK)
Success Response — Conflict Found (200 OK)
Error Responses
400 Bad Request
Missing or invalid request
500 Internal Server Error
Unexpected server failure
Last updated
Was this helpful?

