update_group_participants
Add, remove, promote, or demote WhatsApp group participants after verifying admin rights; if you lack permission, the change fails and no one is altered.
Instructions
Add, remove, promote, or demote participants of a group after first checking that the paired user is a group admin (or, for add, that the group lets every member add) — if not, it fails and nothing changes. The group shows a system message for each change; people whose privacy settings block being added directly get a WhatsApp group-invite card in their 1:1 chat instead (unless send_invite=false) and join by tapping it; invites share the outbound rate limit (about one per 45–90 s), so in a batch the rest come back as invite_required with a retry hint — repeat the add for them later. Reversible by calling again with the inverse action (add ↔ remove, promote ↔ demote), though a sent invite cannot be recalled. Returns {chat_jid, group_name, action, is_admin, results: [{input, jid, status, error_code?, error?, invite_message_id?, invite_expires_at?}]} where status is one of added, removed, promoted, demoted, already_member, not_member, invite_sent, invite_required, invite_failed, failed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | mutation to perform: `add`, `remove`, `promote` (to admin), or `demote` (from admin) | |
| chat_jid | Yes | group JID as `<digits>-<timestamp>@g.us` or `<digits>@g.us` (use list_groups to find it) | |
| send_invite | No | only for `add`: when someone's privacy settings block adding them directly, send them a group-invite card in their 1:1 chat (defaults to true); false just reports `invite_required` | |
| participants | Yes | people to change, as phone digits only (E.164 without `+`, no spaces) or individual JIDs (`<digits>@s.whatsapp.net` or `<digits>@lid`); each at most once | |
| invite_message | No | optional caption shown on the invite card (defaults to none); ignored unless an invite is sent |