API documentation

Reference for the WhatsApp Messaging and OTP APIs.
Base URL: https://wa.dynamicsoft.biz/api/v1. Authenticate with your API key as a Bearer token (or X-Api-Key header).

Send a text message

curl -X POST https://wa.dynamicsoft.biz/api/v1/send \
  -H "Authorization: Bearer wak_xxxxxxxx_yourkey" \
  -H "Content-Type: application/json" \
  -d '{ "to": "923001234567", "text": "Hello from DSS WhatsApp API" }'

Send a PDF (receipt)

Pass a public file URL (mediaUrl) or a base64 string (mediaBase64).

curl -X POST https://wa.dynamicsoft.biz/api/v1/send-media \
  -H "Authorization: Bearer wak_xxxxxxxx_yourkey" \
  -H "Content-Type: application/json" \
  -d '{ "to": "923001234567",
        "mediaUrl": "https://yourserver.com/receipt_123.pdf",
        "filename": "Receipt-123.pdf",
        "caption": "Your receipt is attached" }'

Send a verification code (OTP)

We generate the code, WhatsApp it to the number, and check it for you — no need to build code generation yourself.

curl -X POST https://wa.dynamicsoft.biz/api/v1/otp/send \
  -H "Authorization: Bearer wak_xxxxxxxx_yourkey" -H "Content-Type: application/json" \
  -d '{ "to": "923001234567" }'

Options: length (4–8), ttl_seconds, template (must contain {{code}}).

Verify the code

When the user types the code back, verify it (no WhatsApp number needed):

curl -X POST https://wa.dynamicsoft.biz/api/v1/otp/verify \
  -H "Authorization: Bearer wak_xxxxxxxx_yourkey" -H "Content-Type: application/json" \
  -d '{ "to": "923001234567", "code": "123456" }'

Returns { "valid": true|false, "attemptsLeft": n }. Codes are single-use, expire, and are attempt-limited.

Check status

curl https://wa.dynamicsoft.biz/api/v1/status -H "Authorization: Bearer wak_xxxxxxxx_yourkey"

Numbers are addressed in international format, digits only (e.g. 923001234567). Sending requires an active subscription and a connected WhatsApp number.