Create a user
Enterprise Only
This endpoint is only available in the Enterprise package and requires the authenticated user to be a Super Admin.
Method: POST
URL: https://example.com/<MIXPOST_CORE_PATH>/api/panel/users
Authorization: Bearer <token>
Body:
{
"name": "John Doe",
"email": "john@example.com",
"password": "securepassword123",
"password_confirmation": "securepassword123",
"is_admin": false
}
| 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 | required | User's password |
password_confirmation | string | required | Password confirmation |
is_admin | boolean | required | Whether the user should be a Super Admin |
Response:
- 200
- 401
- 403
- 422
{
"id": 2,
"name": "John Doe",
"email": "john@example.com",
"is_admin": false,
"settings": {},
"email_verified_at": "Jan 15, 2025 10:30 AM",
"created_at": "Jan 15, 2025 10:30 AM"
}
{
"message": "Unauthenticated."
}
{
"message": "Access forbidden."
}
{
"message": "Validation errors",
"errors": {
"email": ["The email has already been taken."]
}
}