Creating Newsletter
#
Method#
/create-newsletterPOST
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/create-newsletter
#
HeaderKey | Value |
---|---|
Client-Token | ACCOUNT SECURITY TOKEN |
#
ConceptThis 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#
RequiredAttributes | Type | Description |
---|---|---|
name | string | Newsletter name |
#
OptionalAttributes | Type | Description |
---|---|---|
description | string | Newsletter description |
#
Request BodyMethod
POST
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/create-newsletter
Example
#
Response#
201Attributes | 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.
#
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."
#
Webhook ResponseLink to the webhook response (upon receiving)