API Documentation

Groups

Use group APIs to create groups, join by invite, manage pictures, subjects, descriptions, security settings, participants, admins, and invite codes. The unsupported group delete action is not exposed.

Common rules

Authentication

Send Authorization: Bearer YOUR_API_KEY with every request.

Session

Use the dashboard session name or session ID as {session}.

Group ID

Use group IDs like {group_id}@g.us. URL-encode @ as needed in path values.

How to find IDs

Find {session}

Use the session name from your dashboard, or call GET /api/v1/sessions and copy the session name or session_id.

Find {group_id}

Call GET /api/v1/groups?session={session} and copy the group id. Group IDs usually end with @g.us.

Find {number}

Use the contact phone number in international format, then add @c.us when an endpoint needs a participant ID.

Find {invite_code}

Use the last part of a group invite link, or call GET /api/v1/groups/{group_id}/invite-code?session={session}.

Endpoints

Method Endpoint Purpose
POST https://chatflow.zeltacode.com/api/v1/groups Create a group with one or more participants.
GET https://chatflow.zeltacode.com/api/v1/groups Return groups for a connected session. Use pagination for large accounts.
GET https://chatflow.zeltacode.com/api/v1/groups/count Return the total number of groups for a connected session.
POST https://chatflow.zeltacode.com/api/v1/groups/join Join a group using an invite code or full invite URL.
GET https://chatflow.zeltacode.com/api/v1/groups/join-info Preview group information before joining by invite code or invite URL.
POST https://chatflow.zeltacode.com/api/v1/groups/refresh Refresh group and participant information from the connected account.
GET https://chatflow.zeltacode.com/api/v1/groups/{group_id} Return one group by group ID.
POST https://chatflow.zeltacode.com/api/v1/groups/{group_id}/leave Leave a group from the connected session.
GET https://chatflow.zeltacode.com/api/v1/groups/{group_id}/picture Return the group picture URL.
PUT https://chatflow.zeltacode.com/api/v1/groups/{group_id}/picture Update the group picture from a public image URL or encoded image data.
DELETE https://chatflow.zeltacode.com/api/v1/groups/{group_id}/picture Remove the current group picture.
PUT https://chatflow.zeltacode.com/api/v1/groups/{group_id}/subject Update the group subject.
PUT https://chatflow.zeltacode.com/api/v1/groups/{group_id}/description Update the group description.
GET https://chatflow.zeltacode.com/api/v1/groups/{group_id}/settings/security/info-admin-only Read whether only admins can edit group info.
PUT https://chatflow.zeltacode.com/api/v1/groups/{group_id}/settings/security/info-admin-only Set whether only admins can edit group info.
GET https://chatflow.zeltacode.com/api/v1/groups/{group_id}/settings/security/messages-admin-only Read whether only admins can send group messages.
PUT https://chatflow.zeltacode.com/api/v1/groups/{group_id}/settings/security/messages-admin-only Set whether only admins can send group messages.
GET https://chatflow.zeltacode.com/api/v1/groups/{group_id}/participants Return group participants.
GET https://chatflow.zeltacode.com/api/v1/groups/{group_id}/participants/v2 Return normalized group participants with roles.
POST https://chatflow.zeltacode.com/api/v1/groups/{group_id}/participants/add Add participants to a group.
POST https://chatflow.zeltacode.com/api/v1/groups/{group_id}/participants/remove Remove participants from a group.
POST https://chatflow.zeltacode.com/api/v1/groups/{group_id}/admin/promote Promote participants to group admin.
POST https://chatflow.zeltacode.com/api/v1/groups/{group_id}/admin/demote Demote admins to regular participants.
GET https://chatflow.zeltacode.com/api/v1/groups/{group_id}/invite-code Return the current group invite code.
POST https://chatflow.zeltacode.com/api/v1/groups/{group_id}/invite-code/revoke Invalidate the current invite code and generate a new one.

1. Create group

Create a group with one or more participants.

API name

Create group

Purpose

Create a group with one or more participants. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

{number} - use an international phone number; participant IDs use {number}@c.us.

Endpoint

POST https://chatflow.zeltacode.com/api/v1/groups
curl
curl -X POST "https://chatflow.zeltacode.com/api/v1/groups" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session": "{session}",
    "name": "Group name",
    "participants": [
        {
            "id": "{number}@c.us"
        }
    ]
}'
JSON body
{
    "session": "{session}",
    "name": "Group name",
    "participants": [
        {
            "id": "{number}@c.us"
        }
    ]
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "create",
        "session": "{session}",
        "group_id": null,
        "group_response": {
            "id": "{group_id}@g.us"
        }
    }
}

