Skip to main content
POST
/
api
/
{session}
/
groups
/
{id}
/
invite-code
/
revoke
Invalidate the current group invite code and generate a new one
curl --request POST \
  --url https://{host}/api/{session}/groups/{id}/invite-code/revoke \
  --header 'apikey: <api-key>'
{
  "success": true,
  "newCode": "NewCode789Xyz"
}

Description

This endpoint revokes the current invite code of the group and generates a new code. The previous code stops working.

URL Parameters

session
string
required
WhatsApp unique session ID
id
string
required
ID of the group in format 120363XXXXX@g.us

Response

{
  "success": true,
  "newCode": "NewCode789Xyz"
}

Status Codes

  • 200 - Code revoked successfully
  • 400 - Invalid parameters
  • 401 - Unauthorized
  • 403 - No permission (admins only)
  • 404 - Group not found

Usage Example

curl -X POST https://api.wappfy.com.br/api/my-session/groups/120363XXXXX@g.us/invite-code/revoke

Authorizations

apikey
string
header
required

Your Wappfy API key (get it at dash.wappfy.com.br)

Path Parameters

id
string
required

ID do Grupo

Response

200 - application/json

The response is of type string.

I