@unlimited-messaging/sdk
Official TypeScript / Node.js client for the Unlimited Messaging API — send and receive WhatsApp messages programmatically.
Installation
npm install @unlimited-messaging/sdk
Quick start
import { UnlimitedMessagingApiClient } from "@unlimited-messaging/sdk";
const client = new UnlimitedMessagingApiClient({
token: process.env.API_TOKEN,
});
// Send a WhatsApp message
const message = await client.message.send({
recipient: "+33612345678",
text: "Hello!",
});
console.log(message.id, message.status);
Authentication
Get your API token from the dashboard and pass it as the token option.
const client = new UnlimitedMessagingApiClient({
token: "your_api_token",
});
Examples
Send a message
const message = await client.message.send({
recipient: "+33612345678",
text: "Hello from the SDK!",
simId: "optional-sim-id", // force a specific SIM
});
List messages
const result = await client.message.findAll({
page: 1,
limit: 20,
status: "DELIVERED", // PENDING | SENDING | SENT | DELIVERED | READ | FAILED
search: "keyword",
});
console.log(`${result.total} messages`);
for (const msg of result.data) {
console.log(msg.id, msg.status, msg.text);
}
Get a single message
const msg = await client.message.findOne("message-id");
console.log(msg.id, msg.status, msg.text);
List linked SIMs
const sims = await client.sim.getLinkedSims();
for (const sim of sims) {
console.log(sim.id, sim.phoneNumber);
}
API reference
| Method |
Description |
message.send |
Send a WhatsApp message |
message.findAll |
List messages with pagination and filters |
message.findOne |
Get a single message by ID |
sim.getLinkedSims |
List linked SIMs |
Official documentation: docs.unlimitedmessaging.app
Full OpenAPI spec: openapi.yaml