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

# List all Accounts

export const ExpandableFieldsQueryParams = (resource_type = 'all') => {
  const entity = [{
    name: 'connect',
    description: <>This is an <a href="/reference/entities/overview">Entity</a> property, and refers to the <a href="/reference/entities/connect/overview#connect-objects">Connect Object</a>.</>
  }, {
    name: 'credit_score',
    description: <>This is an <a href="/reference/entities/overview">Entity</a> property, and refers to the <a href="/reference/entities/credit-scores/overview#creditscore-objects">CreditScore Object</a>.</>
  }, {
    name: 'attribute',
    description: <>This is an <a href="/reference/entities/overview">Entity</a> property, and refers to the <a href="/reference/entities/attributes/overview#attribute-objects">Attribute Object</a>.</>
  }, {
    name: 'vehicle',
    description: <>This is an <a href="/reference/entities/overview">Entity</a> property, and refers to the <a href="/reference/entities/vehicles/overview#vehicle-objects">Vehicle Object</a>.</>
  }, {
    name: 'identity_latest_verification_session',
    description: <>This is an <a href="/reference/entities/overview">Entity</a> property, and refers to the <a href="/reference/entities/verification-sessions/overview#entity-verification-session-objects">EntityVerificationSession Object</a>.</>
  }, {
    name: 'phone_latest_verification_session',
    description: <>This is an <a href="/reference/entities/overview">Entity</a> property, and refers to the <a href="/reference/entities/verification-sessions/overview#entity-verification-session-objects">EntityVerificationSession Object</a>.</>
  }];
  const account = [{
    name: 'sensitive',
    description: <>This is an <a href="/reference/accounts/overview">Account</a> property, and refers to the <a href="/reference/accounts/sensitive/overview#sensitive-objects">Sensitive Object</a>.</>
  }, {
    name: 'balance',
    description: <>This is an <a href="/reference/accounts/overview">Account</a> property, and refers to the <a href="/reference/accounts/balances/overview#balances-objects">Balance Object</a>.</>
  }, {
    name: 'card_brand',
    description: <>This is an <a href="/reference/accounts/overview">Account</a> property, and refers to the <a href="/reference/accounts/card-brands/overview#cardbrand-objects">CardBrand Object</a>.</>
  }, {
    name: 'attribute',
    description: <>This is an <a href="/reference/accounts/overview">Account</a> property, and refers to the <a href="/reference/accounts/attributes/overview#attribute-objects">Attribute Object</a>.</>
  }, {
    name: 'payoff',
    description: <>This is an <a href="/reference/accounts/overview">Account</a> property, and refers to the <a href="/reference/accounts/payoffs/overview#payoff-objects">Payoff Object</a>.</>
  }, {
    name: 'transaction',
    description: <>This is an <a href="/reference/accounts/overview">Account</a> property, and refers to the <a href="/reference/accounts/transactions/overview#transaction-objects">Transaction Object</a>.</>
  }, {
    name: 'update',
    description: <>This is an <a href="/reference/accounts/overview">Account</a> property, and refers to the <a href="/reference/accounts/updates/overview#update-objects">Update Object</a>.</>
  }, {
    name: 'payment_instrument',
    description: <>This is an <a href="/reference/accounts/overview">Account</a> property, and refers to the <a href="/reference/accounts/payment-instruments/overview#paymentinstrument-objects">PaymentInstrument Object</a>.</>
  }, {
    name: 'latest_verification_session',
    description: <>This is an <a href="/reference/accounts/overview">Account</a> property, and refers to the <a href="/reference/accounts/verification-sessions/overview#accountverificationsession-objects">AccountVerificationSession Object</a>.</>
  }, {
    name: 'liability.mch_id',
    description: <>This is an <a href="/reference/accounts/overview">Account</a> property, and refers to the <a href="/reference/merchants/overview">Merchant Object</a>.</>
  }];
  const ExpandableFieldsByResourceType = {
    entity,
    account,
    all: Array.from(new Set([...entity, ...account]))
  };
  return {
    name: "expand",
    type: "enum[]",
    description: <>
      Attributes that can be expanded into an object to
      provide additional information.
      </>,
    enums: [...ExpandableFieldsByResourceType[resource_type].map(expandable_field => ({
      ...expandable_field
    }))]
  };
};

