Request
Verify a code that was sent using the send endpoint. Codes can only be verified once and must not be expired.Headers
Bearer token with your API key:
Bearer YOUR_API_KEYMust be
application/jsonBody Parameters
The verification ID returned from the send endpointExample:
"11f951d5-32d1-4b49-bdda-7da248e2615c"The verification code to check. Must be a numeric string between 4-10 digits.Example:
"123456"Response
Always
true for successful requests (even if the code is invalid)true if the code was correct and not expired, false otherwiseHuman-readable result message. Possible values:
"Code verified successfully""Invalid code""Code expired""Code already used"
Unique request identifier for debuggingExample:
"7b4d6022-7260-4568-b6b7-29c366c47bbc"Examples
Response Examples
Error Responses
Rate Limiting
To prevent brute-force attacks, this endpoint limits failed verification attempts:- 5 failed attempts per verification code
- 15-minute lockout after exceeding the limit
- Automatic reset on successful verification
429 response. Users should either:
- Wait for the lockout period to expire
- Request a new verification code
In addition to verification attempt limits, API keys are also rate limited to 120 requests per minute across all endpoints. See the Rate Limits section for more details.
Understanding Verification States
A verification code can be in one of several states:1
Valid
Code has been sent, not yet used, and not expired. Can be verified successfully.
2
Used
Code has been verified successfully once. Cannot be used again (prevents replay attacks).
3
Expired
Code has exceeded its expiration time. Cannot be verified.
4
Invalid
The provided code doesn’t match the sent code.
Best Practices
No credit consumed: Verification attempts do not consume credits, only sending codes does.
Security Considerations
Single Use Codes
Once a code is verified successfully, it cannot be used again. This prevents replay attacks where an attacker might intercept a code and try to use it themselves.Automatic Expiration
All codes automatically expire based on theexpires_in parameter from the send request. This limits the window of opportunity for attackers.
Rate Limiting
Both send and verify endpoints are rate-limited to prevent abuse. If you need higher limits, contact our support team.Integration Example
Here’s a complete example of integrating verification into a user registration flow:Troubleshooting
Always getting 'Invalid code' even with the correct code
Always getting 'Invalid code' even with the correct code
Make sure you’re using the exact
verification_id returned from the send endpoint. Verification IDs are case-sensitive UUIDs.Code expired immediately
Code expired immediately
Check that your server time is synchronized. If the server time is incorrect, codes may appear expired immediately. Also verify the
expires_in parameter when sending.Getting 404 - Verification not found
Getting 404 - Verification not found
This usually means the
verification_id doesn’t exist or was created with a different API key. Each API key has its own isolated verification space.