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

# List accounts

> List every account the authenticated user can access

`GET /api/v2/accounts`

Returns active organization containers and accounts the authenticated user can select. Add `includeArchived=true` on the account-management screen to include archived child accounts so an administrator can restore them. Archived accounts cannot be selected until restored.

## Request

```bash curl theme={null}
curl "https://api.apostra.com/api/v2/accounts?includeArchived=true" \
  -H "Authorization: Bearer $SCOPE3_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `includeArchived` | boolean | No | Defaults to `false`. Set to `true` for the management list that includes lifecycle-archived child accounts. |

Accounts include the authenticated user's memberships. When an organization
administrator requests the management view with `includeArchived=true`, the
result also includes that organization's direct child accounts even when the
administrator has no separate membership on a child. Those rows omit `role`.

## Response

```json theme={null}
{
  "accounts": [
    {
      "id": 100,
      "company": "Acme Inc",
      "name": "Acme",
      "role": "ADMIN",
      "accountType": null,
      "customerType": "PARENT",
      "parentId": null,
      "active": true,
      "status": "ACTIVE",
      "archivedAt": null
    },
    {
      "id": 205,
      "company": "Acme Retail",
      "name": "Acme Retail",
      "accountType": "BUYER",
      "customerType": "CHILD",
      "parentId": 100,
      "active": false,
      "status": "ARCHIVED",
      "archivedAt": "2026-09-25T12:00:00.000Z"
    }
  ]
}
```

| Field | Type | Notes |
| - | - | - |
| `accounts` | array | Accounts the user has access to |
| `accounts[].id` | integer | Account ID |
| `accounts[].company` | string | Company name |
| `accounts[].name` | string | Display name |
| `accounts[].role` | string, optional | User role on this account (`MEMBER`, `ADMIN`, `SUPER_ADMIN`). Omitted when a parent administrator has no separate child membership |
| `accounts[].accountType` | string \| null | `BUYER` or `SELLER`; `null` for an organization container |
| `accounts[].customerType` | string | `STANDALONE`, `PARENT`, or `CHILD` |
| `accounts[].parentId` | integer \| null | Parent organization ID for a child account |
| `accounts[].active` | boolean | Whether the account can be selected and used |
| `accounts[].status` | string | `ACTIVE` or `ARCHIVED` |
| `accounts[].archivedAt` | string \| null | Time of the most recent archive |

## Errors

* `401 UNAUTHORIZED` — missing or invalid bearer token.

See [Errors](/v2/reference/errors) for the full error contract.

## Related

<CardGroup cols={2}>
  <Card title="Account tasks" href="/v2/buyer/account/tasks" icon="list-check">
    All account operations
  </Card>

  <Card title="Get current account" href="/v2/buyer/account/tasks/get-current-account" icon="circle-user">
    Your current context
  </Card>
</CardGroup>


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