# Creating an account group

After you have created the user, you can set up the parent account group as follows:

**POST** [`/account_groups`](/api/account-groups/create_account_group)

This request accepts two parameters in its body:

| Parameter | Description |
|  --- | --- |
| `user_id` | **Required**: The ID of the user to be associated with this account group. |
| `type` | **Required**: Possible values are  - `PERSONAL`: Account group of a person who holds assets in their own name. - `LEGAL_ENTITY`: Account group of a legal entity that holds assets in the name of its users. - `FRENCH_PEA`: Account group of a person who holds assets in their own name in the Plan d'Épargne en Actions, a tax-efficient investment wrapper for residents of France. We support one FRENCH_PEA account group per user. - `ISA`: Account group for UK residents holding assets in an Individual Savings Account (ISA).Visit the ISA Integration Guide for more information. - `Child`: Account group for a child user holding assets in a child account. Visit the Child Accounts Guide for more information. |


**Example**

Example request

```json
{
  "user_id": "413715f2-5401-4b97-8055-034a6b879f8c",
  "type": "PERSONAL",
  "securities_account_number": "12345689"
}
```

Example response

```json
{
  "id": "9d95820d-4333-46b6-98de-04ab7512e76f",
  "created_at": "2020-08-24T14:15:22Z",
  "updated_at": "2020-08-24T14:15:22Z",
  "type": "PERSONAL",
  "status": "ACTIVE",
  "users": [
    {
      "id": "413715f2-5401-4b97-8055-034a6b879f8c",
      "type": "OWNER"
    }
  ],
  "securities_account_number": "123456789"
}
```

In the response to this request, you will receive an account group ID, which is needed to [create an account](/products/byol/guides/accounts/accounts_create_accounts) and to take further actions on the account group itself.

## Account group status

The [response](/api/account-groups/create_account_group) to the request to create an account group, contains status field.

The following statuses can apply to an account group:

| Status | Description |
|  --- | --- |
| `PENDING_APPROVAL` | Account group approval is pending - the account group is visible via our API but cannot be acted on. |
| `ACTIVE` | Account group is active - full functionality of the Investment API is accessible. |
| `LOCKED` | Account group is locked for all actions. |
| `CLOSING` | Account group is closing. |
| `CLOSED` | Account group is closed. |


In Bring Your Own License setups, the status should move directly to `ACTIVE`.

## Webhooks

You will also receive the following webooks notifying you of the key events in account group creation and acitivation:

- [Account group created event](/api/account-groups/account_group_event).
- [Account group activated event](/api/account-groups/account_group_event).


## Listing account groups

You can list all account groups of a specific user with

- **GET** [`/users/{user_ID}/account_groups`](/api/account-groups/list_account_groups)


All account groups can be listed with

- **GET** [`/account_groups`](/api/account-groups/list_account_groups)


## Next steps

After successfully creating the account group, you can now dedicate yourself to [creating an account](/products/byol/guides/accounts/accounts_create_accounts).