Build with WhatsApp API
Integrate WhatsApp messaging into your applications with our RESTful API.
Getting Started
1 Get your API key
Generate an API key from your portal dashboard: /my/whatsapp/api-keys
2 Set the Authorization header
Authorization: Bearer YOUR_API_KEY
3 Make your first request
curl -X POST https://www.procomrades.com/api/v1/wa/send/text \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone": "+1234567890", "text": "Hello from the API!"}'
API Scopes
| Scope | Description |
|---|---|
messages |
Send and receive WhatsApp messages (text, media, templates) |
conversations |
Read, assign, and resolve conversation threads |
contacts |
Manage WhatsApp contact lists and attributes |
templates |
Create, update, and delete message templates |
campaigns |
Launch and monitor bulk messaging campaigns |
API Reference
Messages
Conversations
Contacts
Templates
Campaigns
Usage
Webhooks
Code Examples
Send a text message in your favorite language
curl -X POST https://www.procomrades.com/api/v1/wa/send/text \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone": "+1234567890", "text": "Hello from our API!"}'
import requests
response = requests.post(
"https://www.procomrades.com/api/v1/wa/send/text",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"phone": "+1234567890",
"text": "Hello from our API!",
},
)
print(response.json())
const response = await fetch("https://www.procomrades.com/api/v1/wa/send/text", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
phone: "+1234567890",
text: "Hello from our API!",
}),
});
const data = await response.json();
console.log(data);
$ch = curl_init("https://www.procomrades.com/api/v1/wa/send/text");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_API_KEY",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"phone" => "+1234567890",
"text" => "Hello from our API!",
]),
]);
$response = curl_exec($ch);
echo $response;
Error Codes
| Status Code | Error | Description |
|---|---|---|
| 400 | Bad Request | The request body is malformed or missing required fields. Check the JSON payload and ensure all required parameters are provided. |
| 401 | Unauthorized | The API key is missing, invalid, or has been revoked. Verify your Authorization header contains a valid Bearer token. |
| 403 | Insufficient Scope | Your API key does not have the required scope for this endpoint. Check the endpoint's required scopes and update your key permissions. |
| 404 | Not Found | The requested resource does not exist. Verify the endpoint URL and any resource IDs in the path. |
| 429 | Rate Limit / Quota Exceeded | You have exceeded the per-minute rate limit or your monthly API call quota. Wait before retrying or upgrade your plan for higher limits. |
| 500 | Internal Server Error | An unexpected error occurred on the server. If the issue persists, contact support with the request ID from the response headers. |
Rate Limiting
To ensure fair usage and platform stability, all API keys are subject to rate limiting:
- Per-key default:
100 requests per minute. Requests exceeding this threshold will be queued or rejected. - Monthly API call quota: Each subscription plan includes a monthly API call allowance. Once exhausted, all API calls are rejected until the next billing cycle or until you upgrade your plan.
- HTTP 429 response: When either the per-minute rate limit or the monthly quota is exceeded, the API returns a
429 Too Many Requestsstatus. The response includes aRetry-Afterheader indicating how many seconds to wait before retrying.
HTTP/1.1 429 Too Many Requests
Retry-After: 30
Content-Type: application/json
{
"error": "rate_limit_exceeded",
"message": "Too many requests. Please retry after 30 seconds.",
"retry_after": 30
}
Webhooks
Receive real-time notifications when events occur on your WhatsApp account by registering webhook endpoints.
Registration
Register a webhook URL via the API:
POST /api/v1/wa/webhooks
{
"url": "https://your-server.com/webhook",
"events": ["message.received", "message.status"],
"secret": "your_webhook_secret"
}
Supported Events
| Event | Description |
|---|---|
message.received |
Fired when a new inbound message is received from a contact |
message.status |
Fired when a message status changes (sent, delivered, read, failed) |
conversation.assigned |
Fired when a conversation is assigned to an agent or team |
conversation.resolved |
Fired when a conversation is marked as resolved |
HMAC-SHA256 Signature Verification
Every webhook request includes an X-WA-Signature header containing an
HMAC-SHA256 hex digest of the request body, signed with your webhook secret.
Always verify this signature before processing the payload.
import hmac
import hashlib
def verify_signature(payload_body, signature, secret):
"""Verify the X-WA-Signature header."""
expected = hmac.new(
secret.encode("utf-8"),
payload_body,
hashlib.sha256,
).hexdigest()
return hmac.compare_digest(expected, signature)
Payload Format
{
"event": "message.received",
"timestamp": "2026-03-26T12:00:00Z",
"data": {
"message_id": "wamid.HBgN...",
"from": "+1234567890",
"type": "text",
"text": "Hi, I need help with my order.",
"conversation_id": 42
}
}