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

# Configure a fee External Account

> Configure a fee External Account.



## OpenAPI

````yaml https://withbridge-image1-sv-usw2-monorail-openapi.s3.amazonaws.com/latest.json post /developer/fee_external_account
openapi: 3.0.2
info:
  title: Bridge API
  description: APIs to move into, out of, and between any form of a dollar
  version: '1'
servers:
  - url: https://api.bridge.xyz/v0
    description: The base path for all resources
security:
  - ApiKey: []
tags:
  - name: Customers
  - name: Fiat Payout Configuration
  - name: External Accounts
  - name: Transfers
  - name: Prefunded Accounts
  - name: Balances
  - name: Liquidation Addresses
  - name: Developers
  - name: API Keys
  - name: Plaid
  - name: Virtual Accounts
  - name: Static Memos
  - name: Cards
  - name: Funds Requests
  - name: Webhooks
  - name: Lists
  - name: Crypto Return Policies
  - name: Rewards
  - name: Associated Persons
  - name: Sandbox
paths:
  /developer/fee_external_account:
    post:
      tags:
        - Developers
      summary: Configure a fee External Account
      description: Configure a fee External Account.
      parameters:
        - $ref: '#/components/parameters/IdempotencyKeyParameter'
      requestBody:
        description: New External Account object to be created
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFeeExternalAccountInput'
            examples:
              ACH:
                $ref: '#/components/examples/CreateAchExternalAccountRequest'
      responses:
        '201':
          description: External Account object created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeeExternalAccount'
              examples:
                SuccessfulFeeExternalAccountResponse:
                  $ref: '#/components/examples/SuccessfulFeeExternalAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
