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.
Action: optin or optout a phone number
Phone number for optin. Phone number must be valid. Phone number must include a country code.
Source of optin
User agent of a source
Ip of a source of optin. If mentioned than it must be valid ip
"user_agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
"message": "Optin successfully added."
Status is success means optin added successfully.
"message": " source cannot be empty."
According to error, code and message will change.
type is required.
type is invalid. type must be optin/optout.
recipients is required.
source cannot be empty.
source value cannot be greater than 25 characters.
Invalid recipient. Only numeric values allowed.
recipient value cannot be less than 10 digits.
recipient value cannot be greater than 15 digits.