Manage Opt IN /Opt OUT

This endpoint creates an OPTIN for a phone number or OPTOUT for a phone number.

Optin is a consent which is mandatory before sending whatsapp message to any number. Use this endpoint to store optin details for a number. Each and every message request will internally check optin first before attempting a actual message send.

If you want to optout for a phone number which was previously opted then use this endpoint.

URL:​ https://waapi.pepipost.com/api/v2/consent/manage​/

Method: POST

Parameters

Request Body


"type":"optin", 
"recipients":[ 
{ "recipient":"919869566055", 
"source":"WEB", 
"user_agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 
(KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36", 
"ip":"192.168.7.26" 
}]  

 

In case of success


    "status": "success", 
    "message": "Optin successfully added." 

  

Status is success means optin added successfully.

In case of failure


    "status": "failure", 
    "error": { 
        "code": "8006", 
        "message": " source cannot be empty." 

According to error, code and message will change.

Error Codes

Last updated