components:
  parameters:
    IdempotencyKeyParameter:
      in: header
      name: Idempotency-Key
      required: true
      schema:
        type: string
  schemas:
    CreateFeeExternalAccountInput:
      description: >-
        Request body for creating a fee external account. Fee external accounts
        must use USD currency.
      allOf:
        - $ref: '#/components/schemas/ExternalAccountUs'
    FeeExternalAccount:
      required:
        - id
        - customer_id
        - created_at
        - updated_at
        - account_owner_name
        - account_name
        - currency
        - account_type
        - active
      allOf:
        - $ref: '#/components/schemas/ExternalAccountUs'
    ExternalAccountUs:
      title: ACH/Wire
      description: >-
        US bank account using account and routing numbers for ACH or Wire
        transfers
      allOf:
        - $ref: '#/components/schemas/ExternalAccountBaseWithOwnerInfo'
        - type: object
          required:
            - account_type
            - account
            - currency
            - account_owner_name
          properties:
            account_type:
              type: string
              enum:
                - us
              description: Type of the bank account.
            currency:
              description: >-
                Currency associated with the bank account. Must be `usd` for US
                accounts.
              type: string
              enum:
                - usd
            account:
              $ref: '#/components/schemas/UsBankAccount'
            beneficiary_address_valid:
              readOnly: true
              type: boolean
              description: >-
                Whether the beneficiary address is valid. A valid beneficiary
                address is required for all US External Accounts
            last_4:
              description: >-
                Last 4 digits of the bank account number. This field is getting
                deprecated in favor of the `account.last_4` field
              type: string
              minLength: 1
              readOnly: true
              deprecated: true
            account_number:
              writeOnly: true
              description: >-
                Account number of your bank account. This field is getting
                deprecated in favor of the `account.account_number` field for US
                accounts.
              type: string
              minLength: 12
              deprecated: true
            routing_number:
              writeOnly: true
              description: >-
                Routing number of your bank account. This field is getting
                deprecated in favor of the `account.routing_number` field for US
                accounts.
              type: string
              minLength: 9
              deprecated: true
    Error:
      required:
        - code
        - message
      properties:
        code:
          type: string
          minLength: 1
          maxLength: 256
        message:
          type: string
          minLength: 1
          maxLength: 512
        source:
          title: ErrorSource
          required:
            - location
            - key
          properties:
            location:
              type: string
              enum:
                - path
                - query
                - body
                - header
            key:
              type: string
              description: >-
                Comma separated names of the properties or parameters causing
                the error
    ExternalAccountBaseWithOwnerInfo:
      description: Properties shared by all external account types
      properties:
        id:
          $ref: '#/components/schemas/Id'
          readOnly: true
        customer_id:
          description: The id of the Bridge customer that this External Account belongs to
          type: string
          minLength: 1
          readOnly: true
        bank_name:
          description: Bank name of the account (e.g. "Chase")
          type: string
          minLength: 1
          maxLength: 256
        account_owner_name:
          description: >
            Owner of the account Bank Account (e.g. "John Doe"). For ach, wire,
            and iban accounts, this field must be at least 3 characters, at most
            35 characters, and follow the regex pattern for the given account
            type:

            - ach: `^(?!\s*$)[\x20-\x7E]*$`

            - wire: ```^[ \w!"#$%&'()+,\-./:;<=>?@\\_`~]*$```

            - iban: `^(?![:\- ]*$)[a-zA-Z0-9\/\-?:().,'+ _]+$`
          type: string
          minLength: 1
          maxLength: 256
        created_at:
          readOnly: true
          type: string
          description: Time of creation of the External Account
          format: date-time
        updated_at:
          readOnly: true
          type: string
          description: Time of last update of the External Account
          format: date-time
        active:
          readOnly: true
          type: boolean
          description: Whether or not this External Account is active
        account_owner_type:
          $ref: '#/components/schemas/BankAccountOwnerType'
          description: >-
            The type of the account ownership. Required when the `account_type`
            is `iban`. For `individual` ownership, `first_name` and `last_name`
            are required. For `business` ownership, `business_name` is required.
        first_name:
          type: string
          description: >-
            First name of the individual account holder. Required when the
            `account_owner_type` is `individual`
        last_name:
          type: string
          description: >-
            Last name of the individual account holder. Required when the
            `account_owner_type` is `individual`
        business_name:
          type: string
          description: >-
            Business name of the business account holder. Required when the
            `account_owner_type` is `business`
        address:
          $ref: '#/components/schemas/ExternalAccountAddress'
          description: >-
            Address of the beneficiary of this account. Please ensure the
            address is valid (Google Maps is good for this). US addresses used
            to receive wires must include a street number.
        account_owner_country:
          readOnly: true
          type: string
          minLength: 3
          maxLength: 3
          description: >-
            Three-letter alpha-3 country of residence of the account owner (ISO
            3166-1).
        deactivation_reason:
          $ref: '#/components/schemas/ExternalAccountDeactivationReason'
          readOnly: true
          description: Reason for deactivation when this External Account is inactive
        deactivation_details:
          readOnly: true
          type: string
          description: >-
            Additional details about the deactivation when this External Account
            is inactive
    UsBankAccount:
      title: us
      required:
        - account_number
        - routing_number
        - last_4
      properties:
        account_number:
          type: string
          description: The bank account number
          minLength: 1
          writeOnly: true
        routing_number:
          type: string
          description: The bank routing number
          minLength: 9
          maxLength: 9
        last_4:
          description: Last 4 digits of the bank account number
          minLength: 1
          type: string
          readOnly: true
        checking_or_savings:
          $ref: '#/components/schemas/CheckingOrSavingsType'
    Id:
      description: A UUID that uniquely identifies a resource
      type: string
      pattern: '[a-z0-9]*'
      minLength: 1
      maxLength: 42
    BankAccountOwnerType:
      type: string
      enum:
        - individual
        - business
    ExternalAccountAddress:
      required:
        - street_line_1
        - country
        - city
      properties:
        street_line_1:
          type: string
          minLength: 4
          maxLength: 35
        street_line_2:
          type: string
          maxLength: 35
        city:
          type: string
          minLength: 1
        state:
          type: string
          description: ISO 3166-2 subdivision code. Must be supplied for US addresses.
          minLength: 1
        postal_code:
          type: string
          description: Must be supplied for countries that use postal codes.
          minLength: 1
        country:
          description: Three-letter alpha-3 country code as defined in the ISO 3166-1 spec.
          type: string
          minLength: 3
          maxLength: 3
    ExternalAccountDeactivationReason:
      description: Reason for deactivating an External Account
      type: string
      enum:
        - plaid_item_error
        - deactivated_due_to_bounceback
        - deleted_by_developer
        - requested_by_developer
        - invalid_account_number
        - invalid_bank_validation
        - rejected_by_bank_provider
    CheckingOrSavingsType:
      description: >-
        Determines whether the US account is treated as checking or savings. All
        US accounts will be treated as checking by default.
      type: string
      enum:
        - checking
        - savings
  examples:
    CreateAchExternalAccountRequest:
      summary: Create ACH or Wire External Account (US)
      value:
        currency: usd
        bank_name: Wells Fargo
        account_owner_name: John Doe
        account_type: us
        account:
          account_number: '1210002481111'
          routing_number: '121000248'
          checking_or_savings: checking
        address:
          street_line_1: 123 Main St
          city: San Francisco
          state: CA
          postal_code: '94102'
          country: USA
    SuccessfulFeeExternalAccountResponse:
      summary: A successful Fee External Account object (ACH)
      value:
        id: fea_123
        account_type: us
        currency: usd
        account_owner_name: John Doe
        bank_name: Wells Fargo
        last_4: '1111'
        active: true
        beneficiary_address_valid: true
        account:
          last_4: '1111'
          routing_number: '121000248'
          checking_or_savings: checking
        created_at: '2020-01-01T00:00:00.000Z'
        updated_at: '2020-01-02T00:00:00.000Z'
  responses:
    BadRequestError:
      description: Request containing missing or invalid parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            BadCustomerRequestErrorExample:
              summary: Bad customer request
              value:
                code: bad_customer_request
                message: fields missing from customer body.
                name: first_name,ssn
    AuthenticationError:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            MissingTokenError:
              summary: No Api-Key header
              description: The header may be missing or misspelled.
              value:
                code: required
                location: header
                name: Api-Key
                message: Missing Api-Key header
            InvalidTokenError:
              summary: Invalid key in Api-Key header
              value:
                code: invalid
                location: header
                name: Api-Key
                message: Invalid Api-Key header
    UnexpectedError:
      description: Unexpected error. User may try and send the request again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            UnexpectedError:
              summary: An unexpected error
              value:
                errors:
                  - code: unexpected
                    message: An expected error occurred, you may try again later
  securitySchemes:
    ApiKey:
      type: apiKey
      name: Api-Key
      in: header

````