POST

Send Text Messages

Popular

Dispatches 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

POSThttps://api-wa.hidessh.com/api/v1/wa/messages/send

Authentication

This endpoint requires Bearer authentication via your secret API Key.
Header KeyValueRequired
AuthorizationBearer <your_api_key>Required
Content-Typeapplication/jsonRequired

Request Parameters

The request body must be formatted as JSON with the following parameters:

ParameterTypeRequiredDescription
phone
stringRequired

Target recipient phone number in international E.164 format without spaces, dashes, or leading plus. Example: 628123456789.

example: 628123456789
message
stringRequired

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
stringOptional

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
booleanOptional

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
integerOptional

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

request.sh
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.

application/json • 200 OK
{
  "messaging_product": "whatsapp",
  "contacts": [
    {
      "input": "628123456789",
      "wa_id": "628123456789"
    }
  ],
  "messages": [
    {
      "id": "3EB0A1B2C3D4E5F6"
    }
  ]
}

Response Attributes Breakdown

AttributeTypeDescription
messaging_productstringIdentifies the messaging platform. Always returns 'whatsapp'.
contacts[].inputstringThe original phone number string provided in the request.
contacts[].wa_idstringNormalized international WhatsApp JID identifier without suffixes.
messages[].idstringUnique WhatsApp message ID assigned by WhatsApp servers (e.g., 3EB0...). Can be tracked via webhooks for delivery status.

Error Codes & Troubleshooting

StatusError CodeDescriptionRecommended Action
400INVALID_PHONE_NUMBERPhone number contains non-numeric characters, too few digits, or starts with 0.Format phone number to international E.164 (e.g., 628123456789).
401UNAUTHORIZEDAPI Key is missing from Authorization header or revoked.Check Authorization: Bearer <API_KEY> header.
429WARMUP_LIMIT_EXCEEDEDDevice is still in warmup period and reached its daily send ceiling.Distribute across older devices or configure round-robin auto rotation.
503DEVICE_OFFLINETarget WhatsApp device session disconnected.Re-pair device using QR code endpoint or dashboard.