SMS reference
Transactional SMS, OTP, and WhatsApp template messages.
Endpoints
| Method | Path | Scope | Description |
|---|---|---|---|
| POST | /v1/sms/send | sms:send | Send an SMS or WhatsApp template message. |
| POST | /v1/sms/otp/start | sms:otp | Start an OTP challenge. |
| POST | /v1/sms/otp/verify | sms:otp | Verify a code. |
Quickstart
curl -X POST https://api.valienz.io/v1/sms/send \
-H "Authorization: Bearer $VALIENZ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+14155551212",
"body": "Your code is 123456",
"channel": "SMS"
}'Errors
| Code | HTTP | Description | Resolution |
|---|---|---|---|
| E_INVALID_E164 | 400 | Phone number is not E.164. | Format like +14155551212 (country code prefix, no spaces). |
| E_WHATSAPP_TEMPLATE_NOT_APPROVED | 403 | WhatsApp template is pending or rejected. | Wait for approval (up to 24h) or pick an approved template. |