Skip to main content
GET
/
instances
/
{instanceId}
/
token
/
{token}
/
group-metadata
/
{phone}
Group metadata
curl --request GET \
  --url https://api.z-api.io/instances/{instanceId}/token/{token}/group-metadata/{phone} \
  --header 'Client-Token: <api-key>'
{
  "phone": "<string>",
  "description": "<string>",
  "owner": "<string>",
  "subject": "<string>",
  "creation": 123,
  "invitationLink": "<string>",
  "communityId": "<string>",
  "adminOnlyMessage": true,
  "adminOnlySettings": true,
  "requireAdminApproval": true,
  "isGroupAnnouncement": true,
  "participants": [
    {}
  ]
}

Overview

This method returns the group metadata with all group information and its participants.

Attributes

instanceId
string
required
Your instance ID. Available in the Z-API panel under Instances.
token
string
required
Your Z-API instance token.

Path

phone
string
required
Group ID/Phone

Response

200

phone
string
Group ID/Phone
description
string
Group description
owner
string
Group creator’s number
subject
string
Group name
creation
number
Group creation date (timestamp)
Group invitation link (admin only)
communityId
string
Community ID
adminOnlyMessage
boolean
Only admins can send messages
adminOnlySettings
boolean
Only admins can change settings
requireAdminApproval
boolean
Admin approval required to join
isGroupAnnouncement
boolean
Whether it is an announcement group
participants
array
Array with participant data
{
  "phone": "120363019502650977-group",
  "description": "Z-API Group",
  "owner": "5511999999999",
  "subject": "My group on Z-API",
  "creation": 1588721491000,
  "invitationLink": "https://chat.whatsapp.com/40Aasd6af1",
  "communityId": null,
  "adminOnlyMessage": false,
  "adminOnlySettings": false,
  "requireAdminApproval": false,
  "isGroupAnnouncement": false,
  "participants": [
    {
      "phone": "5511888888888",
      "isAdmin": false,
      "isSuperAdmin": false
    },
    {
      "phone": "5511777777777",
      "isAdmin": true,
      "isSuperAdmin": false,
      "short": "ZAPIs",
      "name": "ZAPIs Boys"
    }
  ],
  "subjectTime": 1617805323000,
  "subjectOwner": "554497050785"
}

405

Make sure you are correctly sending the method specification, that is, verify that you sent POST or GET as specified at the beginning of this topic.

415

If you receive a 415 error, make sure to add the “Content-Type” header to your request, which in most cases is “application/json”.