Skip to main content
Use sendBulkSMS to deliver a message to multiple recipients at once. Each recipient can receive a personalized version of the message using the @contact.name token. Endpoint: POST https://api.pindo.io/v1/sms/bulk

Parameters

sendBulkSMS accepts a single BulkSMSPayload object:
recipients
object[]
required
An array of recipient objects. Each object must have:
  • phonenumber (string, required) — Phone number in E.164 format, e.g. +250781234567
  • name (string, required) — The recipient’s name, used to resolve the @contact.name token in the message text
text
string
required
The message body. Use @contact.name anywhere in the text and it will be replaced with each recipient’s name value.
sender
string
required
The sender ID displayed to recipients. Must be a sender ID registered in your Pindo account. See Sender IDs.

Personalization

The @contact.name token in the text field is replaced with the matching recipient’s name at send time. This lets you personalize bulk messages without making individual API calls.
text: 'Hello @contact.name, Welcome to Pindo'
For a recipient with name: 'Alice', this becomes: Hello Alice, Welcome to Pindo.

Code example

import 'dotenv/config';
import { PindoSMS, BulkSMSPayload } from 'pindo-sms';

const pindo = new PindoSMS(process.env.PINDO_API_TOKEN!);

async function sendBulkMessage() {
  const payload: BulkSMSPayload = {
    recipients: [
      { phonenumber: '+250781234567', name: 'Alice' },
      { phonenumber: '+250787654321', name: 'Bob' },
      { phonenumber: '+250789012345', name: 'Carol' },
    ],
    text: 'Hello @contact.name, Welcome to Pindo',
    sender: 'MyApp',
  };

  try {
    const response = await pindo.sendBulkSMS(payload);
    console.log('Bulk SMS sent:', response);
  } catch (error) {
    console.error('Failed to send bulk SMS:', error);
  }
}

sendBulkMessage();
All phone numbers in the recipients array must be in E.164 format (e.g. +250781234567). See Sending SMS for formatting guidance.
sendBulkSMS returns a Promise that resolves with the full Pindo API response. Wrap calls in try/catch to handle network errors or API failures.

Build docs developers (and LLMs) love