Texto for Developers

    Install an official SDK for Node.js, TypeScript, Python, PHP or .NET, or make one POST /send call. Signed webhooks and account management endpoints cover the rest of the Texto API.

    View SMS API reference

    5 free credits on signup · 3¢ per SMS to Australia · No contracts

    The Texto SMS API is a REST API for sending SMS to Australian and New Zealand mobile numbers. You authenticate with a bearer API key and POST JSON to a single /send endpoint, which works from any language with an HTTP client. Official Node.js, TypeScript, Python, PHP and .NET SDKs and copyable HTTP examples are below. Delivery receipts and inbound replies are pushed to your own HTTPS endpoint as HMAC-SHA256 signed webhooks.

    Comparing developer platforms? See Texto's Australian SMS API and pricing alongside Twilio.

    Quickstart

    Three steps from signup to a delivered message.

    Step 1

    Create an API key

    Sign up free and generate a key from your account settings. Every new account gets 5 credits to test with.

    Step 2

    POST to /send

    Send JSON with a to number in international format and your message body. You get a message_id back straight away.

    Step 3

    Listen for webhooks

    Point Texto at your HTTPS endpoint to receive signed delivery receipts and inbound replies as they happen.

    Official Texto SDKs

    Install a maintained Texto package for your stack. Each official SDK covers the full API, including sending, replies, accounts, credits, numbers, webhooks and reporting.

    Node.js / TypeScript

    @textoau/sdk

    Official SDK

    Install

    npm install @textoau/sdk

    Quick start

    import { Texto } from "@textoau/sdk";
    const texto = new Texto({ apiKey: "txt_xxxxxxxxxxxxxxxxxxxx", baseUrl: "https://api.texto.com.au" });
    await texto.messages.send({ to: "+61400000000", message: "Hello from Texto" });

    Python

    texto-sdk

    Official SDK

    Install

    pip install texto-sdk

    Quick start

    from texto import Texto
    texto = Texto(api_key="txt_xxxxxxxxxxxxxxxxxxxx", base_url="https://api.texto.com.au")
    texto.send(to="+61400000000", message="Hello from Texto")

    PHP

    texto/sdk

    Official SDK

    Install

    composer require texto/sdk

    Quick start

    <?php
    $texto = new Texto\Texto(apiKey: 'txt_xxxxxxxxxxxxxxxxxxxx', baseUrl: 'https://api.texto.com.au');
    $texto->send('+61400000000', 'Hello from Texto');

    .NET

    Texto.Sdk

    Official SDK

    Install

    dotnet add package Texto.Sdk

    Quick start

    using Texto;
    using var texto = new TextoClient("txt_xxxxxxxxxxxxxxxxxxxx", baseUrl: "https://api.texto.com.au");
    await texto.SendAsync("+61400000000", "Hello from Texto");

    Use the API directly

    Prefer not to use an SDK? Copy a standalone HTTP example for your language and send your first message.

    Send an SMS with Node.js

    No package required — Node 18+ ships with fetch

    # Node 18 and above has fetch built in.
    # On older versions, add a fetch polyfill:
    npm install node-fetch

    Send a message

    // texto.js
    const TEXTO_API_KEY = process.env.TEXTO_API_KEY;
    
    export async function sendSms({ to, message, from, campaign }) {
      const response = await fetch("https://api.texto.com.au/send", {
        method: "POST",
        headers: {
          Authorization: `Bearer ${TEXTO_API_KEY}`,
          "Content-Type": "application/json",
        },
        body: JSON.stringify({ to, message, from, campaign }),
      });
    
      const data = await response.json();
      if (!response.ok) {
        throw new Error(`Texto ${response.status}: ${data.error ?? "request failed"}`);
      }
      return data;
    }
    
    const result = await sendSms({
      to: "+61412345678",
      message: "Your order has shipped.",
      campaign: "order-updates",
    });
    console.log(result.message_id, result.credits_remaining);

    Handle errors

    try {
      await sendSms({ to: "+61412345678", message: "Hello" });
    } catch (err) {
      // 401 invalid key · 402 out of credits · 422 invalid number · 429 rate limited
      console.error(err.message);
    }

    Texto on Postman

    Explore every endpoint, read the published documentation or fork the collection with the production base URL ready to use.

    Developer FAQs

    Can the Texto API add an unsubscribe link to each SMS?

    Yes. Put {{OptOutLink}} in the message and every recipient gets their own one-tap opt-out link on texto.au. It works in all four SDKs and the plain REST API, and the number goes onto your opt-out list once the recipient confirms.

    Does Texto have an official SDK?

    Yes. Texto publishes official SDKs for Node.js and TypeScript, Python, PHP and .NET. Each SDK covers the full Texto API.

    How do I install the Texto SDK?

    Install @textoau/sdk from npm, texto-sdk from PyPI, texto/sdk from Packagist or Texto.Sdk from NuGet. Copyable install commands and quick starts are available on this page.

    Is there a Postman collection for the Texto API?

    Yes. Texto has a public Postman workspace, published API documentation and a Run in Postman action that forks the collection with the production base URL preloaded. API keys are never included.

    Which programming languages does Texto support?

    Texto has official SDKs for Node.js and TypeScript, Python, PHP and .NET. You can also call the REST API directly from any language that supports HTTPS requests.

    Ship your first message today

    Free account, 5 credits to test with, and a key you can generate in under a minute. 3¢ per SMS to Australia after that — no contracts, no platform fee.