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

# List accounts

> Returns the entity's accounts. Any internal Plaid account that isn't yet verified has its verification status refreshed from Plaid before the response is returned.




## OpenAPI

````yaml /openapi.json get /accounts
openapi: 3.0.3
info:
  title: Melio Payouts API
  version: '1.0'
  description: >
    Self-serve payouts API. Partners onboard an Entity, which is the business

    (organization plus owner, with the details required to be payment-eligible),

    then attach accounts (internal accounts and external accounts) and make

    payments.


    ## Resource ids


    Every resource has an opaque, prefixed id that is stable for the life of the
    resource:

    `ent_` (entity), `pay_` (payment), `acct_` (account, internal or external).

    Ids are Melio-issued; treat them as opaque strings and never parse or
    construct them. To

    attach your own identifier to a resource, use `externalId`.


    ## Pagination


    List endpoints are cursor-paginated and always return results newest-first

    (`createdAt` descending). The response envelope is:


    ```json

    { "data": [ /* resources */ ], "hasMore": true }

    ```


    Page through results with `limit` (1 to 50, default 50) plus a cursor:


    - `startingAfter=<id>`: return the page immediately **after** the given
    resource id
      (the next, older page). This is how you walk forward through a list.
    - `endingBefore=<id>`: return the page immediately **before** the given
    resource id
      (the previous, newer page).

    `startingAfter` and `endingBefore` are mutually exclusive. The cursor is a
    resource id

    you already received (e.g. the `id` of the last item on the current page),
    not an index.

    Keep requesting the next page until `hasMore` is `false`.


    ## Filtering & sorting


    Ordering is fixed (newest-first); there is no `sortBy`. To narrow a list,
    filter it.

    Each list endpoint documents its own filter parameters (there is no generic
    query

    language). Date-range filters use bracket suffixes and accept RFC 3339
    timestamps:

    `created[gte]`, `created[lte]`. Filter by your own identifier with
    `externalId`, and

    by metadata with `metadata[<key>]=<value>` (matches resources whose metadata
    contains

    every supplied key/value pair). Filters combine with AND and compose with
    pagination.


    ## External ids


    Every created resource accepts an optional `externalId`, your own unique
    identifier for

    the resource (≤255 chars, letters/digits/`-`/`_`). It is unique per partner
    per resource

    type: reusing one returns `409 DUPLICATE_EXTERNAL_ID`. Use it to correlate
    Melio resources

    with records in your system and to look resources up (`?externalId=`)
    without storing

    Melio ids. `externalId` identifies a *resource*; it is not a
    request-deduplication key

    (that is the `Idempotency-Key` header, below); the two are complementary.


    ## Idempotency


    Send an `Idempotency-Key` header on every create so retries are safe: the
    original response

    is replayed instead of creating a second resource. It is required on `POST
    /payments`.


    ## Metadata


    Most resources accept a `metadata` object: free-form string key/value pairs
    that Melio

    stores and returns verbatim but never interprets. Limits: up to 50 keys, key
    ≤40 chars,

    value ≤100 chars. Use it to stash your own structured context on a resource;
    it is also

    filterable (see above).


    ## Melio Sonar Session Token


    Write endpoints optionally accept a `Melio-Sonar-Token` header: a signed
    session token

    minted by the MelioSonar SDK on the end user's device, carrying device
    signals used for

    risk evaluation. Omit it when no SDK session is available.
  contact:
    name: Melio Platform External API
    email: platform@melio.com
servers:
  - description: Production
    url: https://api.melio.com/v2
  - description: Staging01
    url: https://api.staging01.melio.com/v2
security: []
tags:
  - name: Entities
    description: >-
      A business you onboard and operate on behalf of: its profile, compliance
      details, and per-operation limitations.
  - name: Accounts
    description: Accounts the entity pays from (internal) and payees it pays to (external).
  - name: Payments
    description: >-
      Money moved from an internal account to an external account, and their
      lifecycle.
  - name: Tools
    description: >-
      Pre-flight calculators for fees, fast-payment eligibility, and delivery
      estimates. No resource is created.
  - name: Webhooks
    description: >-
      Your single endpoint for event notifications, and the events you can
      subscribe to.
