Send a message
sendkuy_send_messageSends one message body to up to 100 recipients on WhatsApp, SMS or email. Use it for alerts, summaries or one-off notifications where everyone receives the same text.
Instructions
Send one message body to 1 to 100 recipients on one channel: WhatsApp, SMS or email. Use it for an alert, a summary or a one-off notification where everyone gets the same text. To reach a saved contact group, put its grp_ id in to. When each recipient needs different content (a summary per branch, a notification per order) use sendkuy_send_batch. A campaign prepared in the SendKuy dashboard is started with sendkuy_start_campaign and can be paused or cancelled midway. Phone numbers must be E.164 with the leading + (for example +6281234567890). This really sends and spends SendKuy credit. A recipient on the suppression list or who unsubscribed still gets a message id and fails later; read the final status with sendkuy_get_messages. One recipient is sent while you wait; several are queued and sent in the background, paced per number. Pass dedupe_key so a retried step does not send twice. The answer counts every message per status and lists the first 20; read the rest with sendkuy_list_messages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipients: E.164 phone numbers (or email addresses on email), contact ids (con_...) from sendkuy_find_contacts, or group ids (grp_...) from sendkuy_list_groups. A group sends to every member. | |
| body | Yes | The text. HTML is allowed on email. | |
| media | No | WhatsApp only. One attachment, fetched from a URL you host. | |
| channel | Yes | ||
| subject | No | Required on email, refused on other channels. | |
| dedupe_key | No | A key derived from the event this call reports, such as "order-1234-shipped" or "daily-revenue-2026-10-29". Calling again with the same key and the same input returns the first answer instead of sending twice. The same key with different input is refused with idempotency_key_reused, so keep changing values such as the time out of a deduplicated message. A refusal (for example insufficient_credits or a bad number) is remembered under the key too: after fixing it, retry with a new key. Keys are remembered for about 24 hours. | |
| gateway_id | No | Optional sender. Leave it out and SendKuy picks a live sender on the channel and moves to the next one if it fails. | |
| attachments | No | Email only, at most ten files fetched from URLs you host. | |
| schedule_at | No | Send later instead of now, as ISO 8601 with a time zone offset, for example 2026-11-01T09:00:00+07:00. | |
| template_id | No | WhatsApp only. A template id from sendkuy_list_templates. | |
| template_parameters | No | WhatsApp only. Values for the template variables. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| messages | Yes | ||
| by_status | Yes | ||
| truncated | Yes |