curl --request POST \
--url https://api.brale.xyz/accounts/{account_id}/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "Jane Doe Onramp",
"source": {
"value_type": "USD"
},
"destination": {
"address_id": "2MhCCIHulVdXrHiEuQDJvnKbSkl",
"value_type": "SBC",
"transfer_type": "solana"
},
"brand": {
"account_id": "3Ar9BnQCKIrB3SYjKGBzCtFs6XL"
}
}
'import requests
url = "https://api.brale.xyz/accounts/{account_id}/automations"
payload = {
"name": "Jane Doe Onramp",
"source": { "value_type": "USD" },
"destination": {
"address_id": "2MhCCIHulVdXrHiEuQDJvnKbSkl",
"value_type": "SBC",
"transfer_type": "solana"
},
"brand": { "account_id": "3Ar9BnQCKIrB3SYjKGBzCtFs6XL" }
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Jane Doe Onramp',
source: {value_type: 'USD'},
destination: {
address_id: '2MhCCIHulVdXrHiEuQDJvnKbSkl',
value_type: 'SBC',
transfer_type: 'solana'
},
brand: {account_id: '3Ar9BnQCKIrB3SYjKGBzCtFs6XL'}
})
};
fetch('https://api.brale.xyz/accounts/{account_id}/automations', 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://api.brale.xyz/accounts/{account_id}/automations",
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([
'name' => 'Jane Doe Onramp',
'source' => [
'value_type' => 'USD'
],
'destination' => [
'address_id' => '2MhCCIHulVdXrHiEuQDJvnKbSkl',
'value_type' => 'SBC',
'transfer_type' => 'solana'
],
'brand' => [
'account_id' => '3Ar9BnQCKIrB3SYjKGBzCtFs6XL'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.brale.xyz/accounts/{account_id}/automations"
payload := strings.NewReader("{\n \"name\": \"Jane Doe Onramp\",\n \"source\": {\n \"value_type\": \"USD\"\n },\n \"destination\": {\n \"address_id\": \"2MhCCIHulVdXrHiEuQDJvnKbSkl\",\n \"value_type\": \"SBC\",\n \"transfer_type\": \"solana\"\n },\n \"brand\": {\n \"account_id\": \"3Ar9BnQCKIrB3SYjKGBzCtFs6XL\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://api.brale.xyz/accounts/{account_id}/automations")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Jane Doe Onramp\",\n \"source\": {\n \"value_type\": \"USD\"\n },\n \"destination\": {\n \"address_id\": \"2MhCCIHulVdXrHiEuQDJvnKbSkl\",\n \"value_type\": \"SBC\",\n \"transfer_type\": \"solana\"\n },\n \"brand\": {\n \"account_id\": \"3Ar9BnQCKIrB3SYjKGBzCtFs6XL\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brale.xyz/accounts/{account_id}/automations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Jane Doe Onramp\",\n \"source\": {\n \"value_type\": \"USD\"\n },\n \"destination\": {\n \"address_id\": \"2MhCCIHulVdXrHiEuQDJvnKbSkl\",\n \"value_type\": \"SBC\",\n \"transfer_type\": \"solana\"\n },\n \"brand\": {\n \"account_id\": \"3Ar9BnQCKIrB3SYjKGBzCtFs6XL\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "2VcUIIsgARwVbEGlIYbhg6fGG57",
"name": "XYZ Onramp",
"status": "active",
"source": {
"value_type": "USD",
"transfer_type": null,
"funding_instructions": {
"beneficiary_name": "Jane Business",
"bank_name": "Example Bank",
"bank_address": "456 Commerce St., Des Moines, IA 50309",
"beneficiary_address": "612 Commerce St., Des Moines, IA 50309",
"account_number": "123456789",
"routing_number": "063108680"
}
},
"destination": {
"address_id": "2VcUIIsgARwVbEGlIYbhg6fGG57",
"value_type": "SBC",
"transfer_type": "solana"
},
"created_at": "2024-01-15T12:34:56Z",
"updated_at": "2024-01-15T12:34:56Z",
"brand": {
"account_id": "2VcUIIsgARwVbEGlIYbhg6fGG57"
}
}Create an Automation
Create an automation that mints stablecoins to a destination wallet when fiat deposits are received.
curl --request POST \
--url https://api.brale.xyz/accounts/{account_id}/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "Jane Doe Onramp",
"source": {
"value_type": "USD"
},
"destination": {
"address_id": "2MhCCIHulVdXrHiEuQDJvnKbSkl",
"value_type": "SBC",
"transfer_type": "solana"
},
"brand": {
"account_id": "3Ar9BnQCKIrB3SYjKGBzCtFs6XL"
}
}
'import requests
url = "https://api.brale.xyz/accounts/{account_id}/automations"
payload = {
"name": "Jane Doe Onramp",
"source": { "value_type": "USD" },
"destination": {
"address_id": "2MhCCIHulVdXrHiEuQDJvnKbSkl",
"value_type": "SBC",
"transfer_type": "solana"
},
"brand": { "account_id": "3Ar9BnQCKIrB3SYjKGBzCtFs6XL" }
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Jane Doe Onramp',
source: {value_type: 'USD'},
destination: {
address_id: '2MhCCIHulVdXrHiEuQDJvnKbSkl',
value_type: 'SBC',
transfer_type: 'solana'
},
brand: {account_id: '3Ar9BnQCKIrB3SYjKGBzCtFs6XL'}
})
};
fetch('https://api.brale.xyz/accounts/{account_id}/automations', 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://api.brale.xyz/accounts/{account_id}/automations",
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([
'name' => 'Jane Doe Onramp',
'source' => [
'value_type' => 'USD'
],
'destination' => [
'address_id' => '2MhCCIHulVdXrHiEuQDJvnKbSkl',
'value_type' => 'SBC',
'transfer_type' => 'solana'
],
'brand' => [
'account_id' => '3Ar9BnQCKIrB3SYjKGBzCtFs6XL'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.brale.xyz/accounts/{account_id}/automations"
payload := strings.NewReader("{\n \"name\": \"Jane Doe Onramp\",\n \"source\": {\n \"value_type\": \"USD\"\n },\n \"destination\": {\n \"address_id\": \"2MhCCIHulVdXrHiEuQDJvnKbSkl\",\n \"value_type\": \"SBC\",\n \"transfer_type\": \"solana\"\n },\n \"brand\": {\n \"account_id\": \"3Ar9BnQCKIrB3SYjKGBzCtFs6XL\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://api.brale.xyz/accounts/{account_id}/automations")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Jane Doe Onramp\",\n \"source\": {\n \"value_type\": \"USD\"\n },\n \"destination\": {\n \"address_id\": \"2MhCCIHulVdXrHiEuQDJvnKbSkl\",\n \"value_type\": \"SBC\",\n \"transfer_type\": \"solana\"\n },\n \"brand\": {\n \"account_id\": \"3Ar9BnQCKIrB3SYjKGBzCtFs6XL\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brale.xyz/accounts/{account_id}/automations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Jane Doe Onramp\",\n \"source\": {\n \"value_type\": \"USD\"\n },\n \"destination\": {\n \"address_id\": \"2MhCCIHulVdXrHiEuQDJvnKbSkl\",\n \"value_type\": \"SBC\",\n \"transfer_type\": \"solana\"\n },\n \"brand\": {\n \"account_id\": \"3Ar9BnQCKIrB3SYjKGBzCtFs6XL\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "2VcUIIsgARwVbEGlIYbhg6fGG57",
"name": "XYZ Onramp",
"status": "active",
"source": {
"value_type": "USD",
"transfer_type": null,
"funding_instructions": {
"beneficiary_name": "Jane Business",
"bank_name": "Example Bank",
"bank_address": "456 Commerce St., Des Moines, IA 50309",
"beneficiary_address": "612 Commerce St., Des Moines, IA 50309",
"account_number": "123456789",
"routing_number": "063108680"
}
},
"destination": {
"address_id": "2VcUIIsgARwVbEGlIYbhg6fGG57",
"value_type": "SBC",
"transfer_type": "solana"
},
"created_at": "2024-01-15T12:34:56Z",
"updated_at": "2024-01-15T12:34:56Z",
"brand": {
"account_id": "2VcUIIsgARwVbEGlIYbhg6fGG57"
}
}Source configuration
Setsource.value_type to USD and omit source.transfer_type. A USD Automation is not tied to a single deposit rail. Its virtual account accepts the inbound rails enabled for it, such as wire, ACH, and FedNow (on accounts with FedNow enabled). Responses may return source.transfer_type: null.
The rail used for each deposit appears on the resulting Transfer in source.transfer_type, for example fednow_credit. This is a Transfer response value, not an Automation setting. See Receive FedNow deposits.
Branded Automations
You can optionally include abrand object in the request body to select the verified identity (business or individual) that appears as the beneficiary on the automation’s funding instructions.
Both custodial and transactional business or individual accounts can be used as brand.account_id, subject to applicable verification and program eligibility. See Branded Automations for the account-type matrix and ownership rules.
| Field | Type | Required | Description |
|---|---|---|---|
brand | object | No | Controls the beneficiary shown on the Automation’s funding instructions. |
brand.account_id | string | Yes (if brand is provided) | The account whose verified identity appears as the beneficiary. Can be the caller’s own account or a managed account. If the account is a business, its business name and address are used. If the account is an individual, the individual’s legal name and address are used. |
brand, the beneficiary on funding instructions defaults to Brale. If you include brand.account_id, the beneficiary reflects that account’s verified business or individual identity instead./accounts/{account_id}/automations). brand.account_id does not change which account owns the automation — it only selects the identity shown on the funding instructions.
Example: branded automation request (business account)
{
"name": "XYZ Onramp",
"source": {
"value_type": "USD"
},
"destination": {
"address_id": "2VcUIIsgARwVbEGlIYbhg6fGG57",
"value_type": "SBC",
"transfer_type": "solana"
},
"brand": { "account_id": "34lCJZ2bxbPAzB3ou67Md01veUo" }
}
Example: branded automation request (individual account)
Pass theaccount_id of an individual account to render that person’s legal name and address as the beneficiary. On mainnet, the individual account must be KYC-verified. See Individual accounts for how to create one.
{
"name": "Jane Doe Onramp",
"source": {
"value_type": "USD"
},
"destination": {
"address_id": "2VcUIIsgARwVbEGlIYbhg6fGG57",
"value_type": "SBC",
"transfer_type": "solana"
},
"brand": { "account_id": "3Ar9BnQCKIrB3SYjKGBzCtFs6XL" }
}
Excerpt from retrieving the Automation after it becomes active
This partial response shows only the branded fields. It is not the immediate create response, and it does not contain usable banking instructions. Brale populates the fullsource.funding_instructions once the Automation becomes active.
{
"status": "active",
"source": {
"funding_instructions": {
"beneficiary_name": "Jane Doe",
"beneficiary_address": "123 Main St, Des Moines, IA 50309"
}
}
}
source.funding_instructions.beneficiary_name and beneficiary_address in the response reflect the branded account’s verified identity (business name and address, or individual legal name and address).
For more details on how branded Automations work, see the Automations concept page.Authorizations
Use the Bearer token returned from the Auth endpoint via OAuth2 client_credentials flow. Include the token in the "Authorization: Bearer " header.
Headers
A unique string used to prevent duplicate operations. Each POST request must use a new idempotency key. Use a UUIDv4 string. Example: idemp-123e4567-e89b-12d3-a456-426614174000
Path Parameters
The ID of the account
^[a-zA-Z0-9]{27}$"2VcUIIsgARwVbEGlIYbhg6fGG57"
Body
"XYZ Onramp"
The funding source to configure when creating an automation. Set value_type: USD to accept fiat deposits. Do not send funding instructions. Brale populates source.funding_instructions in the Automation response once the automation becomes active.
Show child attributes
Show child attributes
The destination wallet that receives minted stablecoins when the automation is funded.
Show child attributes
Show child attributes
Optional. Selects the verified identity shown as the beneficiary on the automation's funding instructions. Pass the account_id of your own account or a managed account (business or individual). Both custodial and transactional accounts can be used, subject to applicable verification and program eligibility. The automation is still created under the account in the request path; brand.account_id only controls the identity rendered on the funding instructions. If omitted, Brale is the default beneficiary.
Show child attributes
Show child attributes
Response
Automation successfully created
^[a-zA-Z0-9]{27}$"2VcUIIsgARwVbEGlIYbhg6fGG57"
"XYZ Onramp"
The current lifecycle state of the automation.
pending, active, disabled, archived "active"
The funding source for the automation. Set value_type: USD to accept fiat deposits. You do not need to select a deposit rail: a USD Automation's virtual account accepts the inbound rails enabled for your account (wire, ACH, and FedNow where enabled). When the automation becomes active, funding_instructions is populated with the virtual account details to share with the payer. This is Automation configuration. The rail of each deposit is reported on the resulting Transfer's source.transfer_type (for example, fednow_credit), not here.
Show child attributes
Show child attributes
The destination wallet that receives minted stablecoins when the automation is funded.
Show child attributes
Show child attributes
"2024-01-15T12:34:56Z"
"2024-01-15T12:34:56Z"
Optional. Selects the verified identity shown as the beneficiary on the automation's funding instructions. Pass the account_id of your own account or a managed account (business or individual). Both custodial and transactional accounts can be used, subject to applicable verification and program eligibility. The automation is still created under the account in the request path; brand.account_id only controls the identity rendered on the funding instructions. If omitted, Brale is the default beneficiary.
Show child attributes
Show child attributes
Was this page helpful?