paths:
  /accounts:
    parameters:
      - $ref: '#/components/parameters/MelioEntityId'
    get:
      tags:
        - Accounts
      summary: List accounts
      description: >
        Returns the entity's accounts. Any internal Plaid account that isn't yet
        verified has its verification status refreshed from Plaid before the
        response is returned.
      parameters:
        - name: ownershipType
          in: query
          required: false
          schema:
            type: string
            enum:
              - internal
              - external
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum:
              - ach
              - check
              - card
              - domestic-wire
              - virtual-card
        - name: externalId
          in: query
          required: false
          description: Return only the account whose `externalId` matches (your own id).
          schema:
            type: string
        - name: metadata
          in: query
          required: false
          style: deepObject
          explode: true
          description: >
            Filter by metadata key/value pairs, e.g. `metadata[ledgerId]=L-9`.
            Matches accounts whose metadata contains every supplied pair.
          schema:
            type: object
            additionalProperties:
              type: string
      responses:
        '200':
          description: Accounts.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Account'
              example:
                data:
                  - id: acct_9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
                    ownershipType: external
                    type: ach
                    counterPartyName: Globex Manufacturing
                    counterPartyEmail: ap@globex.example.com
                    bankAccount:
                      accountType: checking
                      routingNumber: '111000025'
                      accountNumberLast4: '4321'
                    createdAt: '2026-07-08T15:05:00Z'
                    updatedAt: '2026-07-08T15:05:00Z'
                  - id: acct_8be01c32-9378-4aad-9f0d-229e4454259c
                    ownershipType: external
                    type: check
                    counterPartyName: Initech
                    counterPartyEmail: ap@initech.example.com
                    paperCheck:
                      printName: Initech
                      address:
                        line1: 500 Market St
                        city: San Francisco
                        state: CA
                        postalCode: '94105'
                    createdAt: '2026-07-08T15:05:15Z'
                    updatedAt: '2026-07-08T15:05:15Z'
      security:
        - ApiKey: []
components:
  parameters:
    MelioEntityId:
      name: Melio-Entity-Id
      in: header
      required: true
      description: >-
        Entity the request operates on — an entity id (`ent_<uuid>`) or `me`
        (the partner's sole entity).
      schema:
        type: string
  schemas:
    Account:
      type: object
      properties:
        id:
          type: string
          description: Opaque account id (acct_<id>)
        externalId:
          $ref: '#/components/schemas/ExternalId'
        metadata:
          $ref: '#/components/schemas/Metadata'
        ownershipType:
          type: string
          enum:
            - internal
            - external
        type:
          type: string
          enum:
            - ach
            - check
            - card
            - domestic-wire
            - virtual-card
          description: Plaid-backed internal accounts are returned as ach.
        nickname:
          type: string
          description: Present for internal accounts.
        counterPartyName:
          type: string
          description: Present for external accounts.
        counterPartyEmail:
          type: string
          description: Counterparty (payee) email. Present for external accounts.
        isVerified:
          type: boolean
          description: >
            Present for internal accounts. For ach, `false` while micro-deposit
            verification is outstanding and `true` once it completes. Absent for
            external accounts, where verification does not apply.
        bankAccount:
          type: object
          description: Present when type=ach.
          properties:
            accountType:
              type: string
              enum:
                - checking
                - savings
            routingNumber:
              type: string
            accountNumberLast4:
              type: string
        card:
          type: object
          description: Present when type=card.
          properties:
            lastFourDigits:
              type: string
            network:
              type: string
            expiration:
              type: string
              description: MM/YY
        paperCheck:
          type: object
          description: Present when type=check.
          properties:
            printName:
              type: string
            address:
              $ref: '#/components/schemas/AddressResponse'
        domesticWire:
          type: object
          description: Present when type=domestic-wire.
          properties:
            routingNumber:
              type: string
              description: ABA routing number of the receiving bank
            accountNumberLast4:
              type: string
            address:
              $ref: '#/components/schemas/AddressResponse'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ExternalId:
      type: string
      description: >
        Your own unique identifier for the resource. Unique per partner per
        resource type (reusing one returns 409 DUPLICATE_EXTERNAL_ID). Distinct
        from the Idempotency-Key header, which dedupes the request rather than
        identifying the resource.
      maxLength: 255
      pattern: ^[A-Za-z0-9_-]+$
    Metadata:
      type: object
      description: >
        Free-form string key/value pairs stored and returned verbatim, never
        interpreted by Melio. Up to 50 keys; each key 1 to 40 chars and may not
        contain square brackets (`[` `]`, reserved for the `metadata[key]`
        filter); value ≤100 chars. Filterable via `metadata[key]`.
      additionalProperties:
        type: string
        maxLength: 100
      maxProperties: 50
    AddressResponse:
      type: object
      description: >-
        Address as returned in responses; fields may be absent when the stored
        record is incomplete.
      properties:
        line1:
          type: string
        line2:
          type: string
        city:
          type: string
        state:
          type: string
        postalCode:
          type: string
        aptNumber:
          type: string
        countryCode:
          type: string
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: api-key

````