Create a group
curl https://www.chatrail.dev/v1/connections/sales/groups \
-H "Authorization: Bearer $CHATRAIL_API_KEY" -H "Content-Type: application/json" \
-d '{
"name": "Riverside viewings",
"participants": ["+447700900123", "+447700900456"]
}'The response is the group in full — id, name, settings and each member's role. Use the id to send to it as { "group": "…" }, and to manage it below.
Members, admins and settings
| Field | Type | Notes |
|---|---|---|
POST /{group}/participants | { action, participants } | add, remove, promote or demote. |
PATCH /{group} | name, description, … | messages_admins_only, info_admins_only. |
GET /{group}/invite | — | The chat.whatsapp.com link. |
POST /{group}/invite/revoke | — | Invalidate the link and get a new one. |
POST /{group}/leave | — | This number leaves. |
Changing settings or members needs this number to be an admin; if it is not, WhatsApp refuses and the API says so. Joins, leaves and role changes — yours or anyone's — arrive as group.participants_changed.
The member-add guardrail
Adding people who did not ask to be in a group is one of the quickest ways to get a number reported. So a connection can add at most 20 people per hour — founding members included — and the request that would pass it is refused with 429 and how many are left this hour, before WhatsApp is contacted. Removals and role changes are not counted. Invite links are the better route for a large group: people join because they chose to.