Send a batch of messages
sendkuy_send_batchSends up to 500 personalized WhatsApp, SMS, or email messages in one call, with per-recipient content and independent results so failed rows do not block the rest.
Instructions
Send up to 500 independent messages in one call, each with its own channel, recipient and body. Use it when the content differs per recipient: a revenue summary per branch, a notification per order, a reminder per invoice. Every row is answered on its own: one bad number or a channel out of credit fails that row only, and the rest still go out. The answer lists the message id of every row in input order (null where the row failed) and each failed row with its error. Messages are queued and sent in the background, paced per number. 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. Pass dedupe_key so a retried step does not send the batch twice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| messages | Yes | ||
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | ||
| failed | Yes | ||
| accepted | Yes | ||
| failures | Yes |