Add a course

Adds a course using POST.

- Will return an error if an active course with equal title already exists.
- Frontcore staff will categorize the course within a few working days.
- Fields the endpoint doesn't know are ignored; the response then lists them in ignored_fields, so a request that changed less than you meant shows it.

Request

POST https://api.frontcore.com/v2/courses

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.

Parameters

Name Required Value Description
title required string Title of the course
active optional bool Default is 1
reference optional string Your own reference, if needed.
is_full_time optional bool Default is null (not set)
is_part_time optional bool Default is null (not set)
level optional integer Default is 6 ("Courses")
  • 1 = University
  • 2 = College
  • 3 = Vocational school
  • 6 = Courses
  • 8 = Other education
  • 9 = Provider
  • 10 = Folk High School
  • 11 = Courses with credits
  • 12 = Breakfast meeting
  • 13 = Seminar
  • 14 = Conference
  • 15 = Corporate training
  • 16 = Lecture
  • 18 = Meet-up
  • 19 = Workshop
  • 20 = Treatment
  • 21 = Event
form_of_teaching optional integer Default is 1 ("Classroom")
  • 1 = Classroom
  • 2 = Online Course
  • 13 = Online study
  • 18 = Virtual classroom
  • 21 = Webinar
  • 22 = Webinar + online course
  • 10 = Classroom + online course
  • 12 = Classroom + practice
  • 17 = Practice + Online course
  • 9 = Recreation classes
  • 11 = Practice
  • 19 = Virtual or in-person
  • 8 = Corporate training
  • 5 = Others
teaching_language optional string Default is no ('no' as in Norwegian)
  • ar = Arabic
  • be-BY = Belarusian
  • bg-BG = Bulgarian
  • ch-ZN = Chinese Simplified
  • hr-HR = Croatian
  • cs-CZ = Czech
  • et-EE = Estonian
  • el-GR = Greek
  • he-IL = Hebrew
  • hi-IN = Hindi
  • hu-HU = Hungarian
  • id-ID = Indonesian
  • it-IT = Italian
  • ja-JP = Japanese
  • ko-KR = Korean
  • lt-LT = Lithuanian
  • mk-MK = Macedonian
  • ms-MY = Malay
  • fa-TJ = Persian
  • pt-PT = Portuguese
  • ro-RO = Romanian
  • ru-RU = Russian
  • sr-CS = Serbian (Latin)
  • sgn = Sign language
  • sk-SK = Slovak
  • th = Thai
  • tr = Turkish
  • uk = Ukrainian
  • vi = Vietnamese
  • da = Danish
  • nl-NL = Dutch
  • en = English
  • fi = Finnish
  • fr-FR = French
  • de-DE = German
  • no = Norwegian
  • pl-PL = Polish
  • es-ES = Spanish
  • sv-SE = Swedish
time_of_day optional integer Default is null (not set)
  • 1 = Daytime
  • 2 = Evening class
  • 3 = Weekend course
duration_value optional integer Default is null (not set)
duration_unit optional integer Default is null (not set)
  • 7 = Minute
  • 6 = Hour
  • 1 = Day
  • 2 = Week
  • 3 = Month
  • 4 = Semester
  • 5 = Year
price_value optional integer Default is null (not set)
price_currency optional string Three-letter ISO currency code of price_value, e.g. NOK, EUR or SEK. It is the currency bookings use. A currency id is also accepted. When a course is added without it, the account's main currency is used; when a course is updated without it, the currency is kept. Changing it also changes the currency of the course's member price. The amount is not converted.
price_comment optional string
publishing_platform optional string Where the course is published: internal (only in your own booking pages), kursguiden, both or hidden. Default on a new course: both. Another value is ignored and listed in ignored_fields.
lessons_hours optional integer Training hours: the number of hours the course should have. Shown as "Training hours" on the Advanced tab of the course in FrontCore, and used with attendance. Send an empty value to clear it. lesson_hours is also accepted.
tags optional array List of tag identifiers. Accepts either a plain array of IDs or a JSON-encoded array of tag objects.
labels optional array List of label identifiers from GET /v2/labels (e.g. [1487]). Accepts either a plain array of IDs or a JSON-encoded array of label objects. It replaces the course's labels. Read them back with include[]=labels on GET /v2/courses or GET /v2/courses/:id.
text_lead optional string ~170 characters are visible on Kursguidens listing pages.
text_description optional string Can contain HTML
text_place optional string Can contain HTML
text_prerequisites optional string Can contain HTML
text_duration optional string Can contain HTML
text_credits optional string Can contain HTML
text_submissions optional string Can contain HTML
text_hotel_info optional string Can contain HTML
text_audience optional string Can contain HTML
email_booking optional string E-mail address
email_more_info optional string E-mail address
external_booking_url optional string Lead form - booking registration.
external_more_info_url optional string Lead form - request for more info.

Example code in PHP

$post_params = array();
$post_params['title'] = 'Learn REST API';
$post_params['active'] = '1';
$post_params['reference'] = 'RESTAPI-CA-1001';
$post_params['is_full_time'] = '0';
$post_params['is_part_time'] = '1';
$post_params['level'] = '6';
$post_params['form_of_teaching'] = '1';
$post_params['teaching_language'] = 'no';
$post_params['time_of_day'] = '2';
$post_params['duration_value'] = '6';
$post_params['duration_unit'] = '6';
$post_params['price_value'] = '1500';
$post_params['price_currency'] = 'NOK';
$post_params['price_comment'] = 'Includes a free beer.';
$post_params['tags'] = [1,2]; // or [["id" => 1], ["id" => 2]];
$post_params['text_lead'] = 'REST API is very useful.';
$post_params['text_description'] = '<p>REST API is a easy way of sharing information between sites.</p>';
$post_params['text_place'] = '<p>At IT Fornebu.</p>';
$post_params['text_prerequisites'] = '<p>Normal programming skills.</p>';
$post_params['text_duration'] = '<p>2 sessions. Each session is 3 hours.</p>';
$post_params['text_credits'] = '<p>No credts.</p>';
$post_params['text_submissions'] = '<p>Two tasks to be submitted online.</p>';
$post_params['text_hotel_info'] = '<p>Scandic Fornebu.</p>';
$post_params['text_audience'] = '<p>Programmers and web developers.</p>';
$post_params['email_booking'] = 'booking@exampleschool.no';
$post_params['email_more_info'] = 'more.info@exampleschool.no';

$request_url = 'https://api.frontcore.com/v2/courses';
$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_POSTFIELDS, $post_params);

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'X-API-Key: {your-api-key}',
  'Accept: application/json',
));
$result = curl_exec($ch);
curl_close($ch);
               

Response

If the method is successful it responds with an JSON structure, as it is shown below.

{
    
    "course_id": 22357
}

Unsuccessful response sample:

{
    "error": "Required field 'title' is missing"
}      
© 2026 FrontCore