Base URL: https://softwearapp.com/otp-api/api/v1
/sendSend a new OTP email.
| Field | Type | Description |
|---|---|---|
email | string | Recipient email (required) |
{"ok":true,"request_id":"req_8Hk2…","expires_in":600}/verifyCheck a code the user typed.
| Field | Type | Description |
|---|---|---|
request_id | string | From /send |
otp | string | Digits typed by the user |
{"ok":true,"verified":true,"email":"user@example.com"}/resendInvalidate the old code and send a new one.
| Field | Type | Description |
|---|---|---|
request_id | string | Previous request |
{"ok":true,"request_id":"req_N3w…","expires_in":600}/status/{request_id}Current state of a request.
{"ok":true,"request_id":"req_…","status":"verified","attempts":1}| HTTP | error | Meaning |
|---|---|---|
| 401 | missing_api_credentials / invalid_api_credentials | Check X-Api-Key and X-Api-Secret |
| 422 | invalid_email / invalid_otp | Bad input or wrong code (attempts_left returned) |
| 404 | request_not_found | Unknown request_id for this project |
| 409 | already_verified | The code was already used |
| 410 | otp_expired / request_blocked | Send a new OTP |
| 429 | quota_exceeded / rate_limited / too_many_attempts | Slow down or upgrade your plan |
| 502 | delivery_failed | Email could not be delivered |
This action cannot be undone.