textly.
Documentation menu

Quickstart

Go from a new Textly account to your first sandbox API send in a few practical steps.

Start safely in sandbox.

New accounts have a KES 100 virtual wallet and a default test Sender ID. Sandbox requests do not send real SMS or debit your production wallet.

1. Create an account

Create your organization through the customer dashboard to get started. Registration and account management are handled safely through the web interface.

2. Get a test Sender ID

Your account comes with a TEXTLY test sender by default. Go to the dashboard's Developers page and copy its id for your send request.

3. Create an API key

Still on the Developers page, create a sandbox key. Save the raw txt_test_ key when it appears: Textly stores only its hash and cannot show it again.

4. Send a test message

Send an array of messages to POST /sandbox/messages. Use your sandbox Sender ID and a new Idempotency-Key for each send request. You can preview the charge first with POST /sandbox/messages/quote.

POST /sandbox/messages
Authorization: Bearer txt_test_YOUR_KEY
Idempotency-Key: acme-order-10482
Content-Type: application/json

{
  "senderId": "YOUR_SANDBOX_SENDER_UUID",
  "messages": [
    { "recipient": "0712345678", "text": "Your order is on its way." }
  ]
}

The response includes a request ID, reserved virtual amount, and a queued message ID for each recipient. No SMS is sent to the phone.

5. Check the test result

List messages with GET /sandbox/messages. Use POST /sandbox/messages/:id/simulate with { "status": "delivered" } or { "status": "failed" } to test your status handling. See the sandbox guide for wallet resets and limits.

6. Go live

When you are ready to send real SMS, ask Textly to enable production API access. Create a separate production key, use an approved Sender ID, and fund your production wallet. Then switch your integration to POST /messages. Production delivery can be tracked with signed webhooks.