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

# Accounts & users

> Manage organizations, membership, roles, and alert subscribers.

These endpoints manage organizations (accounts), their members and roles, and the subscribers who receive incident alerts.

## Accounts

<Warning>
  Account creation and deletion are **platform-admin** operations (Cognito `Admins` group).
</Warning>

<ParamField path="POST /accounts">
  Creates an account and links users. Body `{ "account": "Acme", "users": ["a@acme.com"] }`. The first user becomes **owner**; additional users become **admin**.
</ParamField>

<ParamField path="GET /accounts">
  Returns accounts: `{ "accounts": [{ "id", "name", "active" }] }`.
</ParamField>

<ParamField path="DELETE /accounts">
  Deletes accounts by `account_id` or `account_ids`.
</ParamField>

## Users & membership

<ParamField path="GET /users">
  With no `account-id`, returns the caller's organizations and their role in each. With `?account-id={uuid}`, returns that org's members: `{ email, name, id, role }`.
</ParamField>

<ParamField path="POST /users?account-id={uuid}">
  Adds members. Body `{ "users": [{ "email": "b@acme.com", "role": "member" }] }`. Default role is **member**. Owners may assign any role; admins may not assign `owner`.
</ParamField>

<ParamField path="PATCH /users?account-id={uuid}">
  Changes roles. Body `{ "users": [{ "email": "b@acme.com", "role": "admin" }] }`. Only an owner may set `owner`; the last owner can't be demoted.
</ParamField>

<ParamField path="DELETE /users?account-id={uuid}">
  Removes members. The last owner can't be removed.
</ParamField>

<Note>
  Adding a member or changing a role sends an email notification to the affected person.
</Note>

## Subscribers (alert recipients)

<ParamField path="GET /subscribers?account-id={uuid}&vendor-list={listId}">
  Lists subscribers for a vendor list, with per-list verification state.
</ParamField>

<ParamField path="POST /subscribers?account-id={uuid}&vendor-list={listId}">
  Adds subscribers. Body `{ "subscriber-email": "alerts@acme.com" }`. A verified org member is confirmed immediately; anyone else gets a confirmation email first.
</ParamField>

<ParamField path="DELETE /subscribers?account-id={uuid}&vendor-list={listId}">
  Removes a subscriber from the list.
</ParamField>

Recipients can unsubscribe from any alert email via a one-click link, which respects their choice across future sends.
