Getting Started

Everything you need to start sending SMS with Textmodo. From your first message to production in minutes.

Quickstart

Install the SDK and send your first SMS in under 5 minutes.

1. Install the SDK

npm install textmodo
# or
yarn add textmodo
# or
pnpm add textmodo

2. Set your API key

Get your API key from the dashboard. Store it as an environment variable — never hardcode it.

TEXTMODO_API_KEY=tm_live_xxxxxxxxxxxxxxxxxxxx

3. Send a message

const 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);
That's it! Your message is now queued for delivery.

Authentication

Textmodo uses API keys to authenticate requests. Include your key as a Bearer token in every request.

HTTP Headerbash
# All API requests require a Bearer token
Authorization: Bearer tm_live_xxxxxxxxxxxxxxxxxxxx
  • API keys starting with tm_live_ are for production.
  • API keys starting with tm_test_ are for sandbox testing (no real SMS sent).
  • Never expose your API key in client-side code or public repositories.

Response format

All responses are JSON. Successful requests return a 200 or 201 status.

Responsejson
{
  "sid": "msg_01jxxxxxxxxxxxxxxxxxxxxx",
  "to": "+15551234567",
  "body": "Hello from Textmodo!",
  "status": "queued",
  "created_at": "2025-01-01T12:00:00Z"
}

SDKs

Official client libraries for the most popular languages.

Node.js
Python
Ruby
PHP
Go
Java

Next steps