Whatsapp Message
This API allows you to send a WhatsApp message to a specified recipient.
Send Whatsapp Message
POST https://api.getspendo.com/gateway/api/v1/send/whatsapp
Headers
Name
Type
Description
apiKey*
String
The API key that you get from spendo's dashboard.
Request Body
Name
Type
Description
message*
string
The text message that you want to send, formatted as a string.
phoneNumber*
string
The phone number of the recipient, formatted as a string without any spaces or special characters.
{
"success": true,
"message": "Message sent",
"code": 0,
"data": null
}{
"success": false,
"message": "Error sending message",
"code": 0,
"data": null
}{
// Response
}Take a look at how you might call this method using our official libraries, or via curl:
curl --location --request POST 'https://api.getspendo.com/gateway/api/v1/send/whatsapp' \
--header 'apiKey: test_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"message": "string",
"phoneNumber": "string"
}'var axios = require('axios');
var data = JSON.stringify({
"message": "string",
"phoneNumber": "string"
});
var config = {
method: 'post',
url: 'https://api.getspendo.com/gateway/api/v1/send/whatsapp',
headers: {
'apiKey': 'test_api_key',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Last updated
Was this helpful?