Skip to main content

Signature

sendBulkSMS(payload: BulkSMSPayload): Promise<any>

HTTP request

POST https://api.pindo.io/v1/sms/bulk

Parameters

recipients
object[]
required
An array of recipient objects. Each object must include a phone number and a name.
text
string
required
The text content of the SMS. Use @contact.name as a placeholder to personalize the message with each recipient’s name.
sender
string
required
The sender ID displayed to all recipients.

Personalization

Include @contact.name in the text field to automatically substitute each recipient’s name value. For example, 'Hello @contact.name, Welcome to Pindo' becomes 'Hello Remy Muhire, Welcome to Pindo' for a recipient named Remy Muhire.

Example

import { PindoSMS } from 'pindo-sms';

const pindo = new PindoSMS('your-api-token');

const result = await pindo.sendBulkSMS({
  recipients: [
    { phonenumber: '+250781234567', name: 'Remy Muhire' },
    { phonenumber: '+250789876543', name: 'Alice Uwase' },
  ],
  text: 'Hello @contact.name, Welcome to Pindo',
  sender: 'Pindo',
});

console.log(result);

Error handling

try {
  const result = await pindo.sendBulkSMS({
    recipients: [{ phonenumber: '+250781234567', name: 'Remy Muhire' }],
    text: 'Hello @contact.name, Welcome to Pindo',
    sender: 'Pindo',
  });
} catch (err) {
  console.error('Bulk SMS failed:', err.message);
}

Build docs developers (and LLMs) love