> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brale.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an Automation

> Create an automation that mints stablecoins to a destination wallet when fiat deposits are received.

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.

| 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. |

<Note>
  **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.
</Note>

### Example: branded automation request

```json theme={null}
{
  "name": "XYZ Onramp",
  "destination_address": {
    "address_id": "2MhCCIHulVdXrHiEuQDJvnKbSkl",
    "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](/key-concepts/automations#branded-automations).


## OpenAPI

````yaml POST /accounts/{account_id}/automations
openapi: 3.0.3
info:
  title: Brale Issuance and Orchestration API
  version: 2.3.1
  description: >
    Brale supports stablecoin issuance and orchestration, enabling businesses
    and

    ecosystems to create their own stablecoins and convert between fiat and
    stablecoins

    seamlessly. From stablecoin onramps, offramps, and swaps to custody and
    payouts, the

    Brale API makes it easy to build stablecoin-enabled products.


    NOTE: All resource IDs (including account_id, address_id,
    financial_institution_id,

    and automation_id) are KSUIDs—26-character alphanumeric strings that are
    sortable

    by time. Examples showing UUIDs are incorrect.



    **What's new in 2.3.1**

    - Unified **Addresses** model for on-chain and off-chain endpoints
      - `Transfers` now accepts **address_id only** (no financial_institution_id)
      - Optional `brand` object to control bank statement presentation (`branding` still accepted as legacy alias)
    - Added off-chain rails: `ach_credit`, `same_day_ach_credit`, `ach_debit`,
    `same_day_ach_debit`, `rtp-credit`

    - Plaid endpoints moved to `/accounts/{account_id}/plaid/*`

    - `Financial Institutions` marked **deprecated** (migration path to
    **Addresses**)

    - Create Account now uses `CreateManagedAccountRequest` with
    `beneficial_owners`, `business_controller`, and `EndUserTosAttestation`.

    - Transfers now accept `brand` (replaces `branding`, still aliased in docs).

    - Plaid endpoints updated to return `address_id` and accept
    `transfer_types`.

    - Off-chain Address creation uses `CreateExternalAddressRequest` oneOf with
    bank + blockchain variants.

    - FI endpoints kept but marked deprecated; use Addresses instead.

    - `rtp_credit` is the canonical RTP rail name.
servers:
  - url: https://api.brale.xyz
    description: Production server
security:
  - BearerAuth: []
tags:
  - name: Accounts
    description: Endpoints related to managing customer accounts (KYB, details, etc.)
  - name: Transfers
    description: >-
      Endpoints for creating and retrieving transfers (fiat to stablecoins,
      etc.)
  - name: Addresses
    description: >-
      On-chain and off-chain endpoints (custodial or external) represented by a
      single Addresses resource
  - name: Financial Institutions
    description: Legacy (deprecated) bank endpoints. Use Addresses instead.
  - name: Automations
    description: Automated deposit addresses or onramps
  - name: Plaid
    description: Bank linking and ACH debit via Plaid.
  - name: Orders
    description: Legacy tag used for transfers in older specs.
paths:
  /accounts/{account_id}/automations:
    post:
      tags:
        - Automations
      summary: Create an Automation
      description: |
        Creates a new automation.
      operationId: createAutomations
      parameters:
        - name: account_id
          in: path
          required: true
          description: The ID of the account
          schema:
            $ref: '#/components/schemas/Ksuid'
        - in: header
          name: Idempotency-Key
          required: true
          schema:
            type: string
          example: idemp-123e4567-e89b-12d3-a456-426614174000
          description: >
            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`
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutomationCreateRequest'
      responses:
        '201':
          description: Automation successfully created
          content:
            '*/*':
              schema:
                type: object
                properties:
                  id:
                    $ref: '#/components/schemas/Ksuid'
components:
  schemas:
    Ksuid:
      title: Kusid
      type: string
      format: ksuid
      pattern: ^[a-zA-Z0-9]{26}$
      example: 2VcUIIsgARwVbEGlIYbhg6fGG57
    AutomationCreateRequest:
      title: AutomationCreateRequest
      type: object
      properties:
        name:
          type: string
          example: XYZ Onramp
        destination_address:
          $ref: '#/components/schemas/AutomationDestinationAddress'
        brand:
          $ref: '#/components/schemas/AutomationBrand'
      required:
        - name
        - destination_address
    AutomationDestinationAddress:
      title: AutomationDestinationAddress
      type: object
      properties:
        address_id:
          $ref: '#/components/schemas/Ksuid'
        value_type:
          type: string
          example: SBC
        transfer_type:
          type: string
          example: solana
      required:
        - address_id
        - value_type
        - transfer_type
    AutomationBrand:
      title: AutomationBrand
      type: object
      description: >-
        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.
      properties:
        account_id:
          $ref: '#/components/schemas/Ksuid'
          description: >-
            The account whose business name and address will appear as the
            beneficiary on wire and ACH funding instructions.
      required:
        - account_id
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >
        Use the Bearer token returned from the Auth endpoint via OAuth2
        client_credentials flow. Include the token in the "Authorization: Bearer
        <token>" header.

````