Skip to main content

Transfer Newsletter Ownership

Method#

/newsletter/transfer-ownership/{newsletterId}#

POST https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/newsletter/transfer-ownership/{newsletterId}

Header#

KeyValue
Client-TokenACCOUNT SECURITY TOKEN

Concept#

This method is responsible for transferring the ownership of a channel to another user, who is an administrator of that channel.

Attributes#

Required#

AttributesTypeDescription
phonestringPhone number of the user who will be promoted to newsletter owner

Optional#

AttributesTypeDescription
quitAdminbooleanDefines whether you will cease to be an administrator of the channel after transferring ownership

Request Body#

{
"phone": "5511999999999"
}
{
"phone": "5511999999999",
"quitAdmin": true
}

Response#

200#

AttributesTypeDescription
valuestringReturns true if successful, false if failed
messagestringIn case of error, may return a message with information about the error

Example

{
"value": true
}

405#

In this case, make sure you are correctly sending the method specification, meaning 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" of the object you are sending in the request headers, mostly "application/json".


Webhook Response#

Link to the webhook response (upon receiving)

Webhook


Code#