Update User
Update a dashboard user's information.
WARNING
Requires super-admin role.
Endpoint
INFO
PUT /api/v1/dashboard/users/{user}
Headers
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
user | integer | User ID |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | User name |
email | string | No | Email address |
password | string | No | New password |
role | string | No | User role |
status | string | No | Status: active, inactive |
Example Request
bash
curl -X PUT https://api.daakey.com/api/v1/dashboard/users/2 \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{
"name": "Senior Partner Admin",
"status": "active"
}'Response
Success (200)
json
{
"success": true,
"message": "User updated",
"data": {
"id": 2,
"name": "Senior Partner Admin",
"email": "admin@partner.com",
"role": "partner_admin",
"status": "active",
"updated_at": "2024-01-15T00:00:00Z"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}