Send WhatsApp messages via approved WhatsApp Templates, either through your own connected Business Account or the default KudiSMS fixed number for OTPs.
Send WhatsApp (custom template)
POST
/whatsapp_customRequires connecting your WhatsApp Business Manager to KudiSMS, adding your WhatsApp Business phone numbers, and submitting your WhatsApp Templates for approval. Messages are sent from your business-branded WhatsApp number, and you can see and reply to customer responses.
| Field | Example | Description |
|---|---|---|
| token* | Api Key | Your API key. |
| recipient* | 23480xxxx | Recipient phone number. |
| phone_number_id* | xxxxxxxxxxxxxxx | Sender WhatsApp Phone Number ID — from the Connect WhatsApp page (/user/whatsapp_connect). |
| template_code* | xxxxxxxxxxxx | Template code to use — from the Custom WhatsApp Template page (/user/whatsapptemplatereport). |
| parameters | xxxx,xxxxx,xxxx,xxxx | Required parameters in the template body, comma-separated. |
| button_parameters | xxxx,xxxx,xxx | Button parameter for a Dynamic URL, e.g. https://example.com/{{1}} — value of URL parameter {{1}}. |
| header_parameters | xxxx,xxxx | Header parameters, if any. |
Example response — 200 OK
{
"status": "success",
"error_code": "000",
"data": "234XXXXXXXX|42a455f3-8d4d-a775-4311-13790d5820c0",
"msg": "Message sent Successfully"
}Send Default WhatsApp OTP
POST
/whatsappSends WhatsApp OTP messages via KudiSMS's fixed ID and WhatsApp Template — no need to connect your own WhatsApp Business Account or subscribe to the WhatsApp service.
Fixed values
template_code: 2147483647 (fixed) · parameters: your OTP value, e.g. 1234| Field | Example | Description |
|---|---|---|
| token* | Your KudiSMS API Key | Your API key. |
| recipient* | 23480xxxx | Recipient phone number. |
| template_code* | 2147483647 | Fixed template code (see above). |
| parameters* | 9889 | OTP value to send. |
Example response — 200 OK
{
"status": "error",
"error_code": "100",
"msg": "Token provided is invalid."
}