Skip to content

Update User

Update a dashboard user's information.

WARNING

Requires super-admin role.

Endpoint

INFO

PUT /api/v1/dashboard/users/{user}

Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeDescription
userintegerUser ID

Request Body

ParameterTypeRequiredDescription
namestringNoUser name
emailstringNoEmail address
passwordstringNoNew password
rolestringNoUser role
statusstringNoStatus: 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"
}

Daakey Car Sharing Platform