Skip to main content

Update newsletter settings

Método#

/newsletter/settings/{newsletterId}#

POST https://api.z-api.io/instances/SUA_INSTANCIA/token/SEU_TOKEN/newsletter/settings/{newsletterId}

Header#

KeyValue
Client-TokenTOKEN DE SEGURANÇA DA CONTA

Conceituação#

This method is responsible to update newsletter settings.


Atributos#

Obrigatórios#

AtributosTipoDescrição
idstringNewsletter ID. Sent in request PATH (EX: newsletter/settings/999999999999999999@newsletter)
reactionCodesstringSets the restriction of reactions on messages (basic, all)

(string) reactionCodes

ValoresTipoDescrição
basicstringAllows only basic reactions
allstringAllows all reactions

Request Body#

URL#

Method

POST https://api.z-api.io/instances/SUA_INSTANCIA/token/SEU_TOKEN/newsletter/settings/999999999999999999@newsletter

Body#

{
"reactionCodes": "basic | all"
}
warning

The newsletter ID must always contain the suffix "@newsletter" 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 POST, PUT, 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 para a response do webhook (ao receber)

Webhook


Code#