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

# Account groups

> List, create, read, update and delete the account groups you sort accounts into.

Account groups sort your accounts into sets, such as wholesale or retail customers. Here you list, create, read, update and delete them. This area has 5 endpoints, and every SDK supports all of them.

## At a glance

| Endpoint | Method | Path | What it does |
| - | - | - | - |
| [List account groups](https://exsited.mintlify.site/api-reference/account-groups/list-account-groups.md) | GET | `/settings/account_groups` | Lists your account groups, a page at a time. |
| [Create an account group](https://exsited.mintlify.site/api-reference/account-groups/create-an-account-group.md) | POST | `/settings/account_groups` | Creates an account group and returns it under `account_group`. |
| [Retrieve an account group](https://exsited.mintlify.site/api-reference/account-groups/retrieve-an-account-group.md) | GET | `/settings/account_groups/{account_group_id}` | Returns one account group, under `account_group`. |
| [Update an account group](https://exsited.mintlify.site/api-reference/account-groups/update-an-account-group.md) | PATCH | `/settings/account_groups/{account_group_id}` | Changes an account group's fields or its status. |
| [Delete an account group](https://exsited.mintlify.site/api-reference/account-groups/delete-an-account-group.md) | DELETE | `/settings/account_groups/{account_group_id}` | Deletes an account group that no account uses. |

## Before you call

Register your API credentials once when your app starts, as shown in
[Authentication](https://exsited.mintlify.site/authentication.md). Every SDK sample on these pages then gets its client in one line.
With cURL, send the access token in an `Authorization` header: `Authorization: Bearer $ACCESS_TOKEN`.

## Things to know

* **Each group's id starts with `ag_`.** List account groups returns each group's `id`.
* **`name` is required to create a group.** The new group comes back under `account_group`.
* **One group comes back under `account_group`; a listing comes back under `data`.** A listing also carries `pagination`; pass `pagination.next_cursor` as `cursor` while `has_more` is `true`.
* **Only a group no account uses can be deleted.**


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