Skip to main content

Delete Newsletter

Method#

/delete-newsletter#

DELETE https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/delete-newsletter

Header#

KeyValue
Client-TokenACCOUNT SECURITY TOKEN

Concept#

This method is responsible for deleting a newsletter.


Attributes#

Required#

AttributesTypeDescription
idstringNewsletter ID

Request Body#

URL#

Method

DELETE https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/delete-newsletter

Body#

{
"id": "999999999999999999@newsletter"
}
warning

The newsletter ID must always include the "@newsletter" suffix, as this is the standard used by WhatsApp itself.


Response#

200#

AttributesTypeDescription
valuebooleantrue if successful, false in case of failure

Example

{
"value": true
}

405#

In this case, ensure that you are correctly sending the method specification, i.e., check if you sent the DELETE 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."


Code#