Speko Docs

SMS

Send, schedule, batch, and manage compliant SMS with the TypeScript SDK.

The SDK exposes the complete messaging API under speko.sms:

const message = await speko.sms.messages.send({
  from_phone_number_id: '8f0e9a96-...',
  to: '+12025550123',
  text: 'Acme: your appointment is confirmed.',
  recipient_timezone: 'America/New_York',
  idempotencyKey: 'appointment-982-confirmation',
});

const batch = await speko.sms.batches.create({
  from_phone_number_id: '8f0e9a96-...',
  recipients: [
    {
      to: '+12025550123',
      text: 'Reminder',
      recipient_timezone: 'America/New_York',
    },
  ],
  idempotencyKey: 'reminders-2026-09-01',
});

Use messages.list/get/cancel, batches.get/messages/cancel, conversations.list/get/messages/send/update/markRead/addNote/redact, consents.list/create/import/revoke, suppressions.list, and settings.get/update.

Live events are an async iterator:

for await (const event of speko.sms.stream({ signal: abortController.signal })) {
  console.log(event.event, event.message_id, event.status);
}