messages:send| Field | Type | Required | Validation | Description |
|---|---|---|---|---|
phone | string | Yes | Phone number to check | |
purpose | string | No | max:50 | OTP purpose (default: authentication) |
| Field | Type | Description |
|---|---|---|
has_active_otp | boolean | true if active OTP exists |
expires_at | string | ISO 8601 expiry timestamp |
expires_in_seconds | integer | Seconds remaining until expiry (negative if expired) |
is_expired | boolean | Whether OTP has expired |
verification_attempts | integer | Number of verification attempts made |
max_attempts | integer | Maximum allowed verification attempts |
attempts_remaining | integer | Remaining verification attempts |
created_at | string | ISO 8601 timestamp when OTP was created |
| Field | Type | Description |
|---|---|---|
has_active_otp | boolean | false |
message | string | "No active OTP found" |
| Status | Error Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Invalid or missing API token |
| 403 | INSUFFICIENT_SCOPE | Token missing messages:send scope |
| 422 | VALIDATION_ERROR | Request validation failed |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests |
| 500 | INTERNAL_ERROR | Unexpected server error |
| Field | Message |
|---|---|
phone | Phone number is required |
curl --location --request POST '/auth/status' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"phone": "+919999999999",
"purpose": "authentication"
}'{}