Adds an instructor using POST.
The request body uses the same writable field names returned by the instructor endpoint. Read-only fields such as id, created_at and archived_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 | required | string | Instructor first name |
| lastname | required | string | Instructor last name |
| phone_prefix | optional | string | Phone country prefix, e.g. 47 |
| phone | optional | string | Phone number |
| optional | string | Email address | |
| position | optional | string | Position or title |
| company | optional | string | Company |
| description | optional | string | Description |
| idUser | optional | integer | App user ID from /app-users to connect to this instructor. |
$request_url = 'https://api.frontcore.com/v2/instructors';
$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",
"phone_prefix": "47",
"phone": "12345678",
"email": "ola@example.com",
"position": "Instructor",
"company": "Example AS",
"description": "Optional",
"idUser": 456,
"archived_at": null,
"created_at": "2026-05-11 10:00:00"
}
Unsuccessful response sample:
{
"error": "Wrong API Key"
}