Bridge Developers API

The Developers API from Bridge — 2 operation(s) for developers.

OpenAPI Specification

bridge-developers-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  title: Bridge API Keys Developers 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: Developers
paths:
  /developer/fees:
    get:
      summary: Get the configured fees
      description: Get fees that have been configured for supported products.
      tags:
      - Developers
      responses:
        '200':
          description: The configured fees for your developer account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeveloperFees'
              examples:
                SuccessfulResponse:
                  summary: The fees configured for the account.
                  value:
                    $ref: '#/components/examples/SuccessfulDeveloperFeesShowResponse/value'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    post:
      summary: Update the configured fees
      description: Update fees for supported products.
      tags:
      - Developers
      parameters:
      - $ref: '#/components/parameters/IdempotencyKeyParameter'
      requestBody:
        description: The default fee percent that will be applied to all your Liquidation Addresses. The value is a base 100 percentage, i.e. 10.2% is 10.2 in the API.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeveloperFees'
      responses:
        '200':
          description: The configured fees have been updated for your developer account.
          content:
            application/json:
              examples:
                SuccessfulResponse:
                  summary: The fees have been updated.
                  value:
                    $ref: '#/components/examples/SuccessfulDeveloperFeesUpdateResponse'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
  /developer/fee_external_account:
    get:
      summary: Get the configured fee External Account
      description: Get the configured fee External Account.
      tags:
      - Developers
      responses:
        '200':
          description: Get the configured fee External Account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeeExternalAccount'
              examples:
                SuccessfulFeeExternalAccountResponse:
                  $ref: '#/components/examples/SuccessfulFeeExternalAccountResponse'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    post:
      summary: Configure a fee External Account
      description: Configure a fee External Account.
      tags:
      - Developers
      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'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
components:
  responses:
    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
    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
  schemas:
    BankAccountOwnerType:
      type: string
      enum:
      - individual
      - business
    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
    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
    DeveloperFees:
      required:
      - default_liquidation_address_fee_percent
      properties:
        default_liquidation_address_fee_percent:
          description: The default fee percent that will be applied to all your Liquidation Addresses. The value is a base 100 percentage, i.e. 10.2% is "10.2" in the API.
          type: string
          format: float
          minimum: 0.0
          maximum: 1.0
          example: '0.5'
          exclusiveMaximum: true
    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:
          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.
          $ref: '#/components/schemas/BankAccountOwnerType'
        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:
          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.
          $ref: '#/components/schemas/ExternalAccountAddress'
        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), used for regulatory reporting. Omitted when unknown.
        deactivation_reason:
          readOnly: true
          description: Reason for deactivation when this External Account is inactive
          $ref: '#/components/schemas/ExternalAccountDeactivationReason'
        deactivation_details:
          readOnly: true
          type: string
          description: Additional details about the deactivation when this External Account is inactive
    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
    Id:
      description: A UUID that uniquely identifies a resource
      type: string
      pattern: '[a-z0-9]*'
      minLength: 1
      maxLength: 42
    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
    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
    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'
    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'
  parameters:
    IdempotencyKeyParameter:
      in: header
      name: Idempotency-Key
      required: true
      schema:
        type: string
  examples:
    SuccessfulDeveloperFeesShowResponse:
      value:
        default_liquidation_address_fee_percent: '1.3'
    SuccessfulDeveloperFeesUpdateResponse:
      summary: A successful post request for updating fees.
    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'
    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
  securitySchemes:
    ApiKey:
      type: apiKey
      name: Api-Key
      in: header