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

# Add a bank account to a vendor

> Attaches a US bank account to one of the calling company's vendors, so that
`POST /v1/payments` can pay into it.

Only ACH accounts are supported, which is why `type` accepts `ach` alone — it is the rail
payments created through this API go out on. An account added here is never made the vendor's
default: every payment names the account it pays into.

There is no update endpoint. Correcting an account means creating the new one and deleting the
old one.

`idempotency_key` is required. Repeating a request with a key already used answers `409` with
the account the first request created, instead of attaching a second one to the vendor. Keys
are scoped to the vendor in the path: the same key under another vendor is a new request and
creates an account there.




## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/vendors/{vendorId}/bank-accounts
openapi: 3.0.0
info:
  title: Every Public API
  version: 1.0.0
  description: >
    The Every public API. Keys are issued per company and every response is
    scoped to the company

    that owns the calling key.


    Every response carries an `x-request-id` header, generated by Every for that
    request. Quote it

    when contacting support: it is the id the request is recorded under. A
    caller-supplied

    `x-request-id` is never echoed.
servers:
  - url: https://api.public.every.io/company
    description: Production
security:
  - apiKey: []
tags:
  - name: Company
    description: The company the calling key belongs to.
  - name: Vendors
    description: The people and businesses the company pays, and their W9 details.
  - name: Bank accounts
    description: A vendor's accounts at its own bank, the accounts payments are paid into.
  - name: Payments
    description: >-
      ACH payments from the company's Every account to a vendor, and where they
      are.
  - name: Reference data
    description: The categories and departments a payment is filed under.
paths:
  /v1/vendors/{vendorId}/bank-accounts:
    post:
      tags:
        - Bank accounts
      summary: Add a bank account to a vendor
      description: >
        Attaches a US bank account to one of the calling company's vendors, so
        that

        `POST /v1/payments` can pay into it.


        Only ACH accounts are supported, which is why `type` accepts `ach` alone
        — it is the rail

        payments created through this API go out on. An account added here is
        never made the vendor's

        default: every payment names the account it pays into.


        There is no update endpoint. Correcting an account means creating the
        new one and deleting the

        old one.


        `idempotency_key` is required. Repeating a request with a key already
        used answers `409` with

        the account the first request created, instead of attaching a second one
        to the vendor. Keys

        are scoped to the vendor in the path: the same key under another vendor
        is a new request and

        creates an account there.
      operationId: createVendorBankAccount
      parameters:
        - name: vendorId
          in: path
          description: A vendor of the calling company, the one the account is attached to
          required: true
          schema:
            $ref: '#/components/schemas/Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBankAccountRequest'
      responses:
        '201':
          description: The account, attached to the vendor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccount'
        '400':
          description: >
            The account cannot be created. Among the causes: a `routing_number`
            that is not nine

            digits or whose check digit does not match, an `account_number` that
            is not up to 17

            digits, a company whose Every banking is not yet set up, a missing
            `idempotency_key`, and

            account details the bank itself refused — the message says which.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: The vendor was not found for this company
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >
            This `idempotency_key` has already been used, so no second account
            was attached to the

            vendor. The body is the account the original request created — or,
            while that request is

            still running or when it stopped without recording what it did, an
            error saying so.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/BankAccount'
                  - $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/UnexpectedError'
components:
  schemas:
    Id:
      type: string
      format: uuid
    CreateBankAccountRequest:
      type: object
      additionalProperties: false
      required:
        - type
        - bank_name
        - routing_number
        - account_number
        - account_type
        - idempotency_key
      properties:
        idempotency_key:
          type: string
          minLength: 1
          description: Caller-chosen key that makes a retry of this request safe.
        type:
          type: string
          description: >-
            The rail the account is paid over. `ach` is the only value this
            version accepts: ACH is the only rail payments created through this
            API go out on.
          enum:
            - ach
        bank_name:
          type: string
          minLength: 1
          description: The name of the bank holding the account.
        routing_number:
          type: string
          pattern: ^[0-9]{9}$
          description: >-
            The account's ABA routing number. Nine digits, and refused when its
            check digit does not match — which is what catches most mistyped
            numbers before the bank is asked.
        account_number:
          type: string
          pattern: ^[0-9]{1,17}$
          description: The account number at that bank, up to 17 digits.
        account_type:
          type: string
          enum:
            - checking
            - savings
    BankAccount:
      description: >-
        An external bank account of a vendor: the account at the vendor's own
        bank that Every pays it into. Not an Every account of the calling
        company.
      type: object
      required:
        - id
        - vendor_id
        - type
        - is_default
        - created_at
      properties:
        id:
          $ref: '#/components/schemas/Id'
        vendor_id:
          $ref: '#/components/schemas/Id'
        type:
          $ref: '#/components/schemas/BankAccountType'
        is_default:
          description: >-
            Whether the Every dashboard pays this vendor into this account
            unless told otherwise. A payment created through this API always
            names its account.
          type: boolean
        created_at:
          description: The date the account was attached to the vendor
          type: string
          format: date
    Error:
      type: object
      properties:
        message:
          type: string
        errors:
          type: array
          items:
            type: object
    BankAccountType:
      description: >-
        The rail the account is paid over. `ach` is the only type an account
        created through this API has, and the only one `POST /v1/payments` can
        pay into; the others appear on accounts added in the Every dashboard.
        The single-account endpoint reports bank fields for `ach` and `wire`
        accounts and `null` for the rest.
      type: string
      enum:
        - ach
        - wire
        - check
        - international
      example: ach
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The `x-api-key` header is missing, or the key is unknown, revoked, or
        not enabled for this API. The body is `{"message":"Forbidden"}`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnexpectedError:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.