List Newsletter
#
Method#
/newsletterGET
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/newsletter
#
HeaderKey | Value |
---|---|
Client-Token | ACCOUNT SECURITY TOKEN |
#
ConceptThis method returns a list with metadata of your own newsletter and followed newsletter, including all newsletter information and their views.
#
URLGET
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/newsletter
#
Response#
200Attributes | 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
#
405In 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.
#
415If 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."