Update Profile
Modify the authenticated client's profile information such as name, email, or phone number. This endpoint allows users to keep their account information up to date.
Only the fields you include in the request body will be updated—omitted fields remain unchanged. This makes it easy to perform partial updates without resending the entire profile.
Re-verification Required
Changing your email or phone number will require re-verification:
- New email: A verification email will be sent to the new address, and
email_verified_atwill be set to null until verified - New phone: A verification SMS will be sent to the new number, and
phone_verified_atwill be set to null until verified
This may temporarily affect your ability to book vehicles if verification is required by the agency.
Endpoint
INFO
PUT /api/v1/client/profile
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 |
|---|---|---|---|
name | string | No | Full name |
email | string | No | Email address |
phone | string | No | Phone number |
Example Request
bash
curl -X PUT https://api.daakey.com/api/v1/client/profile \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Agency-Signature: {signature}" \
-d '{
"name": "John Smith",
"phone": "+1987654321"
}'Response
Success (200)
json
{
"success": true,
"message": "Profile updated",
"data": {
"id": 1,
"name": "John Smith",
"email": "john@example.com",
"phone": "+1987654321",
"phone_verified_at": null,
"email_verified_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-15T00:00:00Z"
},
"meta": {
"agency_id": 123,
"agency_code": "AGENCY123"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Error (422)
json
{
"success": false,
"message": "Validation failed",
"errors": {
"email": ["The email has already been taken."]
},
"data": null,
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Notes
- Changing email requires re-verification
- Changing phone number requires re-verification via SMS
- Only provided fields will be updated