Skip to content

API Overview

Base URL

All API requests should be made to:

http://your-server:8080/api

Authentication

The Whatomate API uses JWT (JSON Web Tokens) for authentication. Include the access token in the Authorization header:

Terminal window
Authorization: Bearer <access_token>

See Authentication for details on obtaining tokens.

Response Format

All responses are returned in JSON format with the following structure:

Success Response

{
"status": "success",
"data": {
// Response data
}
}

Error Response

{
"status": "error",
"message": "Error description",
"data": null
}

HTTP Status Codes

CodeDescription
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing token
403Forbidden - Insufficient permissions
404Not Found
500Internal Server Error

Rate Limiting

API requests are subject to rate limiting to ensure fair usage:

  • Standard: 100 requests per minute
  • Bulk operations: 10 requests per minute

Rate limit headers are included in responses:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640000000

Pagination

List endpoints support pagination using page and limit query parameters:

Terminal window
GET /api/contacts?page=1&limit=20

Paginated responses include:

{
"status": "success",
"data": {
"items": [...],
"total": 100,
"page": 1,
"limit": 20,
"total_pages": 5
}
}

API Endpoints

Authentication

Register, login, and manage tokens. View →

Users

User management (Admin only). View →

Contacts

Manage contacts and assignments. View →

Messages

Send and receive messages. View →

Templates

Manage message templates. View →

Flows

WhatsApp Flows management. View →

Chatbot

Chatbot configuration. View →

Webhooks

Receive real-time updates. View →

Analytics

Dashboard and message analytics. View →