Everything you need to start sending SMS with Textmodo. From your first message to production in minutes.
Install the SDK and send your first SMS in under 5 minutes.
npm install textmodo
# or
yarn add textmodo
# or
pnpm add textmodoGet your API key from the dashboard. Store it as an environment variable — never hardcode it.
TEXTMODO_API_KEY=tm_live_xxxxxxxxxxxxxxxxxxxxconst textmodo = require("textmodo");
const client = new textmodo.Client(process.env.TEXTMODO_API_KEY);
const message = await client.messages.create({
to: "+15551234567",
body: "Hello from Textmodo!",
from: "MyApp",
});
console.log("Sent:", message.sid);Textmodo uses API keys to authenticate requests. Include your key as a Bearer token in every request.
# All API requests require a Bearer token
Authorization: Bearer tm_live_xxxxxxxxxxxxxxxxxxxxtm_live_ are for production.tm_test_ are for sandbox testing (no real SMS sent).All responses are JSON. Successful requests return a 200 or 201 status.
{
"sid": "msg_01jxxxxxxxxxxxxxxxxxxxxx",
"to": "+15551234567",
"body": "Hello from Textmodo!",
"status": "queued",
"created_at": "2025-01-01T12:00:00Z"
}Official client libraries for the most popular languages.