export const get_common_parameters = (resource_name = 'resource') => {
  return {
    id: {
      name: 'id',
      type: "string",
      required: false,
      description: `Unique identifier for the ${resource_name}.`
    },
    entity_id: {
      name: 'entity_id',
      type: 'string',
      required: false,
      description: 'The ID of the associated Entity.'
    },
    account_id: {
      name: 'account_id',
      type: 'string',
      required: false,
      description: 'The ID of the associated Account.'
    },
    error: {
      name: 'error',
      type: 'object | null',
      required: false,
      description: <>
          An object representing an error that occurred while processing
          this {resource_name}. See <a href={`/reference/errors/${resource_name.replace(/^([A-Z])/, function (match) {
        return match.toLowerCase();
      }).replace(/([A-Z])/g, function (match) {
        return "-" + match.toLowerCase();
      })}-errors`}>{resource_name} errors</a>.
        </>
    },
    status_error: {
      name: 'status_error',
      type: 'object | null',
      required: false,
      description: <>
          An object representing an error that occurred while processing
          this {resource_name}. See <a href="/reference/errors/product-errors#status-errors">{resource_name} errors</a>.
        </>
    },
    metadata: {
      name: 'metadata',
      type: 'object | null',
      required: false,
      description: <>
          Additional data provided during creation.
          See <a href="/reference/metadata">metadata</a>
        </>
    },
    created_at: {
      name: 'created_at',
      type: 'string',
      required: false,
      description: `Timestamp of when the ${resource_name} was created.`
    },
    updated_at: {
      name: 'updated_at',
      type: 'string',
      required: false,
      description: `Timestamp of when the ${resource_name} was last updated.`
    },
    status: (enums = []) => ({
      name: 'status',
      type: 'enum',
      required: false,
      description: `Status of the ${resource_name}.`,
      enums
    }),
    type: (enums = []) => ({
      name: 'type',
      type: 'enum',
      required: false,
      description: `The type of ${resource_name}.`,
      enums
    })
  };
};

export const get_pagination_defaults = (resource_name = 'records') => [{
  name: 'from_date',
  type: 'string',
  required: false,
  description: `ISO 8601 formatted date (YYYY-MM-DD) to filter for ${resource_name} created on or after the date provided.`
}, {
  name: 'to_date',
  type: 'string',
  required: false,
  description: `ISO 8601 formatted date (YYYY-MM-DD) to filter for ${resource_name} created on or before the date provided.`
}, {
  name: 'page',
  type: 'string',
  required: false,
  description: `The page number to return.`
}, {
  name: 'page_cursor',
  type: 'string',
  required: false,
  description: <>
        The ID of a resource from which a page should start or end. Mutually exclusive with <code>page</code>.
      </>
}, {
  name: 'page_limit',
  type: 'string',
  required: false,
  description: `The number of ${resource_name} to return per page. Default and maximum is 100.`
}];

export const ParamList = ({items = [], is_child = false}) => {
  return items.map(item => {
    const field_props = {
      id: Math.random().toString(),
      body: item.name,
      name: item.name,
      type: item.type,
      required: item.required
    };
    const enums = item.enums || [];
    const items = item.items || [];
    const has_items = items?.length > 0;
    const has_enums = enums?.length > 0;
    const should_default_open = item.defaultOpen || false;
    const render_child_item = () => {
      const child_props = {
        title: has_enums ? "Possible enum values" : "properties"
      };
      if (should_default_open) child_props.defaultOpen = true;
      const has_inline_enums = has_enums && enums.every(enum_item => typeof enum_item === 'string') && enums.map((enum_item, idx) => {
        const is_last = idx === enums.length - 1;
        const is_2nd_to_last = idx === enums.length - 2;
        return <>
            <code>{enum_item}</code>
            {is_last && ''}
            {is_2nd_to_last && ' or '}
            {!is_last && !is_2nd_to_last && ', '}
          </>;
      });
      const enum_list = has_enums && !has_inline_enums && <Accordion {...child_props}>
          {enums.map((enum_item, index) => <div key={`enum-${index}`}>
              <code>{enum_item.name}</code>
              <br />
              <p>{enum_item.description}</p>
            </div>)}
        </Accordion>;
      const item_list = has_items && <Expandable {...child_props}>
          <ParamList items={items || []} is_child />
        </Expandable>;
      return <>
          <p>
            {item.description}
            {has_inline_enums && [has_inline_enums.length > 1 ? ' One of ' : ' Must be ', ...has_inline_enums]}
          </p>

          {enum_list}
          {item_list}
        </>;
    };
    return is_child ? <ResponseField {...field_props}>{render_child_item()}</ResponseField> : <ParamField {...field_props}>{render_child_item()}</ParamField>;
  });
};

