Course Builder API
POST /services/courses/v1/courses/save Auth

Create or update a course

Without `id` a new course is made (draft unless `status` says otherwise); with `id` only the fields sent are changed. Rules: - Drafts and published courses count against the plan's `courses` limit (archived ones do not). - The slug is unique in the project; without one it is made from the title. - A course can only be published with at least one published lesson, and a paid course needs a linked webshop product (`webshop_product_id`, a product of this project).

Request Body Required

FieldTypeRequiredDescriptionExample
id integer|null No
title string
max: 191
Yes
slug string|null
max: 191
No
subtitle string|null
max: 255
No
description string|null
max: 200000
No
image string|null
max: 2000
No
status string|null
draft, published, archived,
No
access string|null
free, paid,
No
webshop_product_id integer|null No
level string|null
max: 40
No
language string|null
max: 10
No
estimated_minutes integer|null
min: 0 max: 100000
No
certificate_enabled boolean|null No
settings array|null No
position integer|null
min: 0
No

Responses

201
200
422
401
403
429
Resource created
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
data object
data.course mixed[]
Successful response
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
data object
data.course mixed[]
Validation error
FieldTypeDescription
message string Errors overview.
errors object A detailed description of each field that failed validation.
Unauthenticated โ€” missing or invalid Bearer token
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
Forbidden โ€” insufficient permissions for this resource
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
Too Many Requests โ€” rate limit exceeded
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
Retry-After integer Seconds until the rate limit resets 60
FieldTypeDescription
error boolean
message string
Base URL
https://api.wemasy.nl/api
Authentication

Request Sample
cURL
JS
PHP
Python
curl -X POST "https://api.wemasy.nl/api/services/courses/v1/courses/save" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "string",
    "title": "string",
    "slug": "string",
    "subtitle": "string",
    "description": "string",
    "image": "string",
    "status": "string",
    "access": "string",
    "webshop_product_id": "string",
    "level": "string",
    "language": "string",
    "estimated_minutes": "string",
    "certificate_enabled": "string",
    "settings": "string",
    "position": "string"
}'
fetch('https://api.wemasy.nl/api/services/courses/v1/courses/save', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "id": "string",
    "title": "string",
    "slug": "string",
    "subtitle": "string",
    "description": "string",
    "image": "string",
    "status": "string",
    "access": "string",
    "webshop_product_id": "string",
    "level": "string",
    "language": "string",
    "estimated_minutes": "string",
    "certificate_enabled": "string",
    "settings": "string",
    "position": "string"
})})
.then(r => r.json())
.then(data => console.log(data));
$response = Http::withToken('YOUR_API_TOKEN')
    ->accept('application/json')
    ->post('https://api.wemasy.nl/api/services/courses/v1/courses/save', {
    "id": "string",
    "title": "string",
    "slug": "string",
    "subtitle": "string",
    "description": "string",
    "image": "string",
    "status": "string",
    "access": "string",
    "webshop_product_id": "string",
    "level": "string",
    "language": "string",
    "estimated_minutes": "string",
    "certificate_enabled": "string",
    "settings": "string",
    "position": "string"
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "id": "string",
    "title": "string",
    "slug": "string",
    "subtitle": "string",
    "description": "string",
    "image": "string",
    "status": "string",
    "access": "string",
    "webshop_product_id": "string",
    "level": "string",
    "language": "string",
    "estimated_minutes": "string",
    "certificate_enabled": "string",
    "settings": "string",
    "position": "string"
}
r = requests.post("https://api.wemasy.nl/api/services/courses/v1/courses/save", headers=headers, json=data)
print(r.json())
Response Example
{
    "error": true,
    "message": "string",
    "data": {
        "course": []
    }
}

Try It
Request Body Required

Export