2. Get all groups

Return groups for a connected session. Use pagination for large accounts.

API name

Get all groups

Purpose

Return groups for a connected session. Use pagination for large accounts. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

Endpoint

GET https://chatflow.zeltacode.com/api/v1/groups
curl
curl -X GET "https://chatflow.zeltacode.com/api/v1/groups?session={session}&limit=20&offset=0&sortBy=subject&sortOrder=asc&exclude=participants" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Query parameters
{
    "session": "{session}",
    "limit": 20,
    "offset": 0,
    "sortBy": "subject",
    "sortOrder": "asc",
    "exclude": "participants"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "list",
        "session": "{session}",
        "group_id": null,
        "group_response": [
            {
                "id": "{group_id}@g.us",
                "subject": "Group name",
                "participants": []
            }
        ]
    }
}

3. Get groups count

Return the total number of groups for a connected session.

API name

Get groups count

Purpose

Return the total number of groups for a connected session. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

Endpoint

GET https://chatflow.zeltacode.com/api/v1/groups/count
curl
curl -X GET "https://chatflow.zeltacode.com/api/v1/groups/count?session={session}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Query parameters
{
    "session": "{session}"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "count",
        "session": "{session}",
        "group_id": null,
        "group_response": {
            "count": 10
        }
    }
}

4. Join group

Join a group using an invite code or full invite URL.

API name

Join group

Purpose

Join a group using an invite code or full invite URL. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

{invite_code} - copy it from the group invite link or invite-code API.

Endpoint

POST https://chatflow.zeltacode.com/api/v1/groups/join
curl
curl -X POST "https://chatflow.zeltacode.com/api/v1/groups/join" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session": "{session}",
    "code": "https://chat.whatsapp.com/{invite_code}"
}'
JSON body
{
    "session": "{session}",
    "code": "https://chat.whatsapp.com/{invite_code}"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "join",
        "session": "{session}",
        "group_id": null,
        "group_response": {
            "id": "{group_id}@g.us"
        }
    }
}

5. Get join info

Preview group information before joining by invite code or invite URL.

API name

Get join info

Purpose

Preview group information before joining by invite code or invite URL. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

{invite_code} - copy it from the group invite link or invite-code API.

Endpoint

GET https://chatflow.zeltacode.com/api/v1/groups/join-info
curl
curl -X GET "https://chatflow.zeltacode.com/api/v1/groups/join-info?session={session}&code={invite_code}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Query parameters
{
    "session": "{session}",
    "code": "{invite_code}"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "join-info",
        "session": "{session}",
        "group_id": null,
        "group_response": {
            "id": "{group_id}@g.us",
            "subject": "Group name",
            "participantsCount": 10
        }
    }
}

6. Refresh groups

Refresh group and participant information from the connected account.

API name

Refresh groups

Purpose

Refresh group and participant information from the connected account. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

Endpoint

POST https://chatflow.zeltacode.com/api/v1/groups/refresh
curl
curl -X POST "https://chatflow.zeltacode.com/api/v1/groups/refresh" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session": "{session}"
}'
JSON body
{
    "session": "{session}"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "refresh",
        "session": "{session}",
        "group_id": null,
        "group_response": {
            "success": true
        }
    }
}

7. Get group

Return one group by group ID.

API name

Get group

Purpose

Return one group by group ID. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

Endpoint

GET https://chatflow.zeltacode.com/api/v1/groups/{group_id}
curl
curl -X GET "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us?session={session}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Query parameters
{
    "session": "{session}"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "get",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": {
            "id": "{group_id}@g.us",
            "subject": "Group name",
            "description": "Group description"
        }
    }
}

8. Leave group

Leave a group from the connected session.

API name

Leave group

Purpose

Leave a group from the connected session. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

Endpoint

POST https://chatflow.zeltacode.com/api/v1/groups/{group_id}/leave
curl
curl -X POST "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/leave" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session": "{session}"
}'
JSON body
{
    "session": "{session}"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "leave",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": {
            "success": true
        }
    }
}

9. Get group picture

Return the group picture URL.

API name

Get group picture

Purpose

Return the group picture URL. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

Endpoint

GET https://chatflow.zeltacode.com/api/v1/groups/{group_id}/picture
curl
curl -X GET "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/picture?session={session}&refresh=0" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Query parameters
{
    "session": "{session}",
    "refresh": false
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "picture",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": {
            "url": "https://example.com/picture.jpg"
        }
    }
}

