Appearance
API Reference
Welcome to the WhatsGate API reference. This section provides detailed information about all available API endpoints, request parameters, and response formats.
Base URL
All API endpoints are relative to your WhatsGate instance URL:
https://{subdomain}.whatsgate.net/apiAuthentication
All API requests require authentication using an API token. You need to include your token in the request headers:
Access-Token: {api_token}Learn more about creating and managing API tokens.
API Endpoints
The WhatsGate API is organized around the following resource categories:
Messages
- Send Text Message
- Send Image Message
- Send Video Message
- Send Audio Message
- Send File/Document Message
- Send Location Message
Devices
Reports
MCP
Response Format
All API responses are returned in JSON format. Successful responses typically include a success field set to true and a message field with additional information:
json
{
"success": true,
"message": "Message will be sent to 1 phone numbers"
}Error responses include a success field set to false and a message field with an error description:
json
{
"success": false,
"message": "Invalid phone number format"
}Error Handling
The API uses standard HTTP status codes to indicate the success or failure of requests:
200 OK: The request was successful400 Bad Request: The request was invalid or cannot be served403 Forbidden: Authentication failed, the API token is invalid, or the plan does not allow API access404 Not Found: The requested resource could not be found422 Unprocessable Entity: The request was well-formed but could not be processed500 Internal Server Error: An error occurred on the server
Rate Limiting
The API is limited to 60 requests per minute. If you exceed the rate limit, you'll receive a 429 Too Many Requests response.
