Send Text Messages
PopularDispatches an instant WhatsApp text message to a single recipient phone number with automatic typing simulation, Spintax variation, and smart device rotation.
Automatic Device Rotation & Delivery Dynamics
Includes automated typing presence simulation, device warmup pacing, and automatic round-robin fallback across active devices.
HTTP Endpoint
Authentication
| Header Key | Value | Required |
|---|---|---|
| Authorization | Bearer <your_api_key> | Required |
| Content-Type | application/json | Required |
Request Parameters
The request body must be formatted as JSON with the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
phone | string | Required | Target recipient phone number in international E.164 format without spaces, dashes, or leading plus. Example: 628123456789. example: 628123456789 |
message | string | Required | Text message body to send. Supports full UTF-8 emojis, WhatsApp bold (*bold*), italic (_italic_), strikethrough (~strike~), monospace (```code```), and Spintax format `{Hello|Hi|Greetings}`. example: Hello from Wahide WhatsApp API! Your verification code is 884920. |
device_id | string | Optional | Specific WhatsApp Device ID slot to dispatch the message from. If omitted or set to 'auto', the engine uses intelligent round-robin across all connected healthy devices. default: "auto"example: 01M1WW3FKR1JS7CW4KGY78Q5ND |
simulate_typing | boolean | Optional | When true, broadcasts a natural 'typing...' presence event to WhatsApp for the recipient before dispatching the message, emulating authentic human behavior. default: falseexample: true |
typing_delay_ms | integer | Optional | Custom typing indicator duration in milliseconds. If 0 or omitted with simulate_typing: true, duration is dynamically calculated based on message length (~40ms per character, clamped between 1,000ms and 5,000ms). default: 0example: 2500 |
Code Examples
curl -X POST "https://api-wa.hidessh.com/api/v1/wa/messages/send" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "628123456789",
"message": "Hello from Wahide WhatsApp API! Your order #INV-2026 is confirmed.",
"device_id": "auto",
"simulate_typing": true,
"typing_delay_ms": 1500
}'Response Formats
Message successfully queued and dispatched to WhatsApp.
Response Attributes Breakdown
| Attribute | Type | Description |
|---|---|---|
messaging_product | string | Identifies the messaging platform. Always returns 'whatsapp'. |
contacts[].input | string | The original phone number string provided in the request. |
contacts[].wa_id | string | Normalized international WhatsApp JID identifier without suffixes. |
messages[].id | string | Unique WhatsApp message ID assigned by WhatsApp servers (e.g., 3EB0...). Can be tracked via webhooks for delivery status. |
Error Codes & Troubleshooting
| Status | Error Code | Description | Recommended Action |
|---|---|---|---|
| 400 | INVALID_PHONE_NUMBER | Phone number contains non-numeric characters, too few digits, or starts with 0. | Format phone number to international E.164 (e.g., 628123456789). |
| 401 | UNAUTHORIZED | API Key is missing from Authorization header or revoked. | Check Authorization: Bearer <API_KEY> header. |
| 429 | WARMUP_LIMIT_EXCEEDED | Device is still in warmup period and reached its daily send ceiling. | Distribute across older devices or configure round-robin auto rotation. |
| 503 | DEVICE_OFFLINE | Target WhatsApp device session disconnected. | Re-pair device using QR code endpoint or dashboard. |