Azmarq Omni SDK
Install once. Send SMS, WhatsApp, RCS, and OTP with your API key.
Official client libraries for the Azmarq API. TypeScript/Node, Python, Go, PHP, Java, C#, and Ruby — all live. You do not write HTTP calls.
Jump to quickstart →Posts to https://api.azmarq.com · header: apikey
$ npm install azmarqomni
| 1 | import { Azmarq } from "azmarqomni"; |
| 2 | |
| 3 | const client = new Azmarq(); |
| 4 | const result = await client.send({ |
| 5 | channel: "sms", |
| 6 | from: "SENDER", |
| 7 | to: "9800000001", |
| 8 | text: "Hello from Azmarq", |
| 9 | }); |
- ✓Client initialized
- ✓Fields validated locally
- ✓POST → api.azmarq.com
- ·messageId returned
How it works
Connect once. Send on every channel.
01
Connect
Install your language package. Create a client with AZMARQ_API_KEY from Developer → API Key.
02
Send
One request with channel, from, to, and text or template. The SDK sends the apikey header.
03
Confirm
Read messageId for the first recipient. The original API body stays on raw.
Authenticate users
OTP generate/validate and SMS auth codes when login or step-up needs a phone.
Keep customers informed
Order updates, payment alerts, and utility templates on SMS, WhatsApp, or RCS.
Run transactional campaigns
TRANS / PROMO SMS and RCS, WhatsApp templates — same client, channel you already enabled.
Install
Seven languages. All live.
TypeScript is the Node package and ships .d.ts types. Python installs as azmarqomni and imports as azmarq. Server-side only.
TypeScript / Node.js
npm install azmarqomni
import { Azmarq } from "azmarqomni"
Python
pip install azmarqomni
from azmarq import Azmarq
Go
go get github.com/azmarq/azmarqomni
azmarqomni.New(...)
PHP
composer require azmarq/azmarqomni
new Azmarq\Azmarq(...)
Java
com.azmarq:azmarqomni:0.2.0
new com.azmarq.omni.Azmarq(...)
C#
dotnet add package Azmarqomni
new Azmarqomni.Azmarq(...)
Ruby
gem install azmarqomni
Azmarqomni::Client.new(...)
npm · .d.ts
npm install azmarqomniAPI key
Developer → API Key
- 01Sign in to the Azmarq console.
- 02Open Developer → API Key.
- 03Copy the key. Do not commit it or put it in browser JavaScript.
Auth uses the apikey header — not a Bearer token. Rotate the key if it leaks. Your account must already have the channel enabled (sender ID, WhatsApp template, RCS bot, OTP config).
export AZMARQ_API_KEY="your-api-key"const client = new Azmarq(); // reads AZMARQ_API_KEY
const client = new Azmarq({ apiKey: "..." });Quickstart
One send for every channel
Unified send for the happy path. Channel helpers when you need templates, OTP, or RCS bots. Success → messageId; original body on raw.
import { Azmarq } from "azmarqomni";
const client = new Azmarq();
const result = await client.send({
channel: "sms",
from: "SENDER",
to: "9800000001",
text: "Hello from Azmarq",
});What just happened
- Client initialized
- Fields validated locally
- POST → api.azmarq.com
- messageId returned
Built for builders
The hard part of messaging stays out of your code.
Phone normalization, local validation, the apikey header, and typed errors — so your product code stays on product logic. The REST API does not change.
One client, four products
SMS, WhatsApp, RCS, and OTP from a single install — no hand-rolled HTTP for every channel.
Seven languages, live
TypeScript/Node, Python, Go, PHP, Java, C#, and Ruby — every package in the table is published.
Human phone numbers
Pass 10-digit local, 91…, or +91 — the SDK normalizes before the HTTP call. Default country code is 91.
REST API unchanged
The SDK posts to https://api.azmarq.com with the apikey header. Full payload reference stays on developers.azmarq.com.
Four products. One client.
SMS, WhatsApp, RCS, and OTP — same SDK.
Your account must already have that channel enabled. Field-level payloads stay on developers.azmarq.com.
Channel examples
type is TRANS, PROMO, or OTP. Set unicode: 1 for non-GSM text. Set flash: 1 for flash SMS. A list of numbers is sent as a comma-separated MSISDN string.
await client.sms.send({
sender: "SENDER",
to: ["9800000001", "9800000002"],
text: "Hello from Azmarq",
type: "TRANS",
});
await client.sms.sendTemplate({
sender: "AOCAPI",
to: "9800000001",
templateId: "1507165650000000000",
custom: ["Ada", "ORD-1001"],
});Phone numbers
Write numbers the way humans write them
to is normalized before the HTTP call. Default country code is 91. Override with defaultCountryCode / default_country_code.
9800000001
919800000001
+919800000001
09800000001
919800000001
+919800000001
+91 98000 00001
919800000001
+919800000001
Errors
All extend AzmarqError
Required fields, route type, WhatsApp template names, and phone length are checked before the API call. error.field names the bad argument when the check is local. Retries stay off by default — a retry can deliver the same message twice.
AuthenticationError
Missing or unknown API key
InvalidRequestError
Local validation failed, or the API returned 4xx / { error: true }
APIError
5xx from Azmarq
ConnectionError
Network failure
Escape hatch for documented JSON
Anything the helpers do not model — pass the documented body through client.request.
await client.request("POST", "/v1/whatsapp", { /* documented JSON */ });SMS delivery JSON can be parsed with parseSmsDelivery / parse_sms_delivery. Treat the webhook URL as a secret — the API does not define webhook signatures.
Deep reference
SDK for install and send.Docs for every payload.
Full HTTP reference, templates, and channel payloads live on the API Hub. This page covers packages, unified send, channel helpers, phone normalization, and errors.
Next in the Azmarq story
FAQs
Questions about Azmarq Omni SDK
Straight answers for teams evaluating this module inside Azmarq CPaaS.
Talk to salesTypeScript/Node (npm install azmarqomni), Python (pip install azmarqomni; import azmarq), Go, PHP, Java, C#, and Ruby — all live. HTTP APIs remain available if you prefer raw requests.
Payload and route detail live at https://developers.azmarq.com. The Omni SDK posts to https://api.azmarq.com with the apikey header — the REST contract does not change.
Sign in to the Azmarq console, open Developer → API Key, and set AZMARQ_API_KEY (or pass apiKey / api_key). Server-side only — never put the key in browser JavaScript. Rotate it if it leaks.
SMS, WhatsApp, RCS, and OTP — via unified send({ channel }) or channel helpers. Your account must already have that channel enabled (sender ID, template, RCS bot, OTP config).
Yes. Approved sender IDs, DLT, and template registration remain upstream of the SDK. The SDK does not unlock a product you have not subscribed to.
Retries stay off by default. Do not turn on maxRetries for send traffic — a retry can deliver the same message twice.
Parse SMS delivery JSON with parseSmsDelivery / parse_sms_delivery. Treat the webhook URL as a secret — the API does not define webhook signatures.
Install azmarqomni. Send with your API key.
Pick your language, grab a key from Developer → API Key, and open the API Hub for payloads.