Returns a list of Accounts.

## Query Parameters

<ParamList
  items={[
{
name: 'holder_id',
type: 'string',
required: false,
description: 'The ID of the Entity whose Accounts to retrieve.',
},
get_common_parameters('Account').status([
{ name: 'active', description: 'The Account is open and is in a usable state.' },
{
  name: 'disabled',
  description: (
    <>
      The Account has been disabled and is no longer usable. Check
      the account's <code>error</code> property for more information.
    </>
  ),
},
{ name: 'closed', description: 'The Account has been closed, and is either fully paid-off or no longer exists.' },
]),
get_common_parameters('Account').type([
{ name: 'ach', description: 'A bank account (Checking or Savings).' },
{ name: 'liability', description: 'A debt-type account (Credit Card, Mortgage, etc).' },
]),
{
name: 'liability.mch_id',
type: 'string',
description: 'The ID of the Merchant to which a liability Account is linked.',
},
{
name: 'liability.type',
type: 'enum',
description: (
  <>
    The type of the liability Account to
    retrieve. See <a href="/2026-03-30/reference/accounts/overview#account-liability-types">Account Liability Types.</a>
  </>
),
},
{
name: 'liability.sub_type',
type: 'enum',
description: (
  <>
    The sub-type of the liability Account to retrieve. See <a href="/2026-03-30/reference/accounts/overview#account-liability-sub-types">Account Liability Sub-Types.</a>
  </>
),
},
{
name: 'liability.ownership',
type: 'enum',
description: 'The holder\'s ownership type relative to the Account.',
enums: ['primary', 'authorized', 'joint', 'unknown'],
},
...get_pagination_defaults('Accounts'),
ExpandableFieldsQueryParams('account'),
]}
/>

## Returns

Returns a list of Accounts.

<RequestExample>
  ```bash cURL theme={null}
  curl "https://production.methodfi.com/accounts?holder_id=ent_y1a9e1fbnJ1f3&type=liability&status=active" \
    -H "Method-Version: 2026-03-30" \
    -H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc"
  ```

  ```javascript Node.js theme={null}
  const accounts = await method
    .accounts
    .list({
      holder_id: 'ent_y1a9e1fbnJ1f3',
      type: 'liability',
      status: 'active',
    });
  ```

  ```python Python theme={null}
  accounts = method
    .accounts
    .list({
      'holder_id': 'ent_y1a9e1fbnJ1f3',
      'type': 'liability',
      'status': 'active'
    })
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": [
      {
        "id": "acc_RGACQH7XdfYhC",
        "holder_id": "ent_y1a9e1fbnJ1f3",
        "status": "active",
        "type": "liability",
        "liability": {
          "mch_id": "mch_302086",
          "mask": "1580",
          "ownership": "primary",
          "fingerprint": "27d5c0ea28338619192076d150eb7b56c288f9a1",
          "type": "credit_card",
          "name": "Chase Sapphire Reserve Credit Card"
        },
        "latest_verification_session": "avf_tB9mpmew8FLit",
        "update": "upt_TXDTR7Amyz7Az",
        "balance": "bal_dGCCNWHMQYRay",
        "card_brand": "crd_eVMDNUPfrFk3e",
        "payment_instrument": "pmt_inst_pd788hPVhLT37",
        "products": ["balance", "card_brand", "update", "payment", "payment_instrument.card", "payment_instrument.network_token", "payment_instrument.inbound_achwire_payment"],
        "restricted_products": ["attribute", "sensitive"],
        "subscriptions": [],
        "available_subscriptions": ["update.snapshot", "update"],
        "restricted_subscriptions": ["transaction"],
        "error": null,
        "metadata": null,
        "created_at": "2024-04-12T18:57:57.857Z",
        "updated_at": "2024-04-12T18:57:58.430Z"
      }
    ]
  }
  ```
</ResponseExample>
