Skip to main content
GET
/
api
/
community
/
listSubGroups
/
:instance
List subgroups
curl --request GET \
  --url https://api.example.com/api/community/listSubGroups/:instance \
  --header 'token: <token>'

Documentation Index

Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt

Use this file to discover all available pages before exploring further.

Auth: TokenAccount or TokenInstanceRate-limit: Global (100/min) • Idempotent: yes

Description

Lists the subgroups of a community. The Announcements group is identified by the flag isDefaultSubGroup: true. Unlike the other endpoints, this route requires a JID in ?communityJid= (it does not accept a code / link).

Examples

List subgroups

Queries the subgroups of the community 120363406289005073@g.us by passing the full JID (with the @g.us suffix) in the query string.
curl -X GET "https://ryzeapi.cloud/api/community/listSubGroups/$Instance_Name?communityJid=120363406289005073@g.us" \
  -H "token: $Token_Instance"

Without the @g.us suffix

Same query, but passing only the numeric ID in communityJid. The service automatically appends @g.us before resolving the community.
curl -X GET "https://ryzeapi.cloud/api/community/listSubGroups/$Instance_Name?communityJid=120363406289005073" \
  -H "token: $Token_Instance"

Success response

Returns communityJid (already normalized with the @g.us suffix) and the subgroups array with each linked group the bot participates in. Each item carries jid, name, and the flag isDefaultSubGroup that identifies the community’s Announcements group. The message carries the count ("N subgroup(s) found") and the array comes empty when no subgroup is found.
200 OK
{
  "success": true,
  "message": "2 subgroup(s) found",
  "communityJid": "120363406289005073@g.us",
  "subgroups": [
    {
      "jid": "120363406289005074@g.us",
      "name": "Announcements",
      "isDefaultSubGroup": true
    },
    {
      "jid": "120363406289005075@g.us",
      "name": "General",
      "isDefaultSubGroup": false
    }
  ]
}

Path parameters

instance
string
required
Instance name.

Headers

token
string
required
TokenAccount or TokenInstance.

Query

communityJid
string
required
Community @g.us JID. If you omit the suffix, the service automatically appends @g.us.

Notes

  • The listing only returns subgroups the bot is in, if the bot is in the parent only but not in subgroup X, X does not appear in the list.
  • Propagation of new links can take 1-3s, a GET right after POST /link may temporarily return the list without the freshly linked group.
  • The Announcements group always appears with isDefaultSubGroup: true. Filter on the client if you need to exclude it from the listing.

Errors

HTTPMessage
400communityJid query parameter is required
400invalid community JID: <reason>
400Instance is not connected to WhatsApp
500failed to get groups: <reason>
Envelope:
{
  "success": false,
  "error": { "message": "communityJid query parameter is required" }
}

Next

Link groups

Add new subgroups.

Unlink groups

Remove subgroups from the community.