Skip to main content

WhatsApp Groups

Create and manage WhatsApp groups, invite participants, handle join requests, and send group messages (templates and free-form text).

All group management requests use HTTP Basic Auth (api_key / api_token) and Content-Type: application/json.

Prerequisites​

RequirementDetail
WhatsApp Cloud API numberThe from number must be connected to Exotel on the WhatsApp Cloud API. Other setups are rejected (422 / 1033).
Official Business Account (OBA)The number must be a Meta Official Business Account (green tick). Otherwise create fails (422 / 1034).
Number ownershipThe from number must belong to your Exotel account (404 / 1021 otherwise).
Active account with KYCYour Exotel account must be active (403 / 1006 otherwise) with KYC completed (403 / 1007 otherwise).
WhatsApp Groups enabledGroups is enabled per Exotel account. Until it is enabled, Group API calls and group sends return 403 / 1038. Contact Exotel support to enable it.
Approved invite templateTo invite users by message, you need an approved template with a group-invite (group_id) body parameter.

Limits​

LimitValue
Groups per business number (not deleted)10,000
Group subject1–128 characters
Group descriptionUp to 2,048 characters
Invite recipients per invite request1–7 numbers
Participants removed per request1–8
Invite template.body_parametersUp to 20
Join requests approved/rejected per request1–100
Maximum participants per group8 (set by WhatsApp; see Meta Groups API)
List limit1–100 (default 25)

Response Format​

Every Group API response uses the same envelope. On success, response.data holds the result:

{
"request_id": "<exotel_request_id>",
"method": "POST",
"http_code": 200,
"response": {
"code": 200,
"error_data": null,
"status": "success",
"data": {}
}
}

