Skip to content

Quickstart ​

Start with an active Galatext account, an API key, and an SMS balance. See authentication to obtain credentials.

Send an SMS ​

POST /api/sms/send-api accepts recipients as an array of phone-number strings, even for a single recipient. Use your approved sender ID. The shared default is GALATEX and is limited to ten sent messages per account.

bash
curl -X POST https://api.galatext.com/api/sms/send-api \
  -H 'Content-Type: application/json' \
  -H "x-api-key: $GALATEXT_API_KEY" \
  -d '{
    "recipients": ["254712345678"],
    "message": "Your order is ready for collection.",
    "senderId": "YOURBRAND"
  }'

A typical successful 200 OK response has this shape:

json
{
  "success": true,
  "messageIds": ["MESSAGE_ID"],
  "totalSent": 1,
  "totalFailed": 0,
  "remainingCredits": 99
}

Check both the HTTP status and the body. A 200 response can contain success: false or partial sending failures. Sending acceptance does not confirm delivery to the handset.

Use JavaScript ​

bash
npm install galatext-api
js
import Galatext from 'galatext-api';

const client = new Galatext(process.env.GALATEXT_API_KEY);
const result = await client.sms.send(
  '254712345678',
  'Your order is ready for collection.',
  'YOURBRAND',
);
if (!result.success) console.error(result.error, result.totalFailed);

Use the workspace APIs ​

The updated SDK also supports bearer-authenticated campaigns, USSD, airtime, and WhatsApp:

js
const client = new Galatext(null, {
  accessToken: process.env.GALATEXT_ACCESS_TOKEN,
});
const services = await client.ussd.list({ page: 1, limit: 10 });

These methods are included in SDK version 1.3.0. Build the local SDK when testing changes before the release is published. See SDK setup.

Next steps ​

Powered by Galatext Software