Skip to content

Send SMS ​

Send the same message to one or more recipients using an API key.

text
POST /api/sms/send-api
x-api-key: YOUR_API_KEY
Content-Type: application/json
FieldTypeRequiredDescription
recipientsstring[]YesBetween 1 and 1,000 phone-number strings
messagestringYesNon-empty message text
senderIdstringYesAn approved sender ID belonging to your account, or the shared GALATEX default
scheduledAtISO date stringNoA future delivery time, including timezone
bash
curl -X POST https://api.galatext.com/api/sms/send-api \
  -H "x-api-key: $GALATEXT_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"recipients":["254712345678"],"message":"Your verification code is 482916.","senderId":"YOURBRAND"}'

The API requires recipients: ["254712345678"]; a top-level phoneNumber or an array of recipient objects is rejected. reference, webhookUrl, and per-recipient template fields are not supported by this endpoint.

JavaScript SDK ​

js
const result = await client.sms.send('254712345678', 'Your verification code is 482916.', 'YOURBRAND');

For scheduling:

js
const scheduledAt = new Date(Date.now() + 60 * 60 * 1000).toISOString();
const result = await client.sms.send('254712345678', 'Your appointment is tomorrow.', 'YOURBRAND', { scheduledAt });

Use a future timestamp; a past timestamp does not schedule a future send. For draft editing, cancellation, or campaign reports, use campaigns.

Response ​

A successful HTTP request returns 200 with success, messageIds, totalSent, totalFailed, and remainingCredits. Failed or partial sends may include error. Scheduled acceptance returns zero sent messages while the messages wait for their delivery time.

Check success and totalFailed even on 200 responses. A timeout leaves the outcome uncertain; review message history before retrying to avoid duplicate SMS. See delivery reports.

Powered by Galatext Software