On error, response.status is failure, data is omitted and error_data holds the error. error_data.message is the short error name; error_data.description gives the specific reason (for example which field failed validation, or WhatsApp's reason for 1003).

{
"request_id": "<exotel_request_id>",
"method": "GET",
"http_code": 404,
"response": {
"code": 404,
"error_data": {
"code": 1036,
"description": "Group not found",
"message": "Group not found"
},
"status": "failure"
}
}

See Error Codes for the full list.

Create Group​

Create a WhatsApp group owned by your business phone number. Creation is asynchronous: the API returns PENDING with Exotel's internal id. Keep that id to match the group in List results while it is pending.

When WhatsApp confirms the group, status becomes ACTIVE and a WhatsApp group_id (and invite link) become available. If WhatsApp rejects the create, or does not confirm it within about 30 minutes (rarely up to 24 hours), status becomes FAILED — create a new group (use a new Idempotency-Key).

POST /v2/accounts/{account_sid}/whatsapp/groups

Headers​

HeaderRequiredDescription
Idempotency-KeyOptionalUp to 128 characters. Retrying with the same key returns the group created by the first request (in its current status, which may already be ACTIVE) instead of creating a new one. Reusing a key with a different from or subject returns 409 / 1039.

Idempotency-Key​

Because create is asynchronous, callers often time out and retry. Always send an Idempotency-Key on create and reuse it on retries (timeouts, 502 / 1040, 5xx).

  • Same key + same from / subject → returns the original group (no duplicate Meta create).
  • Same key + different from or subject → 409 / 1039.
  • Retrying without the key after a timeout can create a second real group against your Meta quota.

Request Body​

{
"from": "+919876500001",
"subject": "Order updates",
"description": "Customer order notifications",
"join_approval_mode": "approval_required"
}

Parameters​

FieldRequiredDescription
fromMandatoryBusiness WhatsApp number that owns the group (with or without leading +)
subjectMandatoryGroup name. 1–128 characters after trimming spaces.
descriptionOptionalGroup description. Up to 2,048 characters.
join_approval_modeOptionalauto_approve (default when omitted) — anyone with the link joins directly; approval_required — you approve each join request.

Expected Response​

HTTPNotes
200Success. response.data.status is PENDING. response.data.id is Exotel's identifier — use it to match List results while pending.

response.data.request_id is WhatsApp's create request reference when Meta returns it in the create response. It may be absent if WhatsApp's answer was delayed; the group still completes in the background. Match on Exotel id when polling, not on request_id.

group_id and invite_link are not returned while the group is PENDING.

{
"request_id": "a3f1c2d4e5b64f7a8b9c0d1e2f3a4b5c",
"method": "POST",
"http_code": 200,
"response": {
"code": 200,
"error_data": null,
"status": "success",
"data": {
"id": 1042,
"request_id": "<whatsapp_request_id>",
"subject": "Order updates",
"description": "Customer order notifications",
"join_approval_mode": "approval_required",
"status": "PENDING",
"phone_number_id": "<phone_number_id>",
"waba_id": "<waba_id>"
}
}
}

If WhatsApp rejects the create outright, the create call itself returns an error and the group is stored as FAILED. A PENDING response means WhatsApp accepted the request, or did not answer in time; poll as below.

note

Poll List Groups with status=PENDING, status=ACTIVE and status=FAILED (one status per call) and match by id until the group is ACTIVE (then use group_id) or FAILED (stop and create again with a new Idempotency-Key). Do not call invite, invite-link, join-request, or send APIs that require group_id until the group is ACTIVE.

List Groups​

List your groups, oldest first (ascending id), one status at a time. Deleted groups are not listed.

GET /v2/accounts/{account_sid}/whatsapp/groups
GET /v2/accounts/{account_sid}/whatsapp/groups?status=ACTIVE
GET /v2/accounts/{account_sid}/whatsapp/groups?status=PENDING
GET /v2/accounts/{account_sid}/whatsapp/groups?status=FAILED

Query Parameters​

ParameterRequiredDescription
statusOptionalACTIVE (default), PENDING, or FAILED
fromOptionalFilter by business number (with or without +). Must belong to your account.
limitOptionalPage size, 1–100. Default 25. Values outside 1–100 return 400 / 1002.
afterOptionalCursor from the previous page's paging.after

Expected Response​

HTTPNotes
200Success. response.data.groups is an array of groups. paging is omitted on the last page.
4001002 — invalid status, from, limit or after cursor
4041021 — from number not in your account

Each item in groups has id, group_id, request_id, invite_link, subject, description, join_approval_mode, status, phone_number_id and waba_id. group_id and invite_link are returned only for ACTIVE groups. In rare cases a newly ACTIVE group has no link stored yet; call Get Invite Link to fetch it.

{
"request_id": "<exotel_request_id>",
"method": "GET",
"http_code": 200,
"response": {
"code": 200,
"error_data": null,
"status": "success",
"data": {
"groups": [
{
"id": 1042,
"group_id": "<group_id>",
"request_id": "<whatsapp_request_id>",
"invite_link": "https://chat.whatsapp.com/XXXXXXXXXXXX",
"subject": "Order updates",
"description": "Customer order notifications",
"join_approval_mode": "approval_required",
"status": "ACTIVE",
"phone_number_id": "<phone_number_id>",
"waba_id": "<waba_id>"
}
],
"paging": {
"after": "MTA0Mg"
}
}
}
}

List does not return why a group failed. If Create itself returned an error, that error is the reason. If the group failed later, WhatsApp's reason is in the errors of the group_create event (see Group Events).

Get Group​

Retrieve a single group by WhatsApp group_id, with live details from WhatsApp (current subject and description, participants, suspension state).

GET /v2/accounts/{account_sid}/whatsapp/groups/{group_id}

Path Parameters​

ParameterRequiredDescription
group_idMandatoryWhatsApp group ID returned when the group is ACTIVE

Expected Response​

HTTPNotes
200Success. response.data.status is ACTIVE for a live group.
404Unknown or deleted group (1036)
409Group exists but is not ACTIVE (1037)

response.data has the same fields as a List item, plus these details from WhatsApp:

FieldDescription
participantsArray of participants, each with wa_id. Omitted when the group has no participants.
suspendedtrue when WhatsApp has suspended the group for policy reasons. Sends to a suspended group fail (WhatsApp error 131207).
creation_timestampCreation time, Unix seconds (number)
total_participant_countNumber of participants (number)
{
"request_id": "<exotel_request_id>",
"method": "GET",
"http_code": 200,
"response": {
"code": 200,
"error_data": null,
"status": "success",
"data": {
"id": 1042,
"group_id": "<group_id>",
"request_id": "<whatsapp_request_id>",
"invite_link": "https://chat.whatsapp.com/XXXXXXXXXXXX",
"subject": "Order updates",
"description": "Customer order notifications",
"join_approval_mode": "approval_required",
"status": "ACTIVE",
"phone_number_id": "<phone_number_id>",
"waba_id": "<waba_id>",
"participants": [
{ "wa_id": "919876543210" },
{ "wa_id": "919811122233" }
],
"suspended": false,
"creation_timestamp": 1764487800,
"total_participant_count": 2
}
}
}

Send Group Invite​

Send an invite template (Meta library template with the group link) to one or more phone numbers, one message each. Invites are ordinary template messages: they are billed, reported and get status callbacks like any other template send.

POST /v2/accounts/{account_sid}/whatsapp/groups/{group_id}/invites

Request Body​

{
"from": "+919876500001",
"to": [
"+919876543210",
"+919811122233"
],
"template": {
"name": "group_invite_link_concise",
"language": "en",
"body_parameters": [
"Order updates",
"Acme"
],
"group_id_position": 3
}
}

Parameters​

FieldRequiredDescription
fromMandatoryThe business WhatsApp number that created the group (with or without leading +). Any other number is rejected (400 / 1002).
toMandatoryArray of 1–7 recipient phone numbers in E.164. Each must start with +; numbers without it are rejected.
template.nameMandatoryApproved invite template name
template.languageMandatoryTemplate language code (e.g. en)
template.body_parametersOptionalYour text substitutions for the template body, in order. Up to 20; values must not be empty. Omit when the template has no text parameters besides the group.
template.group_id_positionOptional1-based position, among all body parameters, of the group parameter that Exotel adds. Exotel adds a group_id parameter there and WhatsApp renders it as the group invite link. Must be between 1 and the number of body_parameters + 1. Default: last (after all body_parameters), as in Meta's library invite templates.
note

You may include or omit the leading + on from; Exotel normalizes it. Each to number must include the leading +.

Expected Response​

HTTPNotes
200Request processed. response.data.messages has one entry per recipient, in the same format as the Send Message API response. Check each entry's status: the request can succeed while an individual invite fails.
4291011 — messaging rate limit hit; invites were not sent
5021040 — messaging service unavailable; retry
{
"request_id": "<exotel_request_id>",
"method": "POST",
"http_code": 200,
"response": {
"code": 200,
"error_data": null,
"status": "success",
"data": {
"group_id": "<group_id>",
"messages": [
{
"code": 202,
"error_data": null,
"status": "success",
"data": { "sid": "<message_sid_1>" }
},
{
"code": 202,
"error_data": null,
"status": "success",
"data": { "sid": "<message_sid_2>" }
}
]
}
}
}

The total number of body parameters (your body_parameters plus the group parameter) must match the template's placeholders, or WhatsApp rejects the message.

note

Recipients must open the invite, join the group, and (for free-form messaging) post in the group to open the 24-hour customer care window.

Return the current WhatsApp invite link for the group (https://chat.whatsapp.com/...).

GET /v2/accounts/{account_sid}/whatsapp/groups/{group_id}/invite-link

Expected Response​

HTTPNotes
200Success. Response includes a https://chat.whatsapp.com/... link.

Invalidate the current invite link and issue a new one. Opening the old link shows that the invite link was reset.

POST /v2/accounts/{account_sid}/whatsapp/groups/{group_id}/invite-link

Expected Response​

HTTPNotes
200Success. A new https://chat.whatsapp.com/... link is returned.

List Join Requests​

List pending join requests for a group created with join_approval_mode: approval_required. Empty when the group is auto_approve, or when no one has requested to join yet.

GET /v2/accounts/{account_sid}/whatsapp/groups/{group_id}/join-requests

Query Parameters​

ParameterRequiredDescription
afterOptionalCursor from the previous page's paging.cursors.after

Expected Response​

HTTPNotes
200Success. WhatsApp's data and paging are returned as-is in response.data, with group_id added.

Each request has join_request_id, user_id (WhatsApp user ID) and creation_timestamp (Unix seconds, number). wa_id is omitted when the user's phone number is not available. When there are no pending requests, data is empty and paging is omitted.

{
"request_id": "<exotel_request_id>",
"method": "GET",
"http_code": 200,
"response": {
"code": 200,
"error_data": null,
"status": "success",
"data": {
"group_id": "<group_id>",
"data": [
{
"join_request_id": "<join_request_id>",
"wa_id": "919876543210",
"user_id": "<whatsapp_user_id>",
"creation_timestamp": 1764488400
}
],
"paging": {
"cursors": { "before": "<cursor>", "after": "<cursor>" }
}
}
}
}

Approve Join Requests​

Approve one or more pending join requests. Approved users are added to the group.

POST /v2/accounts/{account_sid}/whatsapp/groups/{group_id}/join-requests

Request Body​

{
"join_requests": [
"<join_request_id>"
]
}

Parameters​

FieldRequiredDescription
join_requestsMandatoryArray of 1–100 join request IDs from List Join Requests. Empty IDs are rejected.

Expected Response​

HTTPNotes
200Request processed. WhatsApp's result is returned as-is in response.data, with group_id added.

approved_join_requests lists the approved IDs. failed_join_requests (each with join_request_id and errors) appears only when some requests could not be processed, so a 200 can still contain failures.

{
"request_id": "<exotel_request_id>",
"method": "POST",
"http_code": 200,
"response": {
"code": 200,
"error_data": null,
"status": "success",
"data": {
"group_id": "<group_id>",
"approved_join_requests": ["<join_request_id_1>"],
"failed_join_requests": [
{
"join_request_id": "<join_request_id_2>",
"errors": [
{
"code": 0,
"message": "<error_message>",
"title": "<error_title>",
"error_data": { "details": "<error_details>" }
}
]
}
]
}
}
}

Reject Join Requests​

Reject one or more pending join requests.

DELETE /v2/accounts/{account_sid}/whatsapp/groups/{group_id}/join-requests

Request Body​

{
"join_requests": [
"<join_request_id>"
]
}

Parameters​

FieldRequiredDescription
join_requestsMandatoryArray of 1–100 join request IDs to reject. Empty IDs are rejected.

Expected Response​

HTTPNotes
200Request processed. Same format as Approve Join Requests, with rejected_join_requests instead of approved_join_requests. Check failed_join_requests.

Remove Participants​

Remove one or more participants from the group.

DELETE /v2/accounts/{account_sid}/whatsapp/groups/{group_id}/participants

Request Body​

{
"participants": [
{
"user": "+919811122233"
}
]
}

Parameters​

FieldRequiredDescription
participantsMandatoryArray of participant objects
participants[].userMandatoryParticipant phone number or WhatsApp user ID. Up to 8 participants per request. Exotel trims the value but does not check its format.

Expected Response​

HTTPNotes
200Request accepted. WhatsApp's result is returned as-is in response.data, with group_id added.

Removal is processed by WhatsApp. Check the result with Get Group or the group_participants_update event (see Group Events). Removed users can no longer post in the group.

Delete Group​

Delete the group on WhatsApp (all participants are removed) and mark it DELETED. Remaining participants see that the group is no longer available. A deleted group cannot be used again; later calls with its group_id return 404 / 1036.

DELETE /v2/accounts/{account_sid}/whatsapp/groups/{group_id}

Expected Response​

HTTPNotes
200Success. response.data is the group (same fields as a List item) with status: DELETED.
404Unknown or already deleted group (1036)
409Group exists but is not ACTIVE (1037)

Send Messages to a Group​

Send WhatsApp messages to a group using the standard Messages API:

  • Set to to the WhatsApp group_id and content.recipient_type to group.
  • from must be the business number that created the group.
  • The group must be ACTIVE and belong to your account.
  • Do not set recipient.

content.recipient_type accepts individual (default when omitted) or group; any other value returns 400 / 1002.

POST /v2/accounts/{account_sid}/messages

Group Template Content Object (Utility)​

{
"whatsapp": {
"status_callback": "https://example.com/whatsapp/callback",
"custom_data": "order-utility",
"messages": [
{
"from": "+919876500001",
"to": "<group_id>",
"content": {
"recipient_type": "group",
"type": "template",
"template": {
"name": "order_confirmation",
"language": {
"code": "en_US"
},
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Rahul" },
{ "type": "text", "text": "ORD-12345" }
]
}
]
}
}
}
]
}
}

