Skip to main content
POST
/
accounts
/
{account_id}
/
automations
Create an Automation
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"
  }
}
'
{
  "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"
  }
}
Use the playground below to try this endpoint directly, or review the OpenAPI details in the right panel.

Branded Automations

You can optionally include a brand object in the request body to control which business name appears as the beneficiary on funding instructions.
FieldTypeRequiredDescription
brandobjectNoControls the beneficiary name on the Automation’s funding instructions.
brand.account_idstringYes (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.
Default behavior is unchanged. If you omit 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" }
}
Once the Automation becomes active, 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

Authorization
string
header
required

Use the Bearer token returned from the Auth endpoint via OAuth2 client_credentials flow. Include the token in the "Authorization: Bearer " header.

Headers

Idempotency-Key
string
required

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

account_id
string<ksuid>
required

The ID of the account

Pattern: ^[a-zA-Z0-9]{26}$
Example:

"2VcUIIsgARwVbEGlIYbhg6fGG57"

Body

application/json
name
string
required
Example:

"XYZ Onramp"

source
AutomationSource · object
required

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.

destination
AutomationDestination · object
required

The destination wallet that receives minted stablecoins when the automation is funded.

brand
AutomationBrand · object

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.

Response

201 - */*

Automation successfully created

id
string<ksuid>
Pattern: ^[a-zA-Z0-9]{26}$
Example:

"2VcUIIsgARwVbEGlIYbhg6fGG57"

name
string
Example:

"XYZ Onramp"

status
enum<string>

The current lifecycle state of the automation.

Available options:
pending,
active,
disabled,
archived
Example:

"active"

source
AutomationSource · object

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.

destination
AutomationDestination · object

The destination wallet that receives minted stablecoins when the automation is funded.

created_at
string<date-time>
Example:

"2024-01-15T12:34:56Z"

updated_at
string<date-time>
Example:

"2024-01-15T12:34:56Z"

brand
AutomationBrand · object

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.