Create a new group
POST/api/v1/group/add
This endpoint allows you to create a new contact group (or list) and add custom fields to it. These custom fields can help you store additional information about your contacts, such as names, locations, or any other relevant details. The group name must be 1 to 50 bytes long. A field name must be 1 to 50 bytes long and can contain letters, digits, spaces, underscores (_) and hyphens (-). The name _number is reserved.
Request
- application/json
- Body
- Create a new group request
Body
Details for the new contact group.
- Array [
- ]
The name of the group you want to create. It must be 1 to 50 bytes long.
Activate test mode to simulate creating the group without actually saving it. The request is validated as usual and answers 200 with group not created in testmode, but without a groupId. This is useful for testing your API integration or previewing the group structure.
Controls whether automatic sign-off is enabled for the group. Defaults to true if not specified.
fields object[]
A list of custom fields defined for this group.
Specifies the type of data that the custom field will store. The allowed types are text for textual information, number for numerical values and date for dates.
The name or label of the custom field. It must be 1 to 50 bytes long and can contain letters, digits, spaces, underscores (_) and hyphens (-). _number is reserved.
{
"name": "Test group",
"testMode": true,
"fields": [
{
"type": "text",
"field": "Company"
},
{
"type": "text",
"field": "Customer number"
},
{
"type": "date",
"field": "Birthday"
}
]
}
Responses
- 200
- 400
- 401
The contact group was successfully created.
Bad Request.
Unauthorized.