10. Set group picture

Update the group picture from a public image URL or encoded image data.

API name

Set group picture

Purpose

Update the group picture from a public image URL or encoded image data. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

Endpoint

PUT https://chatflow.zeltacode.com/api/v1/groups/{group_id}/picture
curl
curl -X PUT "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/picture" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session": "{session}",
    "file": {
        "url": "https://example.com/group.jpg",
        "mimetype": "image/jpeg",
        "filename": "group.jpg"
    }
}'
JSON body
{
    "session": "{session}",
    "file": {
        "url": "https://example.com/group.jpg",
        "mimetype": "image/jpeg",
        "filename": "group.jpg"
    }
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "update-picture",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": {
            "success": true
        }
    }
}

11. Delete group picture

Remove the current group picture.

API name

Delete group picture

Purpose

Remove the current group picture. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

Endpoint

DELETE https://chatflow.zeltacode.com/api/v1/groups/{group_id}/picture
curl
curl -X DELETE "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/picture" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session": "{session}"
}'
JSON body
{
    "session": "{session}"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "delete-picture",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": {
            "success": true
        }
    }
}

12. Set group subject

Update the group subject.

API name

Set group subject

Purpose

Update the group subject. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

Endpoint

PUT https://chatflow.zeltacode.com/api/v1/groups/{group_id}/subject
curl
curl -X PUT "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/subject" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session": "{session}",
    "subject": "New group name"
}'
JSON body
{
    "session": "{session}",
    "subject": "New group name"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "update-subject",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": true
    }
}

13. Set group description

Update the group description.

API name

Set group description

Purpose

Update the group description. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

Endpoint

PUT https://chatflow.zeltacode.com/api/v1/groups/{group_id}/description
curl
curl -X PUT "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/description" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session": "{session}",
    "description": "New group description"
}'
JSON body
{
    "session": "{session}",
    "description": "New group description"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "update-description",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": true
    }
}

14. Get info edit security

Read whether only admins can edit group info.

API name

Get info edit security

Purpose

Read whether only admins can edit group info. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

Endpoint

GET https://chatflow.zeltacode.com/api/v1/groups/{group_id}/settings/security/info-admin-only
curl
curl -X GET "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/settings/security/info-admin-only?session={session}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Query parameters
{
    "session": "{session}"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "info-admin-only",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": {
            "adminsOnly": true
        }
    }
}

15. Update info edit security

Set whether only admins can edit group info.

API name

Update info edit security

Purpose

Set whether only admins can edit group info. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

Endpoint

PUT https://chatflow.zeltacode.com/api/v1/groups/{group_id}/settings/security/info-admin-only
curl
curl -X PUT "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/settings/security/info-admin-only" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session": "{session}",
    "adminsOnly": true
}'
JSON body
{
    "session": "{session}",
    "adminsOnly": true
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "update-info-admin-only",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": true
    }
}

16. Get message security

Read whether only admins can send group messages.

API name

Get message security

Purpose

Read whether only admins can send group messages. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

Endpoint

GET https://chatflow.zeltacode.com/api/v1/groups/{group_id}/settings/security/messages-admin-only
curl
curl -X GET "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/settings/security/messages-admin-only?session={session}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Query parameters
{
    "session": "{session}"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "messages-admin-only",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": {
            "adminsOnly": false
        }
    }
}

17. Update message security

Set whether only admins can send group messages.

API name

Update message security

Purpose

Set whether only admins can send group messages. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

Endpoint

PUT https://chatflow.zeltacode.com/api/v1/groups/{group_id}/settings/security/messages-admin-only
curl
curl -X PUT "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/settings/security/messages-admin-only" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session": "{session}",
    "adminsOnly": false
}'
JSON body
{
    "session": "{session}",
    "adminsOnly": false
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "update-messages-admin-only",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": true
    }
}

18. Get participants

Return group participants.

API name

Get participants

Purpose

Return group participants. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

{number} - use an international phone number; participant IDs use {number}@c.us.

Endpoint

GET https://chatflow.zeltacode.com/api/v1/groups/{group_id}/participants
curl
curl -X GET "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/participants?session={session}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Query parameters
{
    "session": "{session}"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "participants",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": [
            {
                "id": "{number}@c.us",
                "role": "participant"
            }
        ]
    }
}

19. Get participants v2

