Skip to content

SDK changelog

Releases of @smsfabric/sdk on npm. The package follows semantic versioning: a minor version adds methods, a major version may change or remove them.

  • Standalone verifySignature and constructEvent exports. A webhook receiver no longer needs a client or an API key. See Webhooks.
  • The RawBody type. A raw webhook body may also be a Uint8Array, for example from await request.arrayBuffer().
  • SMSFabricError.headers and SMSFabricError.retryAfter (seconds, from Retry-After). See Errors.
  • Network errors keep the original error on cause and name it in the message, for example fetch failed (connect ECONNREFUSED 127.0.0.1:3000).
  • isRetryable(status, code): the client’s retry rule.
  • An explicit accessToken is used even when SMSFABRIC_API_KEY is set. Before, the environment key won and user-only endpoints answered 403 api_key_not_allowed.
  • Only 409 idempotency_in_progress is retried. Conflicts such as 409 contact_exists are thrown at once.
  • A DELETE retried after a network error, timeout or 5xx resolves when the retry gets 404.
  • constructEvent throws SignatureVerificationError for a correctly signed body that is not a JSON object, instead of a SyntaxError.
  • Empty apiKey, accessToken, baseUrl, SMSFABRIC_API_KEY and SMSFABRIC_BASE_URL values count as not set.
  • Credential order: an apiKey you pass, then an accessToken you pass, then SMSFABRIC_API_KEY.
  • 409 is retried only for idempotency_in_progress.
  • A retried DELETE may resolve on 404.
  • An unparsable signed webhook body throws SignatureVerificationError.

First public release on npm.

  • Messages: send, list, listAll, get, stats, exportCsv.
  • Verify (OTP): verifications.send, check, get, list, listAll; verifications.settings.get, update.
  • Devices and SIMs: devices.createPairingToken, list, get, update, delete, updateSim, setDefaultSim.
  • Pools: pools.list, create, update, delete.
  • Webhooks: webhooks.list, create, update, delete, deliveries, deliveriesAll, replay, test, plus verifySignature and constructEvent; webhooks.listen streams the organization’s events to your machine for development (GET /v1/webhooks/listen), rotating and reconnecting on its own.
  • Blacklist: blacklist.list, listAll, add, remove.
  • Contacts: contacts.*, contacts.groups.*, contacts.imports.* (CSV upload and start), with listAll on every list.
  • Templates and campaigns: templates.* (with preview), campaigns.* (with estimate, start, pause, resume, cancel, report).
  • Organization: org.get, update; org.members.list, update, remove; org.invitations.list, create, revoke.
  • Plan: plan.get returns the plan, its limits with add-ons, the features and the usage (GET /v1/org/plan).
  • Preferences: preferences.get, update.
  • Audit log: audit.list, listAll.
  • API keys: apiKeys.list, create, rotate, revoke.
  • Retries on 429, 5xx and network errors with backoff that honours Retry-After; an Idempotency-Key on every create. 429 quota_exceeded (a used-up plan allowance) is thrown at once, never retried.
  • SMSFabricError carries status, code, detail, errors, requestId and, on plan refusals, params.
  • ESM and CommonJS builds with type declarations; no runtime dependencies.