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": "XYZ Onramp",
"source": {
"value_type": "USD",
"transfer_type": "wire",
"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"
}
}
'import requests
url = "https://api.brale.xyz/accounts/{account_id}/automations"
payload = {
"name": "XYZ Onramp",
"source": {
"value_type": "USD",
"transfer_type": "wire",
"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"
}
}
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: 'XYZ Onramp',
source: {
value_type: 'USD',
transfer_type: 'wire',
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'
}
})
};
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' => 'XYZ Onramp',
'source' => [
'value_type' => 'USD',
'transfer_type' => 'wire',
'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'
]
]),
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\": \"XYZ Onramp\",\n \"source\": {\n \"value_type\": \"USD\",\n \"transfer_type\": \"wire\",\n \"funding_instructions\": {\n \"beneficiary_name\": \"Jane Business\",\n \"bank_name\": \"Example Bank\",\n \"bank_address\": \"456 Commerce St., Des Moines, IA 50309\",\n \"beneficiary_address\": \"612 Commerce St., Des Moines, IA 50309\",\n \"account_number\": \"123456789\",\n \"routing_number\": \"063108680\"\n }\n },\n \"destination\": {\n \"address_id\": \"2VcUIIsgARwVbEGlIYbhg6fGG57\",\n \"value_type\": \"SBC\",\n \"transfer_type\": \"solana\"\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\": \"XYZ Onramp\",\n \"source\": {\n \"value_type\": \"USD\",\n \"transfer_type\": \"wire\",\n \"funding_instructions\": {\n \"beneficiary_name\": \"Jane Business\",\n \"bank_name\": \"Example Bank\",\n \"bank_address\": \"456 Commerce St., Des Moines, IA 50309\",\n \"beneficiary_address\": \"612 Commerce St., Des Moines, IA 50309\",\n \"account_number\": \"123456789\",\n \"routing_number\": \"063108680\"\n }\n },\n \"destination\": {\n \"address_id\": \"2VcUIIsgARwVbEGlIYbhg6fGG57\",\n \"value_type\": \"SBC\",\n \"transfer_type\": \"solana\"\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\": \"XYZ Onramp\",\n \"source\": {\n \"value_type\": \"USD\",\n \"transfer_type\": \"wire\",\n \"funding_instructions\": {\n \"beneficiary_name\": \"Jane Business\",\n \"bank_name\": \"Example Bank\",\n \"bank_address\": \"456 Commerce St., Des Moines, IA 50309\",\n \"beneficiary_address\": \"612 Commerce St., Des Moines, IA 50309\",\n \"account_number\": \"123456789\",\n \"routing_number\": \"063108680\"\n }\n },\n \"destination\": {\n \"address_id\": \"2VcUIIsgARwVbEGlIYbhg6fGG57\",\n \"value_type\": \"SBC\",\n \"transfer_type\": \"solana\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "2VcUIIsgARwVbEGlIYbhg6fGG57",
"name": "XYZ Onramp",
"status": "active",
"source": {
"value_type": "USD",
"transfer_type": "wire",
"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": "XYZ Onramp",
"source": {
"value_type": "USD",
"transfer_type": "wire",
"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"
}
}
'import requests
url = "https://api.brale.xyz/accounts/{account_id}/automations"
payload = {
"name": "XYZ Onramp",
"source": {
"value_type": "USD",
"transfer_type": "wire",
"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"
}
}
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: 'XYZ Onramp',
source: {
value_type: 'USD',
transfer_type: 'wire',
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'
}
})
};
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' => 'XYZ Onramp',
'source' => [
'value_type' => 'USD',
'transfer_type' => 'wire',
'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'
]
]),
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\": \"XYZ Onramp\",\n \"source\": {\n \"value_type\": \"USD\",\n \"transfer_type\": \"wire\",\n \"funding_instructions\": {\n \"beneficiary_name\": \"Jane Business\",\n \"bank_name\": \"Example Bank\",\n \"bank_address\": \"456 Commerce St., Des Moines, IA 50309\",\n \"beneficiary_address\": \"612 Commerce St., Des Moines, IA 50309\",\n \"account_number\": \"123456789\",\n \"routing_number\": \"063108680\"\n }\n },\n \"destination\": {\n \"address_id\": \"2VcUIIsgARwVbEGlIYbhg6fGG57\",\n \"value_type\": \"SBC\",\n \"transfer_type\": \"solana\"\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\": \"XYZ Onramp\",\n \"source\": {\n \"value_type\": \"USD\",\n \"transfer_type\": \"wire\",\n \"funding_instructions\": {\n \"beneficiary_name\": \"Jane Business\",\n \"bank_name\": \"Example Bank\",\n \"bank_address\": \"456 Commerce St., Des Moines, IA 50309\",\n \"beneficiary_address\": \"612 Commerce St., Des Moines, IA 50309\",\n \"account_number\": \"123456789\",\n \"routing_number\": \"063108680\"\n }\n },\n \"destination\": {\n \"address_id\": \"2VcUIIsgARwVbEGlIYbhg6fGG57\",\n \"value_type\": \"SBC\",\n \"transfer_type\": \"solana\"\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\": \"XYZ Onramp\",\n \"source\": {\n \"value_type\": \"USD\",\n \"transfer_type\": \"wire\",\n \"funding_instructions\": {\n \"beneficiary_name\": \"Jane Business\",\n \"bank_name\": \"Example Bank\",\n \"bank_address\": \"456 Commerce St., Des Moines, IA 50309\",\n \"beneficiary_address\": \"612 Commerce St., Des Moines, IA 50309\",\n \"account_number\": \"123456789\",\n \"routing_number\": \"063108680\"\n }\n },\n \"destination\": {\n \"address_id\": \"2VcUIIsgARwVbEGlIYbhg6fGG57\",\n \"value_type\": \"SBC\",\n \"transfer_type\": \"solana\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "2VcUIIsgARwVbEGlIYbhg6fGG57",
"name": "XYZ Onramp",
"status": "active",
"source": {
"value_type": "USD",
"transfer_type": "wire",
"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"
}
}Branded Automations
You can optionally include abrand object in the request body to control which business name appears as the beneficiary on funding instructions.
| Field | Type | Required | Description |
|---|---|---|---|
brand | object | No | Controls the beneficiary name on the Automation’s funding instructions. |
brand.account_id | string | Yes (if brand is provided) | The account whose business name and address appear as the beneficiary. Can be the caller’s own account or a managed account. |
brand, the beneficiary on funding instructions defaults to Brale. If you include brand.account_id, the beneficiary reflects that account’s business name instead.Example: branded automation request
{
"name": "XYZ Onramp",
"source": {
"value_type": "USD",
"transfer_type": "wire"
},
"destination": {
"address_id": "2VcUIIsgARwVbEGlIYbhg6fGG57",
"value_type": "SBC",
"transfer_type": "solana"
},
"brand": { "account_id": "34lCJZ2bxbPAzB3ou67Md01veUo" }
}
source.funding_instructions.beneficiary_name in the response will reflect the branded account’s business name.
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]{26}$"2VcUIIsgARwVbEGlIYbhg6fGG57"
Body
"XYZ Onramp"
The funding source for the automation. Defines the fiat rail and value type that the automation accepts. When the automation becomes active, funding_instructions is populated with the virtual account details to share with the payer.
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. Controls the beneficiary name on funding instructions. Pass the account_id of your own account or a managed account whose business name should appear as the beneficiary. If omitted, Brale is the default beneficiary.
Show child attributes
Show child attributes
Response
Automation successfully created
^[a-zA-Z0-9]{26}$"2VcUIIsgARwVbEGlIYbhg6fGG57"
"XYZ Onramp"
The current lifecycle state of the automation.
pending, active, disabled, archived "active"
The funding source for the automation. Defines the fiat rail and value type that the automation accepts. When the automation becomes active, funding_instructions is populated with the virtual account details to share with the payer.
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. Controls the beneficiary name on funding instructions. Pass the account_id of your own account or a managed account whose business name should appear as the beneficiary. If omitted, Brale is the default beneficiary.
Show child attributes
Show child attributes
Was this page helpful?