curl --request POST \
--url https://app.dynamicauth.com/api/v0/sdk/{environmentId}/flow/{flowId}/source \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fromAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"fromChainId": "An example name",
"refundAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834"
}
'import requests
url = "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/flow/{flowId}/source"
payload = {
"fromAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"fromChainId": "An example name",
"refundAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fromAddress: '0xbF394748301603f18d953C90F0b087CBEC0E1834',
fromChainId: 'An example name',
refundAddress: '0xbF394748301603f18d953C90F0b087CBEC0E1834'
})
};
fetch('https://app.dynamicauth.com/api/v0/sdk/{environmentId}/flow/{flowId}/source', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/flow/{flowId}/source",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fromAddress' => '0xbF394748301603f18d953C90F0b087CBEC0E1834',
'fromChainId' => 'An example name',
'refundAddress' => '0xbF394748301603f18d953C90F0b087CBEC0E1834'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/flow/{flowId}/source"
payload := strings.NewReader("{\n \"fromAddress\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"fromChainId\": \"An example name\",\n \"refundAddress\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dynamicauth.com/api/v0/sdk/{environmentId}/flow/{flowId}/source")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fromAddress\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"fromChainId\": \"An example name\",\n \"refundAddress\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dynamicauth.com/api/v0/sdk/{environmentId}/flow/{flowId}/source")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fromAddress\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"fromChainId\": \"An example name\",\n \"refundAddress\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\"\n}"
response = http.request(request)
puts response.read_body{
"sessionExpiresAt": "2023-11-07T05:31:56Z",
"sessionToken": "dft_A1B2C3...",
"flow": {
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"mode": "payment",
"amount": "<string>",
"currency": "An example name",
"executionState": "initiated",
"settlementState": "none",
"riskState": "unknown",
"quoteVersion": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"amountUsd": "<string>",
"currencyTokenInfo": {
"symbol": "<string>",
"decimals": 123,
"name": "<string>",
"logoURI": "<string>"
},
"memo": {},
"userId": "95b11417-f18f-457f-8804-68e361f9164f",
"sourceType": "wallet",
"fromAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"fromChainId": "An example name",
"fromChainName": "ETH",
"fromToken": "An example name",
"toAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"toChainId": "An example name",
"toChainName": "ETH",
"toToken": "An example name",
"quote": {
"version": 123,
"fromAmount": "<string>",
"toAmount": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"fees": {
"totalFeeUsd": "<string>",
"gasEstimate": {
"usdValue": "<string>",
"nativeValue": "<string>",
"nativeSymbol": "<string>"
}
},
"estimatedTimeSec": 123,
"signingPayload": {
"chainName": "ETH",
"chainId": "<string>",
"evmTransaction": {
"to": "<string>",
"data": "<string>",
"value": "<string>",
"gasLimit": "<string>",
"gasPrice": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"nonce": 123
},
"evmApproval": {
"tokenAddress": "<string>",
"spenderAddress": "<string>",
"amount": "<string>"
},
"serializedTransaction": "<string>",
"psbt": "<string>",
"tronTransaction": {
"rawDataHex": "<string>",
"to": "<string>",
"value": "<string>"
}
},
"fromChainName": "ETH",
"fromChainId": "An example name",
"fromToken": "An example name",
"toChainName": "ETH",
"toChainId": "An example name",
"toToken": "An example name",
"fromTokenInfo": {
"symbol": "<string>",
"decimals": 123,
"name": "<string>",
"logoURI": "<string>"
},
"toTokenInfo": {
"symbol": "<string>",
"decimals": 123,
"name": "<string>",
"logoURI": "<string>"
}
},
"txHash": "<string>",
"settlementTxHash": "<string>",
"broadcastedAt": "2023-11-07T05:31:56Z",
"sourceConfirmedAt": "2023-11-07T05:31:56Z",
"confirmations": 123,
"settlement": {
"toChainId": "An example name",
"toToken": "An example name",
"toAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"completedAt": "2023-11-07T05:31:56Z",
"amount": "<string>",
"amountUsd": "<string>",
"input": {
"amount": "<string>",
"amountUsd": "<string>",
"tokenInfo": {
"symbol": "<string>",
"decimals": 123,
"name": "<string>",
"logoURI": "<string>"
}
},
"feeUsd": "<string>",
"toTokenInfo": {
"symbol": "<string>",
"decimals": 123,
"name": "<string>",
"logoURI": "<string>"
}
},
"completedAt": "2023-11-07T05:31:56Z",
"failure": {
"code": "An example name",
"message": "<string>",
"category": "An example name",
"stage": "An example name",
"retryable": true,
"details": {}
},
"expiresAt": "2023-11-07T05:31:56Z",
"depositAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"exchangeSource": {
"exchangeId": "95b11417-f18f-457f-8804-68e361f9164f",
"metadata": {}
},
"pegStablecoins": true,
"disableSwaps": true,
"uiConfig": {
"returnUrl": "<string>",
"termsOfServicesUrl": "https://website-sample.com",
"merchantName": "An example name",
"merchantLogoUrl": "https://website-sample.com/logo.png",
"externalPaymentId": "An example name",
"enabledPaymentMethods": [
"wallet"
]
},
"settlementConfig": {
"strategy": "cheapest",
"settlements": [
{
"chainName": "ETH",
"tokenAddress": "An example name",
"chainId": "An example name",
"symbol": "An example name",
"tokenDecimals": 18,
"isNative": true
}
]
},
"destinationConfig": {
"destinations": [
{
"chainName": "ETH",
"type": "address",
"identifier": "An example name"
}
]
}
}
}{
"error": "<string>",
"code": "exchange_currency_unsupported"
}{
"error": "Access Forbidden",
"code": "sanctions_blocked"
}{
"error": "Not Found",
"code": "not_found"
}{
"error": "Flow cannot be cancelled from state 'source_attached'",
"code": "flow_invalid_transition"
}{
"error": "Resources already exists for this Object",
"code": "email_cannot_be_null",
"payload": {
"email": "joe@email.com",
"loginProvider": "emailOnly",
"embeddedWalletName": "<string>",
"embeddedSocialSigninProvider": "emailOnly",
"mergeConflicts": {
"fromUser": {
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"projectEnvironmentId": "95b11417-f18f-457f-8804-68e361f9164f",
"verifiedCredentials": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f-zerodev",
"format": "blockchain",
"signInEnabled": true,
"address": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"chain": "<string>",
"refId": "95b11417-f18f-457f-8804-68e361f9164f",
"signerRefId": "95b11417-f18f-457f-8804-68e361f9164f",
"email": "jsmith@example.com",
"name_service": {
"avatar": "<string>",
"name": "<string>"
},
"public_identifier": "<string>",
"wallet_name": "<string>",
"wallet_provider": "browserExtension",
"wallet_properties": {
"turnkeySubOrganizationId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyPrivateKeyId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyHDWalletId": "95b11417-f18f-457f-8804-68e361f9164f",
"isAuthenticatorAttached": true,
"turnkeyUserId": "95b11417-f18f-457f-8804-68e361f9164f",
"isSessionKeyCompatible": true,
"version": "V1",
"ecdsaProviderType": "zerodev_signer_to_ecdsa",
"entryPointVersion": "v6",
"kernelVersion": "v2_4"
},
"business_account_properties": {
"businessAccountId": "95b11417-f18f-457f-8804-68e361f9164f",
"businessAccountCreatedAt": "2023-11-07T05:31:56Z",
"businessAccountSignerId": "95b11417-f18f-457f-8804-68e361f9164f",
"businessAccountSignerType": "endUser",
"businessAccountMemberRole": "cfo",
"businessAccountName": "<string>",
"businessAccountExternalRef": "<string>",
"businessAccountSignerAddedByUserId": "<string>"
},
"oauth_provider": "emailOnly",
"oauth_username": "<string>",
"oauth_display_name": "<string>",
"oauth_account_id": "<string>",
"phoneNumber": "9171113333",
"phoneCountryCode": "1",
"isoCountryCode": "US",
"oauth_account_photos": [
"<string>"
],
"oauth_emails": [
"<string>"
],
"oauth_metadata": {},
"previous_users": [
"95b11417-f18f-457f-8804-68e361f9164f"
],
"embedded_wallet_id": "<string>",
"wallet_additional_addresses": [
{
"address": "<string>",
"type": "ordinals",
"publicKey": "<string>",
"network": "<string>"
}
],
"lastSelectedAt": "2023-11-07T05:31:56Z",
"verifiedAt": "2023-11-07T05:31:56Z"
}
],
"lastVerifiedCredentialId": "95b11417-f18f-457f-8804-68e361f9164f-zerodev",
"sessionId": "95b11417-f18f-457f-8804-68e361f9164f",
"alias": "An example name",
"country": "US",
"email": "jsmith@example.com",
"firstName": "An example name",
"jobTitle": "An example name",
"lastName": "An example name",
"phoneNumber": "<string>",
"policiesConsent": true,
"tShirtSize": "An example name",
"team": "An example name",
"username": "An example name",
"firstVisit": "2023-11-07T05:31:56Z",
"lastVisit": "2023-11-07T05:31:56Z",
"newUser": true,
"metadata": {},
"mfaBackupCodeAcknowledgement": "pending",
"btcWallet": "<string>",
"kdaWallet": "<string>",
"ltcWallet": "<string>",
"ckbWallet": "<string>",
"kasWallet": "<string>",
"dogeWallet": "<string>",
"emailNotification": true,
"discordNotification": true,
"newsletterNotification": true,
"lists": [
"<string>"
],
"scope": "superuser marketing operations",
"missingFields": [
{
"name": "<string>",
"required": true,
"enabled": true,
"unique": true,
"verify": true,
"type": "standard",
"validationRules": {
"unique": true,
"regex": "^0x",
"validOptions": [
{
"label": "small"
},
{
"label": "medium"
},
{
"label": "large"
}
],
"checkboxText": "Agree to the terms and conditions"
},
"validationType": "text",
"label": "<string>",
"position": 123
}
]
},
"conflicts": [
{
"field": {
"name": "<string>",
"required": true,
"enabled": true,
"unique": true,
"verify": true,
"type": "standard",
"validationRules": {
"unique": true,
"regex": "^0x",
"validOptions": [
{
"label": "small"
},
{
"label": "medium"
},
{
"label": "large"
}
],
"checkboxText": "Agree to the terms and conditions"
},
"validationType": "text",
"label": "<string>",
"position": 123
},
"fromUser": {
"userId": "95b11417-f18f-457f-8804-68e361f9164f",
"value": "An example name"
},
"currentUser": {
"userId": "95b11417-f18f-457f-8804-68e361f9164f",
"value": "An example name"
}
}
]
},
"intent": {},
"additionalMessages": [
"<string>"
]
},
"retryAfterSeconds": 600
}{
"error": "Internal Server Error"
}{
"error": "Error from Snowflake service",
"code": "exchange_unavailable"
}{
"error": "Internal Server Error"
}Attach a source to a flow and mint a session token
Sets the source wallet address and chain on a flow and mints the capability sessionToken used to drive the rest of the lifecycle. No API key or token is required (the browser has neither at this point) — the endpoint is gated by the flow’s state and by CORS. A source can be attached while the flow is initiated, source_attached, quoted or signing, so a payer can switch source before broadcasting. Unlike quote, prepare, broadcast and cancel, which always require the session token, attach needs no token for the first attach or while the flow is source_attached or quoted. From signing, the current session token must be supplied (X-Dynamic-Flow-Session-Token) to prove the caller is the original signer; otherwise the request is rejected with 403 session_token_invalid. Once the flow has been broadcasted or source_detected, or has reached a terminal state, the request is rejected with 409 flow_invalid_transition. Each attach mints a new session token and invalidates the previous one, so at most one live token exists per flow at a time.
curl --request POST \
--url https://app.dynamicauth.com/api/v0/sdk/{environmentId}/flow/{flowId}/source \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fromAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"fromChainId": "An example name",
"refundAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834"
}
'import requests
url = "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/flow/{flowId}/source"
payload = {
"fromAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"fromChainId": "An example name",
"refundAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fromAddress: '0xbF394748301603f18d953C90F0b087CBEC0E1834',
fromChainId: 'An example name',
refundAddress: '0xbF394748301603f18d953C90F0b087CBEC0E1834'
})
};
fetch('https://app.dynamicauth.com/api/v0/sdk/{environmentId}/flow/{flowId}/source', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/flow/{flowId}/source",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fromAddress' => '0xbF394748301603f18d953C90F0b087CBEC0E1834',
'fromChainId' => 'An example name',
'refundAddress' => '0xbF394748301603f18d953C90F0b087CBEC0E1834'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/flow/{flowId}/source"
payload := strings.NewReader("{\n \"fromAddress\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"fromChainId\": \"An example name\",\n \"refundAddress\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dynamicauth.com/api/v0/sdk/{environmentId}/flow/{flowId}/source")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fromAddress\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"fromChainId\": \"An example name\",\n \"refundAddress\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dynamicauth.com/api/v0/sdk/{environmentId}/flow/{flowId}/source")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fromAddress\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"fromChainId\": \"An example name\",\n \"refundAddress\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\"\n}"
response = http.request(request)
puts response.read_body{
"sessionExpiresAt": "2023-11-07T05:31:56Z",
"sessionToken": "dft_A1B2C3...",
"flow": {
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"mode": "payment",
"amount": "<string>",
"currency": "An example name",
"executionState": "initiated",
"settlementState": "none",
"riskState": "unknown",
"quoteVersion": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"amountUsd": "<string>",
"currencyTokenInfo": {
"symbol": "<string>",
"decimals": 123,
"name": "<string>",
"logoURI": "<string>"
},
"memo": {},
"userId": "95b11417-f18f-457f-8804-68e361f9164f",
"sourceType": "wallet",
"fromAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"fromChainId": "An example name",
"fromChainName": "ETH",
"fromToken": "An example name",
"toAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"toChainId": "An example name",
"toChainName": "ETH",
"toToken": "An example name",
"quote": {
"version": 123,
"fromAmount": "<string>",
"toAmount": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"fees": {
"totalFeeUsd": "<string>",
"gasEstimate": {
"usdValue": "<string>",
"nativeValue": "<string>",
"nativeSymbol": "<string>"
}
},
"estimatedTimeSec": 123,
"signingPayload": {
"chainName": "ETH",
"chainId": "<string>",
"evmTransaction": {
"to": "<string>",
"data": "<string>",
"value": "<string>",
"gasLimit": "<string>",
"gasPrice": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"nonce": 123
},
"evmApproval": {
"tokenAddress": "<string>",
"spenderAddress": "<string>",
"amount": "<string>"
},
"serializedTransaction": "<string>",
"psbt": "<string>",
"tronTransaction": {
"rawDataHex": "<string>",
"to": "<string>",
"value": "<string>"
}
},
"fromChainName": "ETH",
"fromChainId": "An example name",
"fromToken": "An example name",
"toChainName": "ETH",
"toChainId": "An example name",
"toToken": "An example name",
"fromTokenInfo": {
"symbol": "<string>",
"decimals": 123,
"name": "<string>",
"logoURI": "<string>"
},
"toTokenInfo": {
"symbol": "<string>",
"decimals": 123,
"name": "<string>",
"logoURI": "<string>"
}
},
"txHash": "<string>",
"settlementTxHash": "<string>",
"broadcastedAt": "2023-11-07T05:31:56Z",
"sourceConfirmedAt": "2023-11-07T05:31:56Z",
"confirmations": 123,
"settlement": {
"toChainId": "An example name",
"toToken": "An example name",
"toAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"completedAt": "2023-11-07T05:31:56Z",
"amount": "<string>",
"amountUsd": "<string>",
"input": {
"amount": "<string>",
"amountUsd": "<string>",
"tokenInfo": {
"symbol": "<string>",
"decimals": 123,
"name": "<string>",
"logoURI": "<string>"
}
},
"feeUsd": "<string>",
"toTokenInfo": {
"symbol": "<string>",
"decimals": 123,
"name": "<string>",
"logoURI": "<string>"
}
},
"completedAt": "2023-11-07T05:31:56Z",
"failure": {
"code": "An example name",
"message": "<string>",
"category": "An example name",
"stage": "An example name",
"retryable": true,
"details": {}
},
"expiresAt": "2023-11-07T05:31:56Z",
"depositAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"exchangeSource": {
"exchangeId": "95b11417-f18f-457f-8804-68e361f9164f",
"metadata": {}
},
"pegStablecoins": true,
"disableSwaps": true,
"uiConfig": {
"returnUrl": "<string>",
"termsOfServicesUrl": "https://website-sample.com",
"merchantName": "An example name",
"merchantLogoUrl": "https://website-sample.com/logo.png",
"externalPaymentId": "An example name",
"enabledPaymentMethods": [
"wallet"
]
},
"settlementConfig": {
"strategy": "cheapest",
"settlements": [
{
"chainName": "ETH",
"tokenAddress": "An example name",
"chainId": "An example name",
"symbol": "An example name",
"tokenDecimals": 18,
"isNative": true
}
]
},
"destinationConfig": {
"destinations": [
{
"chainName": "ETH",
"type": "address",
"identifier": "An example name"
}
]
}
}
}{
"error": "<string>",
"code": "exchange_currency_unsupported"
}{
"error": "Access Forbidden",
"code": "sanctions_blocked"
}{
"error": "Not Found",
"code": "not_found"
}{
"error": "Flow cannot be cancelled from state 'source_attached'",
"code": "flow_invalid_transition"
}{
"error": "Resources already exists for this Object",
"code": "email_cannot_be_null",
"payload": {
"email": "joe@email.com",
"loginProvider": "emailOnly",
"embeddedWalletName": "<string>",
"embeddedSocialSigninProvider": "emailOnly",
"mergeConflicts": {
"fromUser": {
"id": "95b11417-f18f-457f-8804-68e361f9164f",
"projectEnvironmentId": "95b11417-f18f-457f-8804-68e361f9164f",
"verifiedCredentials": [
{
"id": "95b11417-f18f-457f-8804-68e361f9164f-zerodev",
"format": "blockchain",
"signInEnabled": true,
"address": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"chain": "<string>",
"refId": "95b11417-f18f-457f-8804-68e361f9164f",
"signerRefId": "95b11417-f18f-457f-8804-68e361f9164f",
"email": "jsmith@example.com",
"name_service": {
"avatar": "<string>",
"name": "<string>"
},
"public_identifier": "<string>",
"wallet_name": "<string>",
"wallet_provider": "browserExtension",
"wallet_properties": {
"turnkeySubOrganizationId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyPrivateKeyId": "95b11417-f18f-457f-8804-68e361f9164f",
"turnkeyHDWalletId": "95b11417-f18f-457f-8804-68e361f9164f",
"isAuthenticatorAttached": true,
"turnkeyUserId": "95b11417-f18f-457f-8804-68e361f9164f",
"isSessionKeyCompatible": true,
"version": "V1",
"ecdsaProviderType": "zerodev_signer_to_ecdsa",
"entryPointVersion": "v6",
"kernelVersion": "v2_4"
},
"business_account_properties": {
"businessAccountId": "95b11417-f18f-457f-8804-68e361f9164f",
"businessAccountCreatedAt": "2023-11-07T05:31:56Z",
"businessAccountSignerId": "95b11417-f18f-457f-8804-68e361f9164f",
"businessAccountSignerType": "endUser",
"businessAccountMemberRole": "cfo",
"businessAccountName": "<string>",
"businessAccountExternalRef": "<string>",
"businessAccountSignerAddedByUserId": "<string>"
},
"oauth_provider": "emailOnly",
"oauth_username": "<string>",
"oauth_display_name": "<string>",
"oauth_account_id": "<string>",
"phoneNumber": "9171113333",
"phoneCountryCode": "1",
"isoCountryCode": "US",
"oauth_account_photos": [
"<string>"
],
"oauth_emails": [
"<string>"
],
"oauth_metadata": {},
"previous_users": [
"95b11417-f18f-457f-8804-68e361f9164f"
],
"embedded_wallet_id": "<string>",
"wallet_additional_addresses": [
{
"address": "<string>",
"type": "ordinals",
"publicKey": "<string>",
"network": "<string>"
}
],
"lastSelectedAt": "2023-11-07T05:31:56Z",
"verifiedAt": "2023-11-07T05:31:56Z"
}
],
"lastVerifiedCredentialId": "95b11417-f18f-457f-8804-68e361f9164f-zerodev",
"sessionId": "95b11417-f18f-457f-8804-68e361f9164f",
"alias": "An example name",
"country": "US",
"email": "jsmith@example.com",
"firstName": "An example name",
"jobTitle": "An example name",
"lastName": "An example name",
"phoneNumber": "<string>",
"policiesConsent": true,
"tShirtSize": "An example name",
"team": "An example name",
"username": "An example name",
"firstVisit": "2023-11-07T05:31:56Z",
"lastVisit": "2023-11-07T05:31:56Z",
"newUser": true,
"metadata": {},
"mfaBackupCodeAcknowledgement": "pending",
"btcWallet": "<string>",
"kdaWallet": "<string>",
"ltcWallet": "<string>",
"ckbWallet": "<string>",
"kasWallet": "<string>",
"dogeWallet": "<string>",
"emailNotification": true,
"discordNotification": true,
"newsletterNotification": true,
"lists": [
"<string>"
],
"scope": "superuser marketing operations",
"missingFields": [
{
"name": "<string>",
"required": true,
"enabled": true,
"unique": true,
"verify": true,
"type": "standard",
"validationRules": {
"unique": true,
"regex": "^0x",
"validOptions": [
{
"label": "small"
},
{
"label": "medium"
},
{
"label": "large"
}
],
"checkboxText": "Agree to the terms and conditions"
},
"validationType": "text",
"label": "<string>",
"position": 123
}
]
},
"conflicts": [
{
"field": {
"name": "<string>",
"required": true,
"enabled": true,
"unique": true,
"verify": true,
"type": "standard",
"validationRules": {
"unique": true,
"regex": "^0x",
"validOptions": [
{
"label": "small"
},
{
"label": "medium"
},
{
"label": "large"
}
],
"checkboxText": "Agree to the terms and conditions"
},
"validationType": "text",
"label": "<string>",
"position": 123
},
"fromUser": {
"userId": "95b11417-f18f-457f-8804-68e361f9164f",
"value": "An example name"
},
"currentUser": {
"userId": "95b11417-f18f-457f-8804-68e361f9164f",
"value": "An example name"
}
}
]
},
"intent": {},
"additionalMessages": [
"<string>"
]
},
"retryAfterSeconds": 600
}{
"error": "Internal Server Error"
}{
"error": "Error from Snowflake service",
"code": "exchange_unavailable"
}{
"error": "Internal Server Error"
}Authorizations
Headers
Path Parameters
Body
fromAddress, fromChainId, and fromChainName are required when sourceType is 'wallet'. When sourceType is 'exchange', they are optional; pass exchangeProvider to generate the buy URL and create the exchange source record server-side. When sourceType is 'deposit_address', fromChainId, fromChainName, and refundAddress are all required (refundAddress specifies where funds should be returned if the deposit fails); fromAddress is not accepted.
Valid blockchain wallet address, must be an alphanumeric string (underscores allowed for chains like Midnight, hyphens allowed for chains using base64url-encoded addresses like TON)
255^[A-Za-z0-9_-]{18,100}$"0xbF394748301603f18d953C90F0b087CBEC0E1834"
Valid blockchain wallet address, must be an alphanumeric string (underscores allowed for chains like Midnight, hyphens allowed for chains using base64url-encoded addresses like TON)
255^[A-Za-z0-9_-]{18,100}$"0xbF394748301603f18d953C90F0b087CBEC0E1834"
Response
Source attached; session token minted
Response from the source endpoint — carries the one-time capability session token plus the current flow state.
Opaque capability token for authenticating subsequent calls on this flow (quote, prepare, broadcast, cancel). Minted by the source endpoint and returned exactly once — store it immediately. At most one live token exists per flow at a time. Format: dft_.
"dft_A1B2C3..."