Group Template Content Object (Marketing)​

{
"whatsapp": {
"status_callback": "https://example.com/whatsapp/callback",
"custom_data": "promo-marketing",
"messages": [
{
"from": "+919876500001",
"to": "<group_id>",
"content": {
"recipient_type": "group",
"type": "template",
"template": {
"name": "simple_promo_test",
"language": {
"code": "en"
}
}
}
}
]
}
}

Group Text Content Object (Free-form)​

{
"whatsapp": {
"status_callback": "https://example.com/whatsapp/callback",
"custom_data": "group-text",
"messages": [
{
"from": "+919876500001",
"to": "<group_id>",
"content": {
"recipient_type": "group",
"type": "text",
"text": {
"body": "Hello group — your order has been shipped."
}
}
}
]
}
}

Message Parameters​

FieldRequiredDescription
whatsapp.status_callbackOptionalURL for delivery status callbacks
whatsapp.custom_dataOptionalOpaque string echoed in callbacks
messages[].fromMandatoryBusiness WhatsApp number that created the group
messages[].toMandatoryWhatsApp group_id
messages[].content.recipient_typeMandatoryMust be group
messages[].content.typeMandatorytemplate, text, image, video, audio, document or sticker. interactive, location, contacts and reaction are not supported for groups.
messages[].content.template restrictions—Not supported for groups: carousel templates; template buttons of type copy_code, catalog, mpm, spm, flow, order_details or voice_call; interactive template parameters (action / limited-time offer).
messages[].content.templateConditionalRequired when type is template
messages[].content.text.bodyConditionalRequired when type is text
messages[].content.<media type>ConditionalMedia object (same as for individual messages) when type is image, video, audio, document or sticker

