Quickstart
Create an API credential
In Whatsaper, open Settings → API Credentials and create a key. Copy the key when Whatsaper shows it and store it securely.
API credentials require a plan with REST API access. See Authentication for scopes, workspace binding, and key rotation.
Make a request
Use a key with the view.contacts scope and supply your Workspace ID.
curl 'https://api.whatsaper.com/api/contacts?page=1&limit=10' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'X-Workspace-ID: YOUR_WORKSPACE_ID'{
"success": true,
"data": {
"contacts": [],
"pagination": {
"currentPage": 1,
"totalPages": 0,
"totalItems": 0,
"itemsPerPage": 10
}
}
}List WhatsApp templates
Find your WhatsApp Business Account with a key that has view.unified_whatsapp or manage.conversations.
curl 'https://api.whatsaper.com/api/whatsapp/waba-list' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'X-Workspace-ID: YOUR_WORKSPACE_ID'Copy the account’s _id from the response’s data array. Pass that ID as waba_id with a key that has view.template.
curl 'https://api.whatsaper.com/api/template?waba_id=YOUR_WHATSAPER_WABA_ID' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'X-Workspace-ID: YOUR_WORKSPACE_ID'The template response contains a count and a data array. The default platform is whatsapp, which requires waba_id. You can use platform=all to list templates across platforms.
Handle errors
Check the HTTP status before parsing the body. Authentication errors include a message field. Some endpoints, including the template list, return an error field for invalid input.
{
"error": "WABA ID is required"
}| Status | Meaning |
|---|---|
400 | Invalid request input |
401 | Missing or invalid API key |
403 | Permission or Workspace context required |
404 | Resource unavailable in the authorized Workspace |
429 | Rate limited |
Check the API reference for each endpoint’s inputs and responses.