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

## Source configuration

Set `source.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](https://docs.brale.xyz/guides/fednow-inbound.md).

## Branded Automations

You can optionally include a `brand` 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](https://docs.brale.xyz/key-concepts/automations.md#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. |

> [!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 verified business or individual identity instead.

The automation is still created under the account in the request path (`/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.

> [!NOTE]
>
> **Testnet branding.** With testnet credentials, you can create branded Automations using a business or individual account you have access to, without completing mainnet KYB/KYC or enabling that account for mainnet. Testnet funding instructions contain placeholder banking details and cannot receive real deposits. To fund a testnet Automation, use [Simulate an Automation deposit](https://docs.brale.xyz/api-reference/brale/simulate-automation-deposit.md). Mainnet verification requirements are unchanged.

### Example: branded automation request (business account)

```json theme={null}
{
  "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 the `account_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](https://docs.brale.xyz/guides/individual-accounts.md) for how to create one.

```json theme={null}
{
  "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 full `source.funding_instructions` once the Automation becomes active.

```json theme={null}
{
  "status": "active",
  "source": {
    "funding_instructions": {
      "beneficiary_name": "Jane Doe",
      "beneficiary_address": "123 Main St, Des Moines, IA 50309"
    }
  }
}
```

Once the Automation becomes active, `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](https://docs.brale.xyz/key-concepts/automations.md#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—27-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.



    **FedNow**

    - Added the `fednow_credit` rail. Outbound: create a Transfer with
      `destination.transfer_type: fednow_credit` to a bank Address that lists
      `fednow_credit` in `transfer_types`. Inbound: payers send FedNow credits to an
      active Automation's `source.funding_instructions`; Brale creates the Transfer
      automatically with `source.transfer_type: fednow_credit`.
    - Simulate a testnet FedNow deposit with `transfer_type: fednow` on
      `POST /accounts/{account_id}/automations/{automation_id}/simulations/deposits`.
    - `bank_address` and `beneficiary_address` are required only when an
    external
      bank Address requests `wire`.
    - FedNow availability depends on account enablement.
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'
            examples:
              branded:
                summary: Branded automation (individual account)
                value:
                  name: Jane Doe Onramp
                  source:
                    value_type: USD
                  destination:
                    address_id: 2MhCCIHulVdXrHiEuQDJvnKbSkl
                    value_type: SBC
                    transfer_type: solana
                  brand:
                    account_id: 3Ar9BnQCKIrB3SYjKGBzCtFs6XL
      responses:
        '201':
          description: Automation successfully created
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Automation'
components:
  schemas:
    Ksuid:
      title: Kusid
      type: string
      format: ksuid
      pattern: ^[a-zA-Z0-9]{27}$
      example: 2VcUIIsgARwVbEGlIYbhg6fGG57
    AutomationCreateRequest:
      title: AutomationCreateRequest
      type: object
      properties:
        name:
          type: string
          example: XYZ Onramp
        source:
          $ref: '#/components/schemas/AutomationCreateSource'
        destination:
          $ref: '#/components/schemas/AutomationDestination'
        brand:
          $ref: '#/components/schemas/AutomationBrand'
      required:
        - name
        - source
        - destination
    Automation:
      title: Automation
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Ksuid'
        name:
          type: string
          example: XYZ Onramp
        status:
          type: string
          description: The current lifecycle state of the automation.
          enum:
            - pending
            - active
            - disabled
            - archived
          example: active
        source:
          $ref: '#/components/schemas/AutomationSource'
        destination:
          $ref: '#/components/schemas/AutomationDestination'
        created_at:
          type: string
          format: date-time
          example: '2024-01-15T12:34:56Z'
        updated_at:
          type: string
          format: date-time
          example: '2024-01-15T12:34:56Z'
        brand:
          $ref: '#/components/schemas/AutomationBrand'
    AutomationCreateSource:
      title: AutomationCreateSource
      type: object
      description: >-
        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.
      properties:
        value_type:
          type: string
          description: The fiat value type accepted by the automation (e.g. `USD`).
          example: USD
        transfer_type:
          type: string
          nullable: true
          description: >-
            Optional. Omit this field to accept every inbound rail enabled for
            the virtual account.
      required:
        - value_type
    AutomationDestination:
      title: AutomationDestination
      type: object
      description: >-
        The destination wallet that receives minted stablecoins when the
        automation is funded.
      properties:
        address_id:
          $ref: '#/components/schemas/Ksuid'
        value_type:
          type: string
          description: The stablecoin value type minted to the destination (e.g. `SBC`).
          example: SBC
        transfer_type:
          type: string
          description: The destination chain or rail (e.g. `solana`).
          example: solana
      required:
        - address_id
        - value_type
        - transfer_type
    AutomationBrand:
      title: AutomationBrand
      type: object
      description: >-
        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.
      properties:
        account_id:
          $ref: '#/components/schemas/Ksuid'
          description: >-
            The account whose verified identity appears as the beneficiary on
            wire and ACH funding instructions. For a business account, this is
            the business name and address. For an individual account, this is
            the individual's legal name and address.
      required:
        - account_id
    AutomationSource:
      title: AutomationSource
      type: object
      description: >-
        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.
      properties:
        value_type:
          type: string
          description: The fiat value type accepted by the automation (e.g. `USD`).
          example: USD
        transfer_type:
          type: string
          nullable: true
          description: >-
            Optional. Omit this field to accept every inbound rail enabled for
            the virtual account. Responses may return `null`. Do not set it to
            restrict deposits to FedNow. A null value does not mean FedNow is
            unavailable.
          example: null
        funding_instructions:
          $ref: '#/components/schemas/FundingInstructions'
      required:
        - value_type
    FundingInstructions:
      title: FundingInstructions
      type: object
      description: >-
        Bank details for the virtual account that funds the automation.
        Populated by Brale once the automation becomes active. Share these
        coordinates with the payer to fund the automation.
      properties:
        beneficiary_name:
          type: string
          example: Jane Business
        bank_name:
          type: string
          example: Example Bank
        bank_address:
          type: string
          example: 456 Commerce St., Des Moines, IA 50309
        beneficiary_address:
          type: string
          example: 612 Commerce St., Des Moines, IA 50309
        account_number:
          type: string
          description: >-
            Bank account number to fund the automation. On testnet, this field
            contains the automation's alphanumeric ID as a placeholder, not a
            numeric bank account number. This applies to both branded and
            unbranded automations.
          example: '123456789'
        routing_number:
          type: string
          example: '063108680'
  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.

````