Return normalized group participants with roles.

API name

Get participants v2

Purpose

Return normalized group participants with roles. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

{number} - use an international phone number; participant IDs use {number}@c.us.

Endpoint

GET https://chatflow.zeltacode.com/api/v1/groups/{group_id}/participants/v2
curl
curl -X GET "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/participants/v2?session={session}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Query parameters
{
    "session": "{session}"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "participants-v2",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": [
            {
                "id": "{number}@c.us",
                "role": "admin"
            }
        ]
    }
}

20. Add participants

Add participants to a group.

API name

Add participants

Purpose

Add participants to a group. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

{number} - use an international phone number; participant IDs use {number}@c.us.

Endpoint

POST https://chatflow.zeltacode.com/api/v1/groups/{group_id}/participants/add
curl
curl -X POST "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/participants/add" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session": "{session}",
    "participants": [
        {
            "id": "{number}@c.us"
        }
    ]
}'
JSON body
{
    "session": "{session}",
    "participants": [
        {
            "id": "{number}@c.us"
        }
    ]
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "participants-add",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": {
            "success": true
        }
    }
}

21. Remove participants

Remove participants from a group.

API name

Remove participants

Purpose

Remove participants from a group. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

{number} - use an international phone number; participant IDs use {number}@c.us.

Endpoint

POST https://chatflow.zeltacode.com/api/v1/groups/{group_id}/participants/remove
curl
curl -X POST "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/participants/remove" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session": "{session}",
    "participants": [
        {
            "id": "{number}@c.us"
        }
    ]
}'
JSON body
{
    "session": "{session}",
    "participants": [
        {
            "id": "{number}@c.us"
        }
    ]
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "participants-remove",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": {
            "success": true
        }
    }
}

22. Promote participants

Promote participants to group admin.

API name

Promote participants

Purpose

Promote participants to group admin. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

{number} - use an international phone number; participant IDs use {number}@c.us.

Endpoint

POST https://chatflow.zeltacode.com/api/v1/groups/{group_id}/admin/promote
curl
curl -X POST "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/admin/promote" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session": "{session}",
    "participants": [
        {
            "id": "{number}@c.us"
        }
    ]
}'
JSON body
{
    "session": "{session}",
    "participants": [
        {
            "id": "{number}@c.us"
        }
    ]
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "admin-promote",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": {
            "success": true
        }
    }
}

23. Demote participants

Demote admins to regular participants.

API name

Demote participants

Purpose

Demote admins to regular participants. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

{number} - use an international phone number; participant IDs use {number}@c.us.

Endpoint

POST https://chatflow.zeltacode.com/api/v1/groups/{group_id}/admin/demote
curl
curl -X POST "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/admin/demote" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session": "{session}",
    "participants": [
        {
            "id": "{number}@c.us"
        }
    ]
}'
JSON body
{
    "session": "{session}",
    "participants": [
        {
            "id": "{number}@c.us"
        }
    ]
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "admin-demote",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": {
            "success": true
        }
    }
}

24. Get invite code

Return the current group invite code.

API name

Get invite code

Purpose

Return the current group invite code. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

{invite_code} - copy it from the group invite link or invite-code API.

Endpoint

GET https://chatflow.zeltacode.com/api/v1/groups/{group_id}/invite-code
curl
curl -X GET "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/invite-code?session={session}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Query parameters
{
    "session": "{session}"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "invite-code",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": {
            "inviteCode": "{invite_code}",
            "inviteUrl": "https://chat.whatsapp.com/{invite_code}"
        }
    }
}

25. Revoke invite code

Invalidate the current invite code and generate a new one.

API name

Revoke invite code

Purpose

Invalidate the current invite code and generate a new one. Use it when your application needs group management without opening the dashboard.

Required values

{session} - get it from the dashboard or GET /api/v1/sessions.

{group_id} - get it from GET /api/v1/groups?session={session}.

Endpoint

POST https://chatflow.zeltacode.com/api/v1/groups/{group_id}/invite-code/revoke
curl
curl -X POST "https://chatflow.zeltacode.com/api/v1/groups/{group_id}@g.us/invite-code/revoke" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "session": "{session}"
}'
JSON body
{
    "session": "{session}"
}
Example response
{
    "success": true,
    "message": "Group action completed.",
    "data": {
        "action": "revoke-invite-code",
        "session": "{session}",
        "group_id": "{group_id}@g.us",
        "group_response": {
            "inviteCode": "{new_invite_code}"
        }
    }
}