This API allows sending messages to a WhatsApp number via a POST request.
Base URL: https://wamessageapi.com/api/text
All requests must be made to this base URL.
To authenticate requests, you must include the API Key (apiKey) and the instance ID (identification) in the header.
{
apiKey: "Your API key here",
id: "Instance identification here"
}
The request body must be a JSON object with the following structure:
{
"number": 5554991997181, // Number to send to
"message": "Testing message sending." // Message to be sent
}
const axios = require("axios"); let data = JSON.stringify({ "message": "Hello, I'm sending you a message", "number": "5554991997181" }); let config = { method: 'post', url: 'https://wamessageapi.com/api/text', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });
The API will respond with a JSON object confirming success or indicating an error.
{
"message": "Text sent successfully!",
"phone": 5554991997181,
"messageId": "unique_message_id"
}
{
"error": "Invalid API Key"
}
The API can return the following HTTP status codes:
This API allows sending images to a WhatsApp number via a POST request.
Base URL: https://wamessageapi.com/api/image
All requests must be made to this base URL.
To authenticate requests, you must include the API Key (apiKey) and the Instance ID (identification) in the header.
{
apiKey: "Your API key here",
id: "Instance identification here"
}
The request body must be a JSON object with the following structure:
{
"image": "Base64Image",
"number": "555481229802",
"caption": "Text accompanying the image"
}
The API will respond with a JSON object confirming success or indicating an error.
{
"message": "Image sent successfully!",
"phone": "Sent number",
"messageId": "Message ID"
}
{
"error": "Error sending image, error.message"
}
The API can return the following HTTP status codes:
const axios = require("axios"); const fs = require("fs"); const imageFile = fs.readFileSync("path/to/your/image.jpg").toString("base64"); let data = JSON.stringify({ "caption": "Check out this image!", "number": "5554991997181", "image": imageFile }); let config = { method: 'post', url: 'https://wamessageapi.com/api/image', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then(response => console.log(response.data)) .catch(error => console.error(error));
Sending videos is simple: include authentication in the header and attach the video file in the body.
{
"number": "5554991997181", // Enter the recipient's phone number
"video": videoFile // Video file in the body. Maximum size: 20MB
}
const axios = require("axios");
const fs = require("fs");
const videoFile = fs.readFileSync("path/to/your/video.mp4").toString("base64");
let data = JSON.stringify({
"caption": "",
"number": "5554991997181",
"video": videoFile
});
let config = {
method: 'post',
url: 'https://wamessageapi.com/api/video',
headers: {
'apiKey': 'Bearer Your_ApiKey',
'id': 'Your_Instance_ID_Here',
'Content-Type': 'application/json'
},
data: data
};
axios.request(config)
.then((response) => console.log(response.data))
.catch((error) => console.log(error));
{
"message": "Video sent successfully!",
"phone": "Sent number",
"messageId": "Message ID" // Can be used to check the message status
}
{
"error": "Error sending video, error.message"
}
Sending audio is simple! Just include authentication in the header and attach the audio file in the request body in MP3 format.
{
"number": 5554991997181, // Recipient number
"audio": audioFile // Audio file in the body (base64)
}
const axios = require("axios"); const fs = require("fs"); const audioFile = fs.readFileSync("path/to/your/audio.mp3").toString("base64"); let data = JSON.stringify({ "number": "5554991997181", "audio": audioFile }); let config = { method: 'post', url: 'https://wamessageapi.com/api/audio', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then(response => console.log(response.data)) .catch(error => console.error(error));
The API will respond with a JSON object confirming success or indicating an error.
{
"message": "Audio sent successfully!",
"phone": "5554991997181",
"messageId": "unique_message_id"
}
{
"error": "Error sending audio, error.message"
}
The API may return the following HTTP status codes:
This API allows you to delete sent WhatsApp messages through a POST request.
Base URL: https://wamessageapi.com/api/delete
All requests must be made to this base URL.
To authenticate requests, you must include the API Key (apiKey) and the Instance ID in the header.
{
"apiKey": "Your API Key here",
"id": "Instance identification here"
}
The request body should be a JSON object with the following structure:
{
"messageId": "[email protected]_ABCDEF", // ID of the message to be deleted
"number": "5511999999999"
}
const axios = require("axios"); let data = JSON.stringify({ "id": "INSTANCE_ID", "messageId": "[email protected]_ABCDEF" }); let config = { method: 'post', url: 'https://wamessageapi.com/api/delete', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => console.log(response.data)) .catch((error) => console.log(error));
{
"success": true,
"message": "Message deleted successfully!",
"messageId": "[email protected]_ABCDEF"
}
{
"error": "Client API disconnected. Please scan the QR code again."
}
This API allows sending documents (PDF, DOCX, TXT, etc.) to a WhatsApp number through a POST request.
Base URL: https://wamessageapi.com/api/document
All requests must be made to this base URL.
To authenticate requests, you must include the API Key (apiKey) and the Instance ID (identification) in the header.
{
"apiKey": "Your API Key here",
"id": "Your Instance ID here"
}
The request body must be a JSON object with the following structure:
{
"number": "5511999999999",
"caption": "This is an important document.",
"document": "BASE64_ENCODED_FILE"
}
Examples in Node.js, Python, and C++:
The API will respond with a JSON object confirming success or indicating an error.
{
"success": true,
"message": "Document sent successfully!",
"messageId": "[email protected]_ABCDEF"
}
This API allows sending reactions (emojis) to messages sent on WhatsApp via a POST request.
Base URL: https://wamessageapi.com/api/reaction
All requests must be made to this base URL.
To authenticate requests, you must include the API Key (apiKey) and the Instance ID (identification) in the header.
{
"apiKey": "Your API Key here",
"id": "Your Instance ID here"
}
The request body must be a JSON object with the following structure:
{
"messageId": "[email protected]_ABCDEF", // ID of the message that will receive the reaction
"reaction": "❤️" // Reaction emoji
}
const axios = require("axios"); let data = JSON.stringify({ "id": "INSTANCE_ID", "messageId": "[email protected]_ABCDEF", "reaction": "🔥" }); let config = { method: 'post', url: 'https://wamessageapi.com/api/reaction', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => console.log(response.data)) .catch((error) => console.log(error));
This API allows sending stickers to a WhatsApp number through a POST request.
Base URL: https://wamessageapi.com/api/sticker
Include the API Key (apiKey) and the Instance ID (identification) in the header.
{
apiKey: Your API Key here
id: Your Instance ID here
}
The request body must be a JSON object with the following structure:
{
"number": "5511999999999",
"sticker": "BASE64_ENCODED_FILE"
}
const axios = require("axios"); const fs = require("fs"); const stickerFile = fs.readFileSync("path/to/your/sticker.webp").toString("base64"); let data = JSON.stringify({ "number": "5511999999999", "sticker": stickerFile }); let config = { method: 'post', url: 'https://wamessageapi.com/api/sticker', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then(response => console.log(response.data)) .catch(error => console.error(error));
The API will respond with a JSON object confirming success or indicating an error.
{
"success": true,
"message": "Sticker sent successfully!",
"messageId": "[email protected]_ABCDEF"
}
This API allows sending animated GIFs to a WhatsApp number through a POST request.
Base URL: https://wamessageapi.com/api/gif
All requests must be made to this base URL.
To authenticate requests, you must include the API Key (apiKey) and the Instance ID (identification) in the header.
{
apiKey: "Your API Key here",
id: "Your Instance ID here"
}
The request body must be a JSON object with the following structure:
{
"number": "5511999999999", // Recipient number
"gif": "BASE64_ENCODED_FILE" // GIF in Base64 or URL
}
const axios = require("axios"); const fs = require("fs"); const gifFile = fs.readFileSync("path/to/your/animation.gif").toString("base64"); let data = JSON.stringify({ "id": "INSTANCE_ID", "number": "5511999999999", "gif": gifFile }); let config = { method: 'post', url: 'https://wamessageapi.com/api/gif', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then(response => console.log(response.data)) .catch(error => console.error(error));
The API will respond with a JSON object confirming success or indicating an error.
{
"message": "GIF sent successfully!",
"phone": "5511999999999",
"messageId": "Message ID"
}
{
"error": "Error sending GIF, error.message"
}
The API may return the following HTTP status codes:
This API allows sending links with captions to a WhatsApp number via a POST request.
Base URL: https://wamessageapi.com/api/link
All requests must be made to this base URL.
To authenticate requests, you must include the API Key (apiKey) and the Instance ID in the header.
{
"apiKey": "Your API Key here",
"id": "Your Instance ID here"
}
The request body must be a JSON object with the following structure:
{
"number": "5511999999999", // Recipient number
"link": "https://mywebsite.com", // URL to be sent
"caption": "Check out this link!" // (Optional) Link caption
}
const axios = require("axios"); let data = JSON.stringify({ "id": "INSTANCE_ID", "number": "5511999999999", "link": "https://mywebsite.com", "caption": "Check out this link!" }); let config = { method: 'post', url: 'https://wamessageapi.com/api/link', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => console.log(response.data)) .catch((error) => console.log(error));
{
"success": true,
"message": "Link sent successfully!",
"messageId": "1234567890"
}
{
"error": "Invalid phone number."
}
This API allows sending product information to a WhatsApp number via a POST request.
Base URL: https://wamessageapi.com/api/product
All requests must be made to this base URL.
To authenticate requests, you must include the API Key (apiKey) and the Instance ID (identification) in the header.
{
"apiKey": "Your API Key here",
"id": "Your Instance ID here"
}
The request body must be a JSON object with the following structure:
{
"number": "5511999999999",
"title": "Example Product",
"description": "Detailed product description.",
"price": "$99.90",
"image": "https://mywebsite.com/product.jpg",
"link": "https://mywebsite.com/product"
}
Examples in Node.js, Python, and C:
The API will respond with a JSON object confirming success or indicating an error.
{
"success": true,
"message": "Product sent successfully!",
"messageId": "[email protected]_ABCDEF"
}
This API allows sending a product catalog to a WhatsApp number via a POST request.
Base URL: https://wamessageapi.com/api/catalog
All requests must be made to this base URL.
To authenticate requests, you must include the API Key (apiKey) and the Instance ID (identification) in the header.
{
"apiKey": "Your API Key here",
"id": "Your Instance ID here"
}
The request body must be a JSON object with the following structure:
{
"number": "5511999999999",
"catalog": [
{
"title": "Product 1",
"description": "Description of product 1.",
"price": "$49.90",
"image": "https://mywebsite.com/product1.jpg",
"link": "https://mywebsite.com/product1"
},
{
"title": "Product 2",
"description": "Description of product 2.",
"price": "$99.90",
"image": "https://mywebsite.com/product2.jpg",
"link": "https://mywebsite.com/product2"
}
]
}
const axios = require("axios"); let data = JSON.stringify({ "id": "INSTANCE_ID", "number": "5511999999999", "catalog": [{ "title": "Product 1", "description": "Description of product 1.", "price": "$49.90", "image": "https://mywebsite.com/product1.jpg", "link": "https://mywebsite.com/product1" }] }); let config = { method: 'post', url: 'https://wamessageapi.com/api/catalog', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => console.log(response.data)) .catch((error) => console.log(error));
This API allows sending contact information to a WhatsApp number via a POST request.
Base URL: https://wamessageapi.com/api/contact
All requests must be made to this base URL.
To authenticate requests, you must include the API Key (apiKey) and the Instance ID (identification) in the header.
{
apiKey: "Your API key here",
id: "Your instance ID here"
}
The request body should be a JSON object with the following structure:
{
"number": "5511999999999", // Recipient's number
"contactName": "John Doe", // Contact's name
"contactNumber": "5511987654321", // Contact's phone number
"message": "Here is the contact you requested." // (Optional) Additional message
}
const axios = require("axios"); let data = JSON.stringify({ "id": "INSTANCE_ID", "number": "5511999999999", "contactName": "John Doe", "contactNumber": "5511987654321", "message": "Here is the contact you requested." }); let config = { method: 'post', url: 'https://wamessageapi.com/api/contact', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then(response => console.log(response.data)) .catch(error => console.error(error));
The API will respond with a JSON object containing confirmation or an error message.
{
"message": "Contact sent successfully!",
"phone": "5511999999999",
"messageId": "Message ID"
}
{
"error": "Error sending contact, error.message"
}
The API may return the following HTTP status codes:
Esta API permite o envio de enquetes para um número do WhatsApp via uma requisição POST.
URL Base: https://wamessageapi.com/api/poll
Todas as requisições devem ser feitas para esta URL base.
Para autenticar as requisições, inclua a Chave da API (apiKey) e o ID da Instância (identification) no cabeçalho da requisição.
{
"apiKey": "Sua chave da API aqui",
"id": "Seu ID da instância aqui"
}
O corpo da requisição deve ser um objeto JSON com a seguinte estrutura:
{
"number": "5511999999999",
"question": "Qual é a sua cor favorita?",
"options": ["Azul", "Verde", "Vermelho", "Amarelo"]
}
This API allows sending custom events to a WhatsApp number via a POST request.
Base URL: https://wamessageapi.com/api/event
All requests must be made to this base URL.
To authenticate the requests, you must include the API Key (apiKey) and the instance ID ID in the request header.
{
"apiKey": "Your API key here",
"id": "Your instance ID here"
}
The request body should be a JSON object with the following structure:
{
"number": "5511999999999", // Recipient's phone number
"eventType": "promo", // Event type (e.g., "promo", "reminder", "update")
"message": "Special promotion! 30% off for the first 100 customers." // Event message
}
const axios = require("axios"); let data = JSON.stringify({ "id": "INSTANCE_ID", "number": "5511999999999", "eventType": "promo", "message": "Special promotion! 30% off for the first 100 customers." }); let config = { method: 'post', url: 'https://wamessageapi.com/api/event', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => console.log(response.data)) .catch((error) => console.log(error));
{
"success": true,
"message": "Event sent successfully!",
"eventId": "1234567890"
}
{
"error": "Invalid phone number."
}
This API allows responding to previously sent events to a WhatsApp number via a POST request.
Base URL: https://wamessageapi.com/api/event-response
All requests must be made to this base URL.
To authenticate the requests, you must include the API Key (apiKey) and the instance ID Id (identification) in the request header.
{
"apiKey": "Your API key here",
"id": "Your instance ID here"
}
The request body should be a JSON object with the following structure:
{
"messageId": "1234567890",
"responseText": "Thank you for the promotion!",
"sender": "5511999999999"
}
Examples in Node.js, Python, and C:
The API will respond with a JSON object containing either a confirmation or an error message.
{
"success": true,
"message": "Response sent successfully!",
"messageId": "[email protected]_ABCDEF"
}
This API allows pinning messages in a WhatsApp chat via a POST request.
Base URL: https://wamessageapi.com/api/fixate
All requests must be made to this base URL.
To authenticate the requests, you must include the API Key (apiKey) and the instance ID Id (identification) in the request header.
{
"apiKey": "Your API key here",
"id": "Your instance ID here"
}
The request body should be a JSON object with the following structure:
{
"messageId": "1234567890",
"chatId": "[email protected]"
}
const axios = require("axios"); let data = JSON.stringify({ "id": "INSTANCE_ID", "messageId": "1234567890", "chatId": "[email protected]" }); let config = { method: 'post', url: 'https://wamessageapi.com/api/fixate', headers: { 'apiKey': 'Bearer Your_ApiKey', 'id': 'Your_Instance_ID_Here', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => console.log(response.data)) .catch((error) => console.log(error));
This API allows sending a location to a WhatsApp number via a POST request.
Base URL: https://wamessageapi.com/api/location
All requests must be made to this base URL.
To authenticate the requests, include the API Key (apiKey) and the instance ID Id (identification) in the request header.
{
"apiKey": "Your API key here",
"id": "Your instance ID here"
}
The request body should be a JSON object with the following structure:
{
"number": "5511999999999",
"latitude": "-23.550520",
"longitude": "-46.633308",
"address": "Avenida Paulista, São Paulo, Brasil"
}