SMS Validation API (1.0.0)
Backend API for phone number validation via SMS and other channels. This API allows you to validate phone numbers by sending SMS verification codes and verifying them.
https://api-ref.smsmanager.com/_mock/openapi/cs/verify/verifyapi_v1/
https://verify-api.smsmanager.com/
Request
Verifies an HMAC proof for phone validation without storing any state. This endpoint is useful for backend verification when you have all the validation data but want SMS Manager to verify the HMAC calculation.
This endpoint not requires authentication - proof itself is the authentication.
All of these data are returned by the /v1/validations
endpoint.
Note: This only works for accounts with a verificationSecret
configured.
The timestamp when validation started
- Mock server
https://api-ref.smsmanager.com/_mock/openapi/cs/verify/verifyapi_v1/v1/verify-proof
- Production server
https://verify-api.smsmanager.com/v1/verify-proof
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-ref.smsmanager.com/_mock/openapi/cs/verify/verifyapi_v1/v1/verify-proof \
-H 'Content-Type: application/json' \
-d '{
"phoneNumber": "1234567890",
"token": "61591bd88d8f...",
"code": "123456",
"timestamp": "2024-01-15T10:30:00Z",
"proof": "a1b2c3d4e5f6..."
}'
{ "valid": true }
The phone number to validate (digits only, including country code)
Turnstile verification token (required if tenant has requireTurnstile enabled)
- Mock server
https://api-ref.smsmanager.com/_mock/openapi/cs/verify/verifyapi_v1/v1/validations
- Production server
https://verify-api.smsmanager.com/v1/validations
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-ref.smsmanager.com/_mock/openapi/cs/verify/verifyapi_v1/v1/validations \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"phoneNumber": "1234567890"
}'
Validation started successfully
Unique validation token to use for verification
Current status of the validation
When this validation expires (typically 10 minutes)
When this validation was started (used for HMAC verification)
{ "token": "61591bd88d8fbe7736bca535809d1216dd71cb0b5cbf2b07e5a08adfbeb5d35b", "status": "pending", "expiresAt": "2024-01-01T00:10:00.000Z", "timestamp": "2024-01-01T00:00:00.000Z" }
Request
Verifies the code entered by the user. On successful verification, returns all data needed for backend verification including the phone number, token, code, timestamp, and HMAC proof (if account has verificationSecret configured).
The number of attempts is limited based on account configuration (default: 6).
- Mock server
https://api-ref.smsmanager.com/_mock/openapi/cs/verify/verifyapi_v1/v1/validations/{token}/verify
- Production server
https://verify-api.smsmanager.com/v1/validations/{token}/verify
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-ref.smsmanager.com/_mock/openapi/cs/verify/verifyapi_v1/v1/validations/val_7af7215261b8497cb355e617b13f4ef2/verify \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"code": "123456"
}'
Code verified successfully
The validation token (only present if verified is true)
The verification code that was verified (only present if verified is true)
When the validation was started (only present if verified is true)
HMAC proof for this verification (only present if verified is true and tenant has verificationSecret)
{ "verified": true, "phoneNumber": "1234567890", "token": "61591bd88d8fbe7736bca535809d1216dd71cb0b5cbf2b07e5a08adfbeb5d35b", "code": "123456", "timestamp": "2024-01-15T10:30:00Z", "proof": "86dd8444ed76402c93ce62497cb29a0d7af7215261b8497cb355e617b13f4ef2", "verifiedAt": "2024-01-15T10:31:15Z" }
- Mock server
https://api-ref.smsmanager.com/_mock/openapi/cs/verify/verifyapi_v1/v1/validations/{token}
- Production server
https://verify-api.smsmanager.com/v1/validations/{token}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PATCH \
https://api-ref.smsmanager.com/_mock/openapi/cs/verify/verifyapi_v1/v1/validations/val_7af7215261b8497cb355e617b13f4ef2 \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"proof": "86dd8444ed76402c93ce62497cb29a0d7af7215261b8497cb355e617b13f4ef2"
}'
{ "valid": true, "phoneNumber": "string", "verifiedAt": "2019-08-24T14:15:22Z" }