Invite via Messages API (alternative)​

You can also send a group invite template through the Messages API as a normal 1:1 template (phone number in to, no recipient_type) with a group_id body parameter. The group_id must not be empty, must be an ACTIVE group in your account, and from must be the number that created it.

{
"whatsapp": {
"status_callback": "https://example.com/whatsapp/callback",
"custom_data": "group-invite",
"messages": [
{
"from": "+919876500001",
"to": "+919876543210",
"content": {
"type": "template",
"template": {
"name": "group_invite_link_concise",
"language": {
"code": "en"
},
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Order updates" },
{ "type": "text", "text": "Acme" },
{ "type": "group_id", "group_id": "<group_id>" }
]
}
]
}
}
}
]
}
}

Expected Response​

The response has the same format as for individual messages. The HTTP status (and top-level http_code) is 202 when every message is accepted, 207 when some are accepted and some fail, and the first message's error code when all fail.

Request checks reject the whole request with 400: missing to, recipient set, unsupported content.type, interactive / location / contacts / reaction content, carousel or blocked template buttons, interactive template parameters, and an invalid content.recipient_type. Group checks are reported per message in response.whatsapp.messages[].

HTTPCodedescription
4001001to (group_id) is mandatory for group messages
4001002recipient is not supported for group messages
4001002content.type not supported for group messages; allowed: text, image, video, audio, document, sticker, template
4001002interactive, location, contacts and reaction content are not supported for group messages
4001002carousel templates are not supported for group messages / template button <type> is not supported for group messages / interactive template parameters are not supported for group messages
4001002content.recipient_type must be individual or group
4001002to is not an active WhatsApp group in your account (or template group_id ... for invites) — per message
4001002from must be the number that created the group — per message
4001002template group_id parameter is empty — per message
4031038WhatsApp groups are not enabled for this account — per message
4031016Whatsapp number doesn't exist in your account — per message
5001004Unable to verify the group — per message; retry
note

