sendSMS to deliver a message to a single recipient. The method makes a POST request to the Pindo SMS API and returns the API response as a Promise.
Endpoint: POST https://api.pindo.io/v1/sms/
Parameters
sendSMS accepts a single SMSPayload object:
The recipient’s phone number in E.164 format, for example
+250781234567. The number must include the country code prefix (e.g. +250 for Rwanda).The message body to send. Plain text only.
The sender ID displayed to the recipient. This must be a sender ID registered in your Pindo account. See Sender IDs for how to create one.
Phone number formatting
Pindo requires phone numbers in E.164 format:- Always start with
+followed by the country code - No spaces, dashes, or parentheses
- Examples:
+250781234567(Rwanda),+254712345678(Kenya),+1415xxxxxxx(USA)
Code example
Error handling
sendSMS returns a Promise. If the API request fails (network error, invalid token, bad payload), the Promise rejects. Always wrap calls in a try/catch block:
The method returns the full Pindo API response object. The exact shape depends on the API version. Log the response during development to inspect the fields available for your use case.