Skip to content

Find a course by its title, or create it as a draft by a trainer

PUT
/v1/integration-api/courses
curl --request PUT \
--url https://api.academy.example.com/v1/integration-api/courses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "title": "Arbeitsschutz im Lager", "trainerEmail": "trainer@example.com" }'

Versioned integration contract.

Media typeapplication/json
object
title
required
string
>= 2 characters <= 200 characters
summary
string
"" <= 2000 characters
trainerId
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
trainerEmail
string format: email
<= 320 characters /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/

Example

{
"title": "Arbeitsschutz im Lager",
"trainerEmail": "trainer@example.com"
}

Success

Media typeapplication/json
object
course
required
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
title
required
string
status
required
string
created
required
boolean

Example

{
"course": {
"id": "6f1c2a10-0000-4000-8000-0000000000c1",
"title": "Arbeitsschutz im Lager",
"status": "draft"
},
"created": true
}

Error; error and message identify the reason

Media typeapplication/json
object
error
required

Stable code, e.g. insufficient_scope, not_found, validation_failed

string
message
string

Example generated

{
"error": "example",
"message": "example"
}