The Send Message API has its own error code numbering. Codes 1001, 1002 and 1038 mean the same thing as in the Group APIs; other numbers differ.

note

Template messages can be sent anytime. Free-form messages (text and media) require an open 24-hour window (a participant must have posted in the group).

Group Status Callbacks​

Status callbacks for a group send use the same format as individual messages, with these differences:

  • to is not present. recipient_type is group and group_id is the WhatsApp group.
  • SENT is reported once for the group, without participant fields.
  • DELIVERED and READ are reported per participant. recipient_participant_id is the participant's phone number, recipient_participant_user_id is the participant's WhatsApp user ID and recipient_participant_parent_user_id is the participant's parent user ID (each when WhatsApp provides it). WhatsApp can omit the phone number, so use recipient_participant_user_id to identify the participant.
  • template_category is the WhatsApp pricing category of the group message: group_marketing, group_utility or group_service. Free-form text and media messages also get a group_* category.
  • The message's own status moves forward once (sent → delivered → read), not once per participant.
  • Expect up to 1 + (2 × participants) callbacks per group message. De-duplicate on sid + recipient_participant_id (or recipient_participant_user_id) + status.
{
"whatsapp": {
"messages": [
{
"callback_type": "dlr",
"sid": "2FdiiEQUosckPhpZfuVwfjxiSlc16a4",
"recipient_type": "group",
"group_id": "<group_id>",
"recipient_participant_id": "919876543210",
"recipient_participant_user_id": "<participant_user_id>",
"exo_status_code": 30002,
"exo_detailed_status": "EX_MESSAGE_DELIVERED",
"description": "Message delivered",
"timestamp": "2026-11-30T10:30:05.000+05:30",
"custom_data": "Order12",
"template_category": "group_utility"
}
]
}
}

