Groups
Create, read, update, and delete contact groups.
Organize your audience: create groups, manage their members, and use them as campaign audiences.
All group endpoints require a Full access key.
List groups
/v1/groupsfull accessReturns every group in the project with its member ids and count, newest first.
curl https://mailer123.com/api/v1/groups \
-H "Authorization: Bearer m123_your_api_key"{ "data": [ { "id": "...", "name": "Beta testers", "contactIds": ["..."], "contactCount": 1 } ] }Create a group
/v1/groupsfull accessMembers come from contact ids and/or emails (matched to existing contacts). At least one source must resolve to a contact — empty groups aren't allowed.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | required | Group name. Must be unique within the project. |
contact_ids | string[] | optional | Member contact ids. |
emails | string[] | optional | Member emails, matched to existing contacts. |
curl -X POST https://mailer123.com/api/v1/groups \
-H "Authorization: Bearer m123_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "name": "Beta testers", "emails": ["ada@example.com"] }'HTTP/1.1 201 Created
{ "data": { "id": "...", "name": "Beta testers", "contactIds": ["..."], "contactCount": 1 } }Retrieve a group
/v1/groups/{id}full accessReturns one group by id with its resolved members, or 404 not_found.
memberCount is the number of member ids stored on the group; contacts lists
the members that still exist.
{ "data": { "id": "...", "name": "Beta testers", "memberCount": 1, "contacts": [ { "id": "...", "email": "ada@example.com", "name": "Ada Lovelace" } ] } }Update a group
/v1/groups/{id}full accessPartial update — send only the fields you want to change. contact_ids
replaces the entire member list; omit it to leave membership untouched. A
group must always keep at least one member.
| Field | Type | Description |
|---|---|---|
name | string | New group name (deduped against your other groups). |
contact_ids | string[] | New full member list, replacing the existing members. |
curl -X PATCH https://mailer123.com/api/v1/groups/GROUP_ID \
-H "Authorization: Bearer m123_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "name": "Beta testers (2026)" }'Add contacts to a group
/v1/groups/{id}/contactsfull accessAdd members incrementally without replacing the existing list. Accepts contact
ids and/or emails; contacts already in the group are not duplicated. matched
is how many of the supplied contacts resolved to existing ones.
| Field | Type | Description |
|---|---|---|
contact_ids | string[] | Contact ids to add. |
emails | string[] | Emails to add, matched to existing contacts. |
curl -X POST https://mailer123.com/api/v1/groups/GROUP_ID/contacts \
-H "Authorization: Bearer m123_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "emails": ["grace@example.com"] }'{ "data": { "id": "...", "name": "Beta testers", "memberCount": 2, "contacts": [ ... ] }, "matched": 1 }Delete a group
/v1/groups/{id}full accessPermanently delete a group. The contacts themselves are not deleted, only the
grouping. Returns { "deleted": true }.
Errors
insufficient_scope (403 — sending-only key), validation_error (400 — no
members resolved or empty update), conflict (409 — duplicate group name),
not_found (404). See the error reference.