Adds a provider admin user using POST.
Creates a new admin user or attaches an existing user with the same email to the provider. If the email already exists, the user's existing roles for this provider are replaced with the given role_ids; profile fields are ignored. Read-only fields such as id, created_at and updated_at are ignored.
For every API request you make, you'll need to present the API access key in the HTTP Header as X-API-Key to be authenticated.
| Name | Required | Value | Description |
|---|---|---|---|
| firstname | optional | string | Admin user first name. Required when creating a new user. Ignored when email already exists. |
| lastname | optional | string | Admin user last name. Required when creating a new user. Ignored when email already exists. |
| required | string | Email address | |
| role_ids | required | array|string | List of admin role IDs from /admin-roles. A comma-separated string is also accepted. |
| position | optional | string | Position or title. Ignored when email already exists. |
| phone_prefix | optional | string | Phone country prefix, e.g. 47. Ignored when email already exists. |
| phone | optional | string | Phone number. Ignored when email already exists. |
| booking_email | optional | string | Booking email address. Ignored when email already exists. |
| send_invite | optional | boolean | Send invite for newly created users. Defaults to true. |
$request_url = 'https://api.frontcore.com/v2/admin-users';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'X-API-Key: {your-api-key}',
'Accept: application/json',
));
$result = curl_exec($ch);
curl_close($ch);
If the method is successful it responds with an JSON structure, as it is shown below.
{
"id": 123,
"firstname": "Ola",
"lastname": "Nordmann",
"email": "ola@example.com",
"position": "Instructor",
"phone_prefix": "47",
"phone": "12345678",
"booking_email": "booking@example.com",
"role_ids": [1, 703],
"created_at": "2026-05-11 10:00:00",
"updated_at": "2026-05-11 10:00:00"
}
Unsuccessful response sample:
{
"errors": {
"missing_fields": ["firstname"],
"not_valid": ["role_ids"]
}
}