Newsletter Metadata
Method#
/newsletter/metadata#
GET https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/newsletter/metadata/{newsletterId}
Header#
| Key | Value | 
|---|---|
| Client-Token | ACCOUNT SECURITY TOKEN | 
Concept#
This method returns the metadata of a newsletter, including all newsletter information and its views.
Attributes#
Required#
| Attributes | Type | Description | 
|---|---|---|
| id | string | Newsletter ID | 
Request Params#
URL#
GET https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/newsletter/metadata/{newsletterId}
warning
The newsletter ID must always include the "@newsletter" suffix, as this is the standard used by WhatsApp itself.
Response#
200#
| Attributes | Type | Description | 
|---|---|---|
| id | string | Newsletter ID | 
| creationTime | timestamp | Timestamp of the newsletter's creation date | 
| state | string | Newsletter state (ACTIVE, NON_EXISTING) | 
| name | string | Newsletter name | 
| description | string | Newsletter description | 
| subscribersCount | string | Number of newsletter followers | 
| inviteLink | string | Newsletter's invite link | 
| verification | string | Indicates whether the newsletter is verified or not (VERIFIED, UNVERIFIED) | 
| picture | string | Newsletter's image URL | 
| preview | string | Newsletter's image preview URL | 
| viewMetadata | object | Object with view information | 
Object (viewMetadata)
| Attributes | Type | Description | 
|---|---|---|
| mute | string | Indicates whether the newsletter is muted or not (ON, OFF) | 
| role | string | Indicates if the user is the owner or a subscriber (OWNER, SUBSCRIBER) | 
Example
405#
In this case, ensure that you are correctly sending the method specification, i.e., check if you sent the 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" to the headers of the request for the object you are sending, mostly "application/json."