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

Create or update a module

Without `id` a module is added at the end of course `course_id`; with `id` only the fields sent change. `drip_days`: the module opens that many days after a student enrolled (empty or 0: open right away).

Request Body Required

FieldTypeRequiredDescriptionExample
id integer|null No
course_id integer Yes
title string
max: 191
Yes
description string|null
max: 5000
No
drip_days integer|null
min: 0 max: 3650
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.module 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.module 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/modules/save" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "string",
    "course_id": 0,
    "title": "string",
    "description": "string",
    "drip_days": "string",
    "position": "string"
}'
fetch('https://api.wemasy.nl/api/services/courses/v1/courses/modules/save', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "id": "string",
    "course_id": 0,
    "title": "string",
    "description": "string",
    "drip_days": "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/modules/save', {
    "id": "string",
    "course_id": 0,
    "title": "string",
    "description": "string",
    "drip_days": "string",
    "position": "string"
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "id": "string",
    "course_id": 0,
    "title": "string",
    "description": "string",
    "drip_days": "string",
    "position": "string"
}
r = requests.post("https://api.wemasy.nl/api/services/courses/v1/courses/modules/save", headers=headers, json=data)
print(r.json())
Response Example
{
    "error": true,
    "message": "string",
    "data": {
        "module": []
    }
}

Try It
Request Body Required

Export