Update a user
Enterprise Only
This endpoint is only available in the Enterprise package and requires the authenticated user to be a Super Admin.
Method: PUT
URL: https://example.com/<MIXPOST_CORE_PATH>/api/panel/users/{userId}
Authorization: Bearer <token>
Body:
{
"name": "John Doe",
"email": "john@example.com",
"password": null,
"password_confirmation": null,
"is_admin": true
}
| Key | Format | Required | Description |
|---|---|---|---|
name | string | required | User's full name (max 255 characters) |
email | string | required | User's email address (must be unique) |
password | string | optional | New password (leave empty to keep current) |
password_confirmation | string | required if password provided | Password confirmation |
is_admin | boolean | required | Whether the user should be a Super Admin. Cannot change your own admin status. |
Response:
- 200
- 401
- 403
- 404
- 422
{
"success": true
}
{
"success": false
}
{
"message": "Unauthenticated."
}
{
"message": "Access forbidden."
}
{
"message": "User not found."
}
{
"message": "Validation errors",
"errors": {}
}