If the send fails before it reaches participants, one failure callback is sent for the group, without participant fields:

{
"whatsapp": {
"messages": [
{
"callback_type": "dlr",
"sid": "2FdiiEQUosckPhpZfuVwfjxiSlc16a4",
"recipient_type": "group",
"group_id": "<group_id>",
"exo_status_code": 30012,
"exo_detailed_status": "EX_INVALID_RECIPIENT",
"description": "Group not found or the business is not a member",
"timestamp": "2026-11-30T10:30:05.000+05:30",
"custom_data": "Order12"
}
]
}
}

WhatsApp errors specific to groups map to these Exotel statuses. Other WhatsApp errors map as for individual messages (see Status Codes).

WhatsApp codeexo_status_codeexo_detailed_statusTypeDescription
13102030012EX_INVALID_RECIPIENTPermanentCannot send messages to single-member groups
13104130012EX_INVALID_RECIPIENTPermanentGroup not found or the business is not a member
13120730043EX_RESTRICTED_BY_METAPermanentGroup suspended — violates platform policies
13120830009EX_RATE_LIMIT_HITTemporaryToo many group operations from this number in a short period
13104730018EX_REENGAGEMENT_ERRORPermanentFree-form message sent outside the 24-hour customer service window; send a template instead

Inbound Group Messages​

Messages that participants post in the group are delivered to the same incoming-message webhook as your 1:1 inbound messages, with group_id added. from is the participant who posted the message and to is your business number.

{
"whatsapp": {
"messages": [
{
"callback_type": "incoming_message",
"sid": "<message_sid>",
"from": "919876543210",
"to": "+919876500001",
"group_id": "<group_id>",
"profile_name": "Asha",
"timestamp": "2026-11-30T10:35:00+05:30",
"content": {
"type": "text",
"text": { "body": "Thanks, got it." }
}
}
]
}
}

1:1 inbound messages never carry group_id, and inbound group messages do not carry recipient_type. Use group_id to tell them apart.

Group Events​

Group events from WhatsApp are forwarded to your WhatsApp business webhook URL in WhatsApp's webhook format, with a top-level waba_number (your business number) added. Each event type is forwarded only once it is enabled for your WhatsApp Business Account; contact Exotel support with the event types you need.

Event fieldgroups[].type valuesWhen
group_lifecycle_updategroup_create, group_deleteGroup created (with group_id and invite_link) or create failed (with errors); group deleted
group_participants_updategroup_participants_add, group_participants_remove, group_join_request_created, group_join_request_revokedParticipant joined, left or was removed; join request created or cancelled
group_settings_updategroup_settings_updateSubject, description or profile picture changed
group_status_updategroup_suspend, group_suspend_clearedGroup suspended by WhatsApp, or its suspension cleared

Match the request_id of a group_create event to the request_id returned by Create Group. For payload details, see Meta Groups API. WhatsApp user IDs (user_id, parent_user_id) and usernames are not forwarded in group events.

Billing and Reports​

  • Group messages (templates and free-form) are priced by WhatsApp's group pricing categories: group_marketing, group_utility and group_service, charged per participant the message is delivered to. The category is reported in the status callback template_category.
  • Message reports show one row per participant the message was delivered to.
  • Invites sent with Send Group Invite are ordinary 1:1 template messages and are billed and reported as such.

