Send Message via WhatsApp Instance
POST
/v1/instance/{{INSTANCE_ID}}/message/sendThis API allows sending a message through a specific WhatsApp instance. The request requires the instance ID, authorization token, and the message content, along with the recipient's phone number.
Request Parameters
Path Parameters
instance_id
(string) - The unique identifier of the WhatsApp instance. Replacegej1iz4pta
with your actual instance ID.
Headers
Authorization
(string, required) - Bearer token for authentication. Replace{{ZAPLY_AUTH_TOKEN}}
with your API token.Content-Type
(string, required) - Specifies that the request body is in JSON format. Useapplication/json
.
Request Body
The body should be in JSON format and include the following parameters:
message
(string, required) - The text message to be sent.- Example:
"This is a test message from Zaply 🚀"
- Example:
number
(string, required) - The phone number of the recipient, including the country code.- Example:
"918367875645"
- Example:
Example JSON Request Body:
{
"message": "This is a test message from Zaply 🚀",
"number": "918367875645"
}
Error Codes
401 Unauthorized
- Invalid or missingAuthorization
token.400 Bad Request
- Invalid input parameters (e.g., missing required fields).404 Not Found
- Instance ID does not exist.500 Internal Server Error
- Server encountered an unexpected condition.
Request
{
"message": "This is a test message from Zaply 🚀",
"number": "918147069203"
}
Request samples
Responses
{}