Add numbers to a group
POST/api/v1/group/addNumbers
This endpoint lets you add contacts to your groups. Each number in numbers is added as a new contact: an existing contact with the same number is not updated or merged. Numbers that are invalid or blocked are skipped and not counted in the response. For larger sets of numbers, you can upload them in bulk using a CSV file.
Request
- application/json
- Body
- Request to add a new contact
Body
Contact information to add to the specified group.
- Array [
- ]
Provide the ID of the contact group that you want to add numbers to.
numbers object[]
Provide the contact information you want to add to the group. Each entry is added as a new contact, also when the group already has a contact with the same number.
The phone number of the contact, including the country code. Use the international format (e.g., +1234567890).
The first name of the contact.
The last name of the contact.
The raw CSV data containing contact information for bulk import.
Defines the header names in your CSV file, which should correspond to the contact fields.
Controls whether to remove existing contacts from the group before adding the new ones. Defaults to false, meaning existing contacts will be kept. It has no effect when testMode is true.
Enables test mode for this request, as a dry run: if set to true, nothing is added to the group and clearList doesn't empty it. The numbers are still validated, and the response tells you how many would be added: N numbers would be added to group (testmode).
{
"groupId": "aa26c157b79",
"numbers": [
{
"_number": "46701740610",
"Firstname": "John",
"Lastname": "Doe"
}
],
"testMode": true
}
Responses
- 200
- 400
- 401
The phone numbers were successfully added to the contact group.
Bad Request.
Unauthorized.