Skip to main content
GET
/
instances
/
{instanceId}
/
token
/
{token}
/
communities-metadata
/
{communityId}
Community metadata
curl --request GET \
  --url https://api.z-api.io/instances/{instanceId}/token/{token}/communities-metadata/{communityId} \
  --header 'Client-Token: <api-key>'
{
  "name": "<string>",
  "id": "<string>",
  "description": "<string>",
  "subGroups": [
    {
      "name": "<string>",
      "phone": "<string>",
      "isGroupAnnouncement": true
    }
  ]
}

Overview

This method returns the community metadata, such as name, description and linked groups.

Attributes

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

Path

communityId
string
required
Community ID

Response

200

name
string
Community name
id
string
Community ID
description
string
Community description
subGroups
array
Groups linked to the community
{
  "name": "My first Community",
  "id": "98372465382764532938",
  "description": "A community description",
  "subGroups": [
    {
      "name": "My first Community",
      "phone": "342532456234453-group",
      "isGroupAnnouncement": true
    },
    {
      "name": "Another group",
      "phone": "1203634230225498-group",
      "isGroupAnnouncement": false
    }
  ]
}

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”.