More sandboxes
SMS sandbox
Test text-message flows without sending a real SMS. The sandbox exposes a Twilio-compatible Messages API and simulates delivery states.
Create an SMS inbox
Open SMS in the workspace and create an inbox. Copy its Account SID, auth token and base URL. These are sandbox credentials; keep your production Twilio credentials separate.
Capture a message
Use HTTP Basic authentication with the inbox's Account SID and auth token. The request body is form-encoded:
curl -u "$SMS_ACCOUNT_SID:$SMS_AUTH_TOKEN" \
-X POST "https://testlie.com/sms/2010-04-01/Accounts/$SMS_ACCOUNT_SID/Messages.json" \
--data-urlencode 'To=+15557654321' \
--data-urlencode 'From=+15551234567' \
--data-urlencode 'Body=Your sign-in code is 482913'The response contains a message SID and a queued status. The worker simulates sent and delivered; it does not send a text through a carrier. The workspace shows the body, addresses, segment count and delivery status.
Assert on the capture
Use a team API key to wait for a matching message. The SMS inbox ID is the workspace resource ID, separate from the Account SID:
curl -f -H "Authorization: Bearer $TESTLIE_API_KEY" \
"https://testlie.com/api/sms-inboxes/$SMS_INBOX_ID/messages/wait?to=%2B15557654321&contains=code&timeout=30"A match returns HTTP 200 with the captured SMS. A timeout returns HTTP 408. Add since with the test's ISO start time to avoid matching older messages. Read extracted codes and links through GET /api/sms/<message-sid>/extract.
Delivery and failure tests
Configure failure rules in the SMS inbox to simulate invalid numbers, unreachable handsets or carrier filtering. Synchronous failures reject the API request; asynchronous failures produce failed or undelivered states. A StatusCallback URL receives Twilio-style signed callbacks from the worker.
Rotate the auth token only when you intend to update every client using that sandbox. Team members can inspect captures; owners and admins manage the inbox. Plans and limits describe SMS quotas and retention.