Code Examples​

Create Group​

curl -u '<api_key>:<api_token>' \
-X POST "https://api.exotel.com/v2/accounts/<account_sid>/whatsapp/groups" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-updates-2026-11-30-001" \
-d '{
"from": "+919876500001",
"subject": "Order updates",
"description": "Customer order notifications",
"join_approval_mode": "approval_required"
}'

Send Text to a Group​

curl -u '<api_key>:<api_token>' \
-X POST "https://api.exotel.com/v2/accounts/<account_sid>/messages" \
-H "Content-Type: application/json" \
-d '{
"whatsapp": {
"status_callback": "https://example.com/whatsapp/callback",
"custom_data": "group-text",
"messages": [{
"from": "+919876500001",
"to": "<group_id>",
"content": {
"recipient_type": "group",
"type": "text",
"text": { "body": "Hello group — your order has been shipped." }
}
}]
}
}'

Send Group Invite​

curl -u '<api_key>:<api_token>' \
-X POST "https://api.exotel.com/v2/accounts/<account_sid>/whatsapp/groups/<group_id>/invites" \
-H "Content-Type: application/json" \
-d '{
"from": "+919876500001",
"to": ["+919876543210", "+919811122233"],
"template": {
"name": "group_invite_link_concise",
"language": "en",
"body_parameters": ["Order updates", "Acme"],
"group_id_position": 3
}
}'

Group status lifecycle​

StatusMeaning
PENDINGCreate accepted; waiting for WhatsApp to confirm. No group_id or invite_link yet.
ACTIVEGroup exists on WhatsApp. group_id available; invite, join-request, and send APIs work.
FAILEDWhatsApp rejected the create, or did not confirm it within about 30 minutes (rarely up to 24 hours). Create a new group with a new Idempotency-Key.
DELETEDDeleted via the API or on WhatsApp. Not listed; endpoints return 404 / 1036.
POST /groups ──► PENDING ──(WhatsApp confirms)──► ACTIVE ──(DELETE)──► DELETED
│
└──(reject / no confirmation ~30 min)──► FAILED

Error Codes​

Group API errors. For errors on group sends through the Messages API, see Send Messages to a Group.

HTTPCodeWhen
4011014Missing / invalid authentication
4031009Authentication failed, or message sending not allowed for this account (invites)
4031006Account inactive
4031007Account KYC not completed
4001001Mandatory parameter missing (e.g. from or subject on create)
4001002Invalid parameter (e.g. subject > 128 chars, description > 2048, Idempotency-Key > 128 chars, limit outside 1–100)
4001003WhatsApp rejected the request; error_data.description has WhatsApp's reason
4001004Request body is not valid JSON, or is empty on an endpoint that needs a body (remove participants, join requests, invites). An empty create body returns 1001.
4291011Too many requests (Exotel or WhatsApp rate limit, including "Too many group create requests."); retry later
4151016Unexpected response from WhatsApp
5001010Internal error; retry, and contact support if it persists
4041021Number not found, not in your account, or not fully configured
4221033Number is not on the WhatsApp Cloud API
4221034Number is not an Official Business Account (OBA)
422103510,000 non-deleted group limit reached for this number
4041036Unknown or deleted group_id
4091037Group exists but is not ACTIVE
4031038WhatsApp Groups is not enabled for this account
4091039Idempotency-Key already used with a different from or subject
5021040Upstream (WhatsApp) unavailable; safe to retry with the same Idempotency-Key

Typical Flow​

  1. Create Group with an Idempotency-Key → receive PENDING + Exotel id
  2. List Groups (status=PENDING / ACTIVE / FAILED) and match by id until ACTIVE (use group_id) or FAILED (stop; create again with a new key)
  3. Send Group Invite (and/or share Get Invite Link)
  4. Participants join (approve via Join Requests if approval_required)
  5. Send Messages to a Group (templates anytime; free-form after a participant message)
  6. Optionally Reset Invite Link, Remove Participants, or Delete Group
Not supported yet

Adding participants directly (users join through the invite link or an invite template), and updating the group subject, description or picture through the API.

Try It​