Update Profile
Update the authenticated dashboard user's profile.
Endpoint
INFO
PUT /api/v1/dashboard/profile
Headers
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Full name |
email | string | No | Email address |
phone | string | No | Phone number |
avatar | file | No | Profile picture |
preferences | object | No | User preferences |
Example Request
bash
curl -X PUT https://api.daakey.com/api/v1/dashboard/profile \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{
"name": "John Admin",
"phone": "+1987654321",
"preferences": {
"language": "en",
"timezone": "America/Los_Angeles"
}
}'Response
Success (200)
json
{
"success": true,
"message": "Profile updated",
"data": {
"id": 1,
"name": "John Admin",
"email": "admin@agency.com",
"phone": "+1987654321",
"avatar_url": "https://api.daakey.com/storage/avatars/1.jpg",
"preferences": {
"language": "en",
"timezone": "America/Los_Angeles",
"notifications": {
"email": true,
"push": true
}
},
"updated_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": {
"email": ["The email has already been taken."]
},
"data": null,
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}