TrackMe API Docs

Verify an OTP and, if valid, complete the gated action.

Verifying consumes the code. After 5 wrong attempts request a new code. Failures return 409 OTP_INVALID, OTP_EXPIRED, OTP_ALREADY_USED, OTP_LOCKED, or OTP_NOT_FOUND. For purpose sign_in the account is found or created from the verified email OR phone, with user and accessToken in the response. Phone-only users have email:null and verified phone. Pending registration returns ACCOUNT_INACTIVE; moderation returns ACCOUNT_SUSPENDED or ACCOUNT_BANNED. Other unavailable lifecycle states return ACCOUNT_UNAVAILABLE. Ambiguous legacy phone identities return PHONE_IDENTITY_CONFLICT; contact support rather than creating another account.

POST
/api/v1/auth/otp/verify

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/auth/otp/verify" \  -H "Content-Type: application/json" \  -d '{    "destination": "[email protected]",    "purpose": "verify_email",    "code": "482915"  }'
{  "data": {    "verified": true,    "destination": "[email protected]",    "purpose": "verify_email"  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}
{  "error": {    "code": "CONFLICT",    "message": "This action conflicts with an existing record.",    "targetType": "order",    "targetId": "ord_01jq8z3a0n0y9v0x1g4t2c7m6e"  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}
{  "error": {    "code": "VALIDATION_ERROR",    "message": "One or more fields are invalid.",    "fields": [      {        "path": "email",        "rule": "email",        "message": "Must be a valid email address."      }    ]  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}
{  "error": {    "code": "RATE_LIMITED",    "message": "Too many requests — slow down and retry after the indicated delay.",    "retryAfterSeconds": 60  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}