# Create a Group

Create a new contact group in your address book. Groups (also referred to as mailing lists) can be used as recipients when sending batch, template, or campaign-based messages.

### <mark style="color:green;">`POST`</mark> `/addressbook/groups`&#x20;

#### Required Permission

```
create:Groups
```

Your API key must have this permission enabled in order to use this endpoint.

### Example Request

```bash
curl --location 'https://<hostname>/addressbook/groups' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data-urlencode 'name=test1'
```

Replace `YOUR_API_KEY` with your API key.

{% hint style="info" %}
All endpoints shown in this documentation use a **sample base URL**. The production API endpoint is provided by our team upon request.
{% endhint %}

### Request Parameters

#### Body Parameters

| Field | Type   | Required | Description                                                         |
| ----- | ------ | -------- | ------------------------------------------------------------------- |
| name  | string | Yes      | Name of the contact group. Must be unique within your address book. |

### Responses

#### Success (HTTP 200)

Returned when the group is successfully created.

```json
{
  "success": true,
  "record": {
    "id": "3392287d-7a79-4789-9ef8-7dc174836688",
    "name": "test1",
    "created_on": "2025-11-10T21:30:45.000Z"
  }
}
```

#### Validation Error (HTTP 400)

Returned when the request is invalid, such as when the group name is missing or already exists.

```json
{
  "success": false,
  "error": {
    "name": "ValidationError",
    "statusCode": 400,
    "message": "Group name already exists"
  }
}
```
