Phone Verification
Complete phone number verification by submitting the SMS code sent to your registered phone number. Phone verification is typically required before you can book vehicles, as it ensures the agency can contact you via SMS for important booking notifications and emergencies.
The verification process works as follows:
- After registration, an SMS with a 6-digit code is automatically sent to your phone
- Enter the code using this endpoint to verify your number
- If the code expires or you didn't receive it, request a new one using the resend endpoint
Phone verification provides an additional layer of account security and enables important features like SMS booking confirmations and alerts.
Verify Phone
Submit the 6-digit verification code received via SMS to complete phone verification.
Endpoint
INFO
POST /api/v1/client/verification/verify-phone
Headers
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
X-Agency-Signature | {signature} | Yes |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | Yes | 6-digit verification code |
Example Request
bash
curl -X POST https://api.daakey.com/api/v1/client/verification/verify-phone \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Agency-Signature: {signature}" \
-d '{
"code": "123456"
}'Success Response (200)
json
{
"success": true,
"message": "Phone verified successfully",
"data": {
"phone": "+1234567890",
"verified_at": "2024-01-15T10:00:00Z"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Error Response (422)
json
{
"success": false,
"message": "Invalid verification code",
"errors": {
"code": ["The verification code is invalid or expired."]
},
"data": null,
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Resend Phone Verification
Request a new verification code via SMS.
Endpoint
INFO
POST /api/v1/client/verification/resend-phone
Headers
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
X-Agency-Signature | {signature} | Yes |
Example Request
bash
curl -X POST https://api.daakey.com/api/v1/client/verification/resend-phone \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Agency-Signature: {signature}"Success Response (200)
json
{
"success": true,
"message": "Verification code sent",
"data": {
"phone": "+1234567890",
"expires_in": 600
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Error Response (429)
json
{
"success": false,
"message": "Too many requests",
"data": {
"retry_after": 60
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Notes
- Verification codes expire after 10 minutes
- Maximum 3 resend attempts per hour
- Phone must be unique per agency