Official client libraries for the MsGine API. Send SMS, WhatsApp, email and push notifications, receive delivery events by webhook, and run workflows from your own code.
| Language | Package | Folder | Install |
|---|---|---|---|
| Node.js / TypeScript | @msgine/sdk |
typescript | npm install @msgine/sdk |
| Python | msgine |
python | pip install msgine |
| Go | github.com/kasimlyee/msgine-sdk/go |
go | go get github.com/kasimlyee/msgine-sdk/go |
Each folder is a separate package with its own README, tests and version. API reference and guides: docs.msgine.net.
- Covers the whole developer API: SMS, WhatsApp (including inbound messages), email, push notifications and devices, message lookup, webhooks, workflows (runs, launches, secrets, messaging policy, workflow URLs), events, opt-outs, contact fields and analytics.
- Retries rate limits, server errors and network failures with backoff. Sends carry an idempotency key that stays the same across attempts, so a retry never sends a message twice.
- Signs requests when the API key has signing turned on.
- Verifies webhook signatures (
X-MsGine-Signature) in constant time, with a five-minute window. - Returns API errors as one error type with
status,code,messageanddetails.
import { MsGine } from '@msgine/sdk';
const msgine = new MsGine({ apiKey: process.env.MSGINE_API_KEY! });
await msgine.sms.send({ to: '+256701234567', message: 'Hello from MsGine' });from msgine import MsGine
msgine = MsGine(api_key=os.environ["MSGINE_API_KEY"])
msgine.sms.send(to="+256701234567", message="Hello from MsGine")client, err := msgine.New(os.Getenv("MSGINE_API_KEY"))
_, err = client.SMS.Send(ctx, msgine.SendSMSParams{To: []string{"+256701234567"}, Message: "Hello from MsGine"})Create API keys in the dashboard under Developers → API keys. Sandbox keys send nothing and charge nothing.
Each package is released on its own by pushing a tag. The tag version must match the version in the package.
| Package | Bump | Tag | Publishes to |
|---|---|---|---|
| TypeScript | version in typescript/package.json |
typescript/v2.0.0 |
npm, with provenance |
| Python | version in python/pyproject.toml |
python/v1.0.0 |
PyPI |
| Go | Version in go/client.go |
go/v1.0.0 |
Go module proxy and pkg.go.dev |
git tag typescript/v2.0.0 && git push origin typescript/v2.0.0npm and PyPI publish through trusted publishing (GitHub OIDC), so the repository holds no registry tokens. The release workflow runs the package's tests before publishing.
Run the checks for the package you change:
cd typescript && npm ci && npm run typecheck && npm test
cd python && pip install -e '.[dev]' && ruff check . && mypy --strict src && pytest
cd go && gofmt -l . && go vet ./... && go test -race ./...Behaviour must stay the same in every language: when you add an endpoint or change retries, signing or errors, change all three.
MIT