Quickstart
Two calls: send a verification, then check the code the user typed. With a test key nothing is sent, nothing is billed and the code is always 000000.
1. Send a code
curl https://api.authtext.com.au/v1/verifications \
-H "Authorization: Bearer $AUTHTEXT_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "+61400000001", "channel": "sms"}'
{
"id": "ver_01JD3X9K2M7Q8R5T6V1W0XYZAB",
"status": "pending",
"channel": "sms",
"to": "+61*****0001",
"expires_at": "2026-11-20T00:10:00.000Z",
"attempts_remaining": 5
}
Keep the id. The response never holds the code or the full number.
2. Check the code
curl https://api.authtext.com.au/v1/verifications/ver_01JD3X9K2M7Q8R5T6V1W0XYZAB/check \
-H "Authorization: Bearer $AUTHTEXT_KEY" \
-H "Content-Type: application/json" \
-d '{"code": "000000"}'
{ "id": "ver_01JD3X9K2M7Q8R5T6V1W0XYZAB", "status": "approved", "attempts_remaining": 0 }
approved means the user is verified. A wrong code is not an HTTP error: it returns 200 with status denied and the attempts left.
Rules to build on
- Call the API from your server. Never put a key in a browser or a mobile app.
- Codes have 6 digits, last 10 minutes and allow 5 attempts. Then start a new verification.
- Numbers are in E.164 format:
+61412345678. Australian mobiles by default. - Send an
Idempotency-Keyheader on the send call if you retry on network errors, so a retry cannot send a second SMS. - Every error has a stable
typeand afix. See errors. - Going live is a key change only: swap the
at_test_key for anat_live_key. See pricing.
The full contract is the OpenAPI spec.
This page as markdown, for an AI agent: /docs/quickstart.md