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

# Account

> Your current account context, the accounts under your organization, membership access, and notification preferences

An **account** is the entity the authenticated user is operating as. Every buyer request runs in the context of one account, identified by a numeric `id` and carrying a `role` (`MEMBER`, `ADMIN`, or `SUPER_ADMIN`) that gates what the caller can do. A user can belong to several accounts; the account API lets you read the current context, list the accounts you can access, and switch your integration between them.

Accounts can form an **organization/account hierarchy**. An `ADMIN` can spin up accounts under an organization (creating the organization on the fly if the account was standalone), set each account's registered `customerDomain`, and configure **membership**. A verified primary-domain request to a top-level organization auto-joins as ordinary member access by default; admins can opt out. Child accounts remain opt-in, so organization membership never grants access to every account beneath it. Separately, each user manages their own **notification preferences** — the set of event types and channels (`email`, `in_app`) they opt into.

## Key concepts

| Concept                  | Description                                                                                                                    |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| Current account          | The account context the request authenticates as — `id`, `company`, `name`, `role`, `customerDomain`                           |
| Organization             | The top-level entity in the hierarchy; only accounts created under an organization can be deleted                              |
| `customerDomain`         | The account's registered domain; required before domain auto-join can be enabled                                               |
| Membership               | Per-account access settings, notably `allowDomainAutoJoin`; defaults on for top-level organizations and off for child accounts |
| Notification preferences | Per-user opt-ins of `notificationType` × `channel`                                                                             |
| Role                     | `MEMBER`, `ADMIN`, or `SUPER_ADMIN`; admin-only operations require `ADMIN` on the target account                               |

## Task reference

<CardGroup cols={2}>
  <Card title="Get current account" href="/v2/buyer/account/tasks/get-current-account" icon="circle-user">
    `GET /accounts/current` — your current context
  </Card>

  <Card title="List accounts" href="/v2/buyer/account/tasks/list-customer-accounts" icon="list">
    `GET /accounts` — accounts you can access
  </Card>

  <Card title="Create account" href="/v2/buyer/account/tasks/create-child-account" icon="plus">
    `POST /accounts/create-child` — add an account under your organization
  </Card>

  <Card title="Update account domain" href="/v2/buyer/account/tasks/update-customer-domain" icon="globe">
    `PATCH /accounts/:customerId/domain` — set the registered domain
  </Card>

  <Card title="Delete account" href="/v2/buyer/account/tasks/delete-child-account" icon="trash">
    `DELETE /accounts/:customerId` — remove an account from your organization
  </Card>

  <Card title="Get membership" href="/v2/buyer/account/tasks/get-membership" icon="users">
    `GET /accounts/:customerId/membership` — read access settings
  </Card>

  <Card title="Update membership" href="/v2/buyer/account/tasks/update-membership" icon="user-gear">
    `PATCH /accounts/:customerId/membership` — toggle domain auto-join
  </Card>

  <Card title="Get notification preferences" href="/v2/buyer/account/tasks/get-notification-preferences" icon="bell">
    `GET /notification-preferences` — your opt-ins
  </Card>

  <Card title="Update notification preferences" href="/v2/buyer/account/tasks/update-notification-preferences" icon="bell-concierge">
    `PUT /notification-preferences` — replace your opt-ins
  </Card>
</CardGroup>
