Upload Document
Upload a verification document to your Daakey account. This endpoint is essential for completing your profile and becoming eligible to book vehicles. Most agencies require at least a valid driver's license before allowing rentals.
The document upload process works as follows:
- You upload an image or PDF of your document
- The document enters a "pending" verification status
- Agency staff review the document (typically within 24-48 hours)
- The document is either "verified" (approved) or "rejected" (with feedback)
If you upload a document of the same type that already exists, the new upload will replace the previous one. This is useful when updating expired documents or correcting issues with rejected uploads.
Best Practices
- Ensure documents are clearly legible and not blurry
- Include all four corners of the document in the image
- Avoid glare or shadows that obscure text
- Upload both front and back of driver's licenses as separate documents
Endpoint
INFO
POST /api/v1/client/documents
Headers
| Header | Value | Required |
|---|---|---|
Content-Type | multipart/form-data | Yes |
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
X-Agency-Signature | {signature} | Yes |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Document type |
file | file | Yes | Document image (JPEG, PNG, PDF) |
expires_at | date | No | Document expiry date |
Example Request
bash
curl -X POST https://api.daakey.com/api/v1/client/documents \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Agency-Signature: {signature}" \
-F "type=driver_license_front" \
-F "file=@/path/to/license.jpg" \
-F "expires_at=2025-12-31"Response
Success (201)
json
{
"success": true,
"message": "Document uploaded successfully",
"data": {
"id": 4,
"type": "driver_license_front",
"url": "https://api.daakey.com/storage/documents/1/dl-front-new.jpg",
"status": "pending",
"verified_at": null,
"expires_at": "2025-12-31",
"uploaded_at": "2024-01-15T00:00:00Z"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Error (422)
json
{
"success": false,
"message": "Validation failed",
"errors": {
"type": ["The selected type is invalid."],
"file": ["The file must be an image or PDF.", "The file may not be greater than 5MB."]
},
"data": null,
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Document Types
| Type | Description |
|---|---|
driver_license_front | Front of driver's license |
driver_license_back | Back of driver's license |
id_card | National ID card |
passport | Passport photo page |
Notes
- Maximum file size: 5MB
- Accepted formats: JPEG, PNG, PDF
- Uploading a new document of the same type replaces the previous one
- Documents are verified within 24-48 hours