Creating Newsletter
Method#
/create-newsletter#
POST https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/create-newsletter
Header#
| Key | Value | 
|---|---|
| Client-Token | ACCOUNT SECURITY TOKEN | 
Concept#
This method is responsible for creating a newsletter. Unfortunately, it's not possible to create the channel with an image, but you can use the update-newsletter-picture method right after creation, which is in the same section.
Attributes#
Required#
| Attributes | Type | Description | 
|---|---|---|
| name | string | Newsletter name | 
Optional#
| Attributes | Type | Description | 
|---|---|---|
| description | string | Newsletter description | 
Request Body#
Method
POST https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/create-newsletter
Example
Response#
201#
| Attributes | Type | Description | 
|---|---|---|
| id | string | Newsletter ID | 
Example
tip
The returned ID will always include the "@newsletter" suffix, which is the standard used by WhatsApp itself. It should be used in the same format in requests that require the ID as a parameter.
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."
Webhook Response#
Link to the webhook response (upon receiving)