Back to Docs MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

This API is not authenticated.

Endpoints

POST api/contact

Example request:
curl --request POST \
    "http://localhost:8000/api/contact" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\",
    \"subject\": \"i\",
    \"message\": \"y\"
}"
const url = new URL(
    "http://localhost:8000/api/contact"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "email": "zbailey@example.net",
    "subject": "i",
    "message": "y"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/contact

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 120 characters. Example: b

email   string     

Must be a valid email address. Must not be greater than 255 characters. Example: zbailey@example.net

subject   string  optional    

Must not be greater than 200 characters. Example: i

message   string     

Must not be greater than 5000 characters. Example: y

POST api/auth/register

Example request:
curl --request POST \
    "http://localhost:8000/api/auth/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"nickname\": \"n\",
    \"email\": \"ashly64@example.com\",
    \"password\": \"architecto\",
    \"token_name\": \"n\",
    \"captcha_token\": \"architecto\"
}"
const url = new URL(
    "http://localhost:8000/api/auth/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "nickname": "n",
    "email": "ashly64@example.com",
    "password": "architecto",
    "token_name": "n",
    "captcha_token": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/auth/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

nickname   string     

Must contain only letters, numbers, dashes and underscores. Must not be greater than 255 characters. Example: n

email   string     

Must be a valid email address. Must not be greater than 255 characters. Example: ashly64@example.com

password   string     

Example: architecto

role   string  optional    
token_name   string  optional    

Must not be greater than 255 characters. Example: n

captcha_token   string  optional    

Example: architecto

POST api/auth/register/request-verification-code

Example request:
curl --request POST \
    "http://localhost:8000/api/auth/register/request-verification-code" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"nickname\": \"n\",
    \"email\": \"ashly64@example.com\",
    \"password\": \"architecto\",
    \"captcha_token\": \"architecto\"
}"
const url = new URL(
    "http://localhost:8000/api/auth/register/request-verification-code"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "nickname": "n",
    "email": "ashly64@example.com",
    "password": "architecto",
    "captcha_token": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/auth/register/request-verification-code

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

nickname   string     

Must contain only letters, numbers, dashes and underscores. Must not be greater than 255 characters. Example: n

email   string     

Must be a valid email address. Must not be greater than 255 characters. Example: ashly64@example.com

password   string     

Example: architecto

role   string  optional    
captcha_token   string  optional    

Example: architecto

POST api/auth/register/verify-code

Example request:
curl --request POST \
    "http://localhost:8000/api/auth/register/verify-code" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"code\": \"miyvdl\",
    \"name\": \"b\",
    \"nickname\": \"n\",
    \"password\": \"architecto\",
    \"token_name\": \"n\"
}"
const url = new URL(
    "http://localhost:8000/api/auth/register/verify-code"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "code": "miyvdl",
    "name": "b",
    "nickname": "n",
    "password": "architecto",
    "token_name": "n"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/auth/register/verify-code

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Must not be greater than 255 characters. Example: gbailey@example.net

code   string     

Must match the regex /^\d{6}$/. Must be 6 characters. Example: miyvdl

name   string     

Must not be greater than 255 characters. Example: b

nickname   string     

Must contain only letters, numbers, dashes and underscores. Must not be greater than 255 characters. Example: n

password   string     

Example: architecto

role   string  optional    
token_name   string  optional    

Must not be greater than 255 characters. Example: n

POST api/auth/invite/{token}/accept

Example request:
curl --request POST \
    "http://localhost:8000/api/auth/invite/architecto/accept" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"nickname\": \"n\",
    \"password\": \"architecto\",
    \"token_name\": \"n\"
}"
const url = new URL(
    "http://localhost:8000/api/auth/invite/architecto/accept"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "nickname": "n",
    "password": "architecto",
    "token_name": "n"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/auth/invite/{token}/accept

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

token   string     

Example: architecto

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

nickname   string     

Must contain only letters, numbers, dashes and underscores. Must not be greater than 255 characters. Example: n

password   string     

Example: architecto

token_name   string  optional    

Must not be greater than 255 characters. Example: n

POST api/auth/login

Example request:
curl --request POST \
    "http://localhost:8000/api/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"password\": \"|]|{+-\",
    \"token_name\": \"v\",
    \"captcha_token\": \"architecto\"
}"
const url = new URL(
    "http://localhost:8000/api/auth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "password": "|]|{+-",
    "token_name": "v",
    "captcha_token": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/auth/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: gbailey@example.net

password   string     

Example: |]|{+-

token_name   string  optional    

Must not be greater than 255 characters. Example: v

captcha_token   string  optional    

Example: architecto

POST api/auth/forgot-password

Example request:
curl --request POST \
    "http://localhost:8000/api/auth/forgot-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\"
}"
const url = new URL(
    "http://localhost:8000/api/auth/forgot-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/auth/forgot-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: gbailey@example.net

POST api/auth/reset-password

Example request:
curl --request POST \
    "http://localhost:8000/api/auth/reset-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"architecto\",
    \"email\": \"zbailey@example.net\",
    \"password\": \"-0pBNvYgxw\"
}"
const url = new URL(
    "http://localhost:8000/api/auth/reset-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "architecto",
    "email": "zbailey@example.net",
    "password": "-0pBNvYgxw"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/auth/reset-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

token   string     

Example: architecto

email   string     

Must be a valid email address. Example: zbailey@example.net

password   string     

Must be at least 8 characters. Example: -0pBNvYgxw

POST api/stripe/webhook

Example request:
curl --request POST \
    "http://localhost:8000/api/stripe/webhook" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/stripe/webhook"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/stripe/webhook

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PATCH api/auth/me

Example request:
curl --request PATCH \
    "http://localhost:8000/api/auth/me" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=b"\
    --form "nickname=n"\
    --form "bio=g"\
    --form "email_notifications_enabled=1"\
    --form "email_notifications_comment_reply=1"\
    --form "email_notifications_thread=1"\
    --form "email_notifications_quiz_result=1"\
    --form "email_notifications_new_course=1"\
    --form "email_notifications_new_content="\
    --form "email_notifications_new_enrollment=1"\
    --form "email_notifications_instructor_quiz_result=1"\
    --form "email_notifications_approval_result=1"\
    --form "email_notifications_course_submitted=1"\
    --form "email_notifications_lesson_submitted=1"\
    --form "remove_avatar=1"\
    --form "avatar=@C:\Users\Asus\AppData\Local\Temp\php2A56.tmp" 
const url = new URL(
    "http://localhost:8000/api/auth/me"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'b');
body.append('nickname', 'n');
body.append('bio', 'g');
body.append('email_notifications_enabled', '1');
body.append('email_notifications_comment_reply', '1');
body.append('email_notifications_thread', '1');
body.append('email_notifications_quiz_result', '1');
body.append('email_notifications_new_course', '1');
body.append('email_notifications_new_content', '');
body.append('email_notifications_new_enrollment', '1');
body.append('email_notifications_instructor_quiz_result', '1');
body.append('email_notifications_approval_result', '1');
body.append('email_notifications_course_submitted', '1');
body.append('email_notifications_lesson_submitted', '1');
body.append('remove_avatar', '1');
body.append('avatar', document.querySelector('input[name="avatar"]').files[0]);

fetch(url, {
    method: "PATCH",
    headers,
    body,
}).then(response => response.json());

Request      

PATCH api/auth/me

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

nickname   string  optional    

Must contain only letters, numbers, dashes and underscores. Must not be greater than 255 characters. Example: n

bio   string  optional    

Must not be greater than 1000 characters. Example: g

email_notifications_enabled   boolean  optional    

Example: true

email_notifications_comment_reply   boolean  optional    

Example: true

email_notifications_thread   boolean  optional    

Example: true

email_notifications_quiz_result   boolean  optional    

Example: true

email_notifications_new_course   boolean  optional    

Example: true

email_notifications_new_content   boolean  optional    

Example: false

email_notifications_new_enrollment   boolean  optional    

Example: true

email_notifications_instructor_quiz_result   boolean  optional    

Example: true

email_notifications_approval_result   boolean  optional    

Example: true

email_notifications_course_submitted   boolean  optional    

Example: true

email_notifications_lesson_submitted   boolean  optional    

Example: true

avatar   file  optional    

Must be a file. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\Asus\AppData\Local\Temp\php2A56.tmp

remove_avatar   boolean  optional    

Example: true

DELETE api/auth/me

Example request:
curl --request DELETE \
    "http://localhost:8000/api/auth/me" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/auth/me"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/auth/me

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/auth/logout

Example request:
curl --request POST \
    "http://localhost:8000/api/auth/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/auth/logout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/auth/logout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/auth/email/resend

Example request:
curl --request POST \
    "http://localhost:8000/api/auth/email/resend" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/auth/email/resend"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/auth/email/resend

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/admin/users/invites

Example request:
curl --request POST \
    "http://localhost:8000/api/admin/users/invites" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"role\": \"instructor\"
}"
const url = new URL(
    "http://localhost:8000/api/admin/users/invites"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "gbailey@example.net",
    "role": "instructor"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/admin/users/invites

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Must not be greater than 255 characters. Example: gbailey@example.net

role   string     

Example: instructor

Must be one of:
  • student
  • instructor
  • admin

PATCH api/admin/users/{user_id}

Example request:
curl --request PATCH \
    "http://localhost:8000/api/admin/users/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"role\": \"student\",
    \"is_banned\": false
}"
const url = new URL(
    "http://localhost:8000/api/admin/users/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "role": "student",
    "is_banned": false
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/admin/users/{user_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user_id   integer     

The ID of the user. Example: 16

Body Parameters

role   string  optional    

Example: student

Must be one of:
  • student
  • instructor
  • admin
is_banned   boolean  optional    

Example: false

DELETE api/admin/users/{user_id}

Example request:
curl --request DELETE \
    "http://localhost:8000/api/admin/users/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/admin/users/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/admin/users/{user_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user_id   integer     

The ID of the user. Example: 16

PATCH api/admin/moderation-queue/reviews/{review_id}

Example request:
curl --request PATCH \
    "http://localhost:8000/api/admin/moderation-queue/reviews/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"is_published\": false,
    \"declined_reason\": \"b\"
}"
const url = new URL(
    "http://localhost:8000/api/admin/moderation-queue/reviews/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "is_published": false,
    "declined_reason": "b"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/admin/moderation-queue/reviews/{review_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

review_id   integer     

The ID of the review. Example: 16

Body Parameters

is_published   boolean     

Example: false

declined_reason   string  optional    

Must not be greater than 1000 characters. Example: b

PATCH api/admin/moderation-queue/publish-requests/{publishRequest_id}

Example request:
curl --request PATCH \
    "http://localhost:8000/api/admin/moderation-queue/publish-requests/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"action\": \"accept\",
    \"declined_reason\": \"b\"
}"
const url = new URL(
    "http://localhost:8000/api/admin/moderation-queue/publish-requests/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "action": "accept",
    "declined_reason": "b"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/admin/moderation-queue/publish-requests/{publishRequest_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

publishRequest_id   integer     

The ID of the publishRequest. Example: 16

Body Parameters

action   string     

Example: accept

Must be one of:
  • accept
  • decline
declined_reason   string  optional    

Must not be greater than 1000 characters. Example: b

PATCH api/admin/moderation-queue/lesson-revisions/{lessonRevision_id}

Example request:
curl --request PATCH \
    "http://localhost:8000/api/admin/moderation-queue/lesson-revisions/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"action\": \"accept\",
    \"declined_reason\": \"b\"
}"
const url = new URL(
    "http://localhost:8000/api/admin/moderation-queue/lesson-revisions/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "action": "accept",
    "declined_reason": "b"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/admin/moderation-queue/lesson-revisions/{lessonRevision_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

lessonRevision_id   integer     

The ID of the lessonRevision. Example: 16

Body Parameters

action   string     

Example: accept

Must be one of:
  • accept
  • decline
declined_reason   string  optional    

Must not be greater than 1000 characters. Example: b

PATCH api/admin/moderation-queue/quiz-revisions/{quizRevision_id}

Example request:
curl --request PATCH \
    "http://localhost:8000/api/admin/moderation-queue/quiz-revisions/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"action\": \"decline\",
    \"declined_reason\": \"b\"
}"
const url = new URL(
    "http://localhost:8000/api/admin/moderation-queue/quiz-revisions/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "action": "decline",
    "declined_reason": "b"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/admin/moderation-queue/quiz-revisions/{quizRevision_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

quizRevision_id   integer     

The ID of the quizRevision. Example: 16

Body Parameters

action   string     

Example: decline

Must be one of:
  • accept
  • decline
declined_reason   string  optional    

Must not be greater than 1000 characters. Example: b

Issue a new certificate if eligible

Example request:
curl --request POST \
    "http://localhost:8000/api/courses/architecto/certificate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/certificate"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/courses/{course_slug}/certificate

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

POST api/courses/{course_slug}/publish-request

Example request:
curl --request POST \
    "http://localhost:8000/api/courses/architecto/publish-request" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/publish-request"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/courses/{course_slug}/publish-request

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

Reorder lessons within a module.

PATCH /modules/{module}/lessons/reorder

Body: { "ids": [3, 1, 2] } — ordered list of lesson IDs with positions 0, 1, 2...

Example request:
curl --request PATCH \
    "http://localhost:8000/api/modules/16/lessons/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        16
    ]
}"
const url = new URL(
    "http://localhost:8000/api/modules/16/lessons/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/modules/{module_id}/lessons/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

module_id   integer     

The ID of the module. Example: 16

Body Parameters

ids   integer[]  optional    

Reorder quizzes within a course (optionally scoped to a module).

PATCH /courses/{course}/quizzes/reorder

Body: { "module_id": 5, "ids": [3, 1, 2] } — ordered list of quiz IDs with positions 0, 1, 2... If module_id is provided, reorder is scoped to that module.

Example request:
curl --request PATCH \
    "http://localhost:8000/api/courses/architecto/quizzes/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        16
    ],
    \"module_id\": 16
}"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/quizzes/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        16
    ],
    "module_id": 16
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/courses/{course_slug}/quizzes/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

Body Parameters

ids   integer[]  optional    
module_id   integer  optional    

Example: 16

Reorder any content within a module (lessons and quizzes together).

PATCH /modules/{module}/content/reorder

Body: { "items": [ { "type": "lesson", "id": 1 }, { "type": "quiz", "id": 5 }, { "type": "lesson", "id": 2 } ]}

Positions are assigned 0, 1, 2... based on order in array.

Example request:
curl --request PATCH \
    "http://localhost:8000/api/modules/16/content/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"type\": \"quiz\",
            \"id\": 16
        }
    ]
}"
const url = new URL(
    "http://localhost:8000/api/modules/16/content/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "items": [
        {
            "type": "quiz",
            "id": 16
        }
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/modules/{module_id}/content/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

module_id   integer     

The ID of the module. Example: 16

Body Parameters

items   object[]     
type   string     

Example: quiz

Must be one of:
  • lesson
  • quiz
id   integer     

Example: 16

Reorder modules within a course.

PATCH /courses/{course}/modules/reorder

Body: { "ids": [3, 1, 2] } — ordered list of module IDs with positions 0, 1, 2...

Example request:
curl --request PATCH \
    "http://localhost:8000/api/courses/architecto/modules/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        16
    ]
}"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/modules/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/courses/{course_slug}/modules/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

Body Parameters

ids   integer[]  optional    

Store a newly created resource in storage.

Example request:
curl --request POST \
    "http://localhost:8000/api/courses" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"b\",
    \"slug\": \"n\",
    \"description\": \"Eius et animi quos velit et.\",
    \"subtitle\": \"v\",
    \"category\": \"d\",
    \"level\": \"l\",
    \"language\": \"j\",
    \"what_you_will_learn\": [
        \"n\"
    ],
    \"price_benefits\": [
        \"i\"
    ],
    \"tags\": [
        \"k\"
    ],
    \"thumbnail_path\": \"h\",
    \"duration_minutes\": 87,
    \"price\": 39,
    \"is_published\": true,
    \"published_at\": \"2026-06-14T17:39:15\",
    \"request_publish\": true
}"
const url = new URL(
    "http://localhost:8000/api/courses"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "b",
    "slug": "n",
    "description": "Eius et animi quos velit et.",
    "subtitle": "v",
    "category": "d",
    "level": "l",
    "language": "j",
    "what_you_will_learn": [
        "n"
    ],
    "price_benefits": [
        "i"
    ],
    "tags": [
        "k"
    ],
    "thumbnail_path": "h",
    "duration_minutes": 87,
    "price": 39,
    "is_published": true,
    "published_at": "2026-06-14T17:39:15",
    "request_publish": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/courses

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

title   string     

Must not be greater than 255 characters. Example: b

slug   string     

Must contain only letters, numbers, dashes and underscores. Must not be greater than 255 characters. Example: n

description   string  optional    

Example: Eius et animi quos velit et.

subtitle   string  optional    

Must not be greater than 255 characters. Example: v

category   string  optional    

Must not be greater than 100 characters. Example: d

level   string  optional    

Must not be greater than 50 characters. Example: l

language   string  optional    

Must not be greater than 50 characters. Example: j

what_you_will_learn   string[]  optional    

Must not be greater than 500 characters.

price_benefits   string[]  optional    

Must not be greater than 500 characters.

tags   string[]  optional    

Must not be greater than 40 characters.

thumbnail_path   string  optional    

Must not be greater than 255 characters. Example: h

duration_minutes   integer  optional    

Must be at least 0. Example: 87

price   number  optional    

Must be at least 0. Example: 39

is_published   boolean  optional    

Example: true

published_at   string  optional    

Must be a valid date. Example: 2026-06-14T17:39:15

request_publish   boolean  optional    

Example: true

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost:8000/api/courses/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"b\",
    \"slug\": \"n\",
    \"description\": \"Eius et animi quos velit et.\",
    \"subtitle\": \"v\",
    \"category\": \"d\",
    \"level\": \"l\",
    \"language\": \"j\",
    \"what_you_will_learn\": [
        \"n\"
    ],
    \"price_benefits\": [
        \"i\"
    ],
    \"tags\": [
        \"k\"
    ],
    \"thumbnail_path\": \"h\",
    \"duration_minutes\": 87,
    \"price\": 39,
    \"is_published\": true,
    \"published_at\": \"2026-06-14T17:39:18\",
    \"request_publish\": true,
    \"decline_publish\": false,
    \"publish_request_declined_reason\": \"y\"
}"
const url = new URL(
    "http://localhost:8000/api/courses/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "b",
    "slug": "n",
    "description": "Eius et animi quos velit et.",
    "subtitle": "v",
    "category": "d",
    "level": "l",
    "language": "j",
    "what_you_will_learn": [
        "n"
    ],
    "price_benefits": [
        "i"
    ],
    "tags": [
        "k"
    ],
    "thumbnail_path": "h",
    "duration_minutes": 87,
    "price": 39,
    "is_published": true,
    "published_at": "2026-06-14T17:39:18",
    "request_publish": true,
    "decline_publish": false,
    "publish_request_declined_reason": "y"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/courses/{slug}

PATCH api/courses/{slug}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

The slug of the course. Example: architecto

Body Parameters

title   string  optional    

Must not be greater than 255 characters. Example: b

slug   string  optional    

Must contain only letters, numbers, dashes and underscores. Must not be greater than 255 characters. Example: n

description   string  optional    

Example: Eius et animi quos velit et.

subtitle   string  optional    

Must not be greater than 255 characters. Example: v

category   string  optional    

Must not be greater than 100 characters. Example: d

level   string  optional    

Must not be greater than 50 characters. Example: l

language   string  optional    

Must not be greater than 50 characters. Example: j

what_you_will_learn   string[]  optional    

Must not be greater than 500 characters.

price_benefits   string[]  optional    

Must not be greater than 500 characters.

tags   string[]  optional    

Must not be greater than 40 characters.

thumbnail_path   string  optional    

Must not be greater than 255 characters. Example: h

duration_minutes   integer  optional    

Must be at least 0. Example: 87

price   number  optional    

Must be at least 0. Example: 39

is_published   boolean  optional    

Example: true

published_at   string  optional    

Must be a valid date. Example: 2026-06-14T17:39:18

request_publish   boolean  optional    

Example: true

decline_publish   boolean  optional    

Example: false

publish_request_declined_reason   string  optional    

Must not be greater than 1000 characters. Example: y

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/courses/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/courses/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/courses/{slug}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

The slug of the course. Example: architecto

POST api/courses/{course_slug}/enrollments

Example request:
curl --request POST \
    "http://localhost:8000/api/courses/architecto/enrollments" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/enrollments"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/courses/{course_slug}/enrollments

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

DELETE api/courses/{course_slug}/enrollments/{id}

Example request:
curl --request DELETE \
    "http://localhost:8000/api/courses/architecto/enrollments/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/enrollments/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/courses/{course_slug}/enrollments/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

id   integer     

The ID of the enrollment. Example: 16

POST api/courses/{course_slug}/modules

Example request:
curl --request POST \
    "http://localhost:8000/api/courses/architecto/modules" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"b\",
    \"slug\": \"n\",
    \"position\": 84
}"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/modules"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "b",
    "slug": "n",
    "position": 84
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/courses/{course_slug}/modules

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

Body Parameters

title   string     

Must not be greater than 255 characters. Example: b

slug   string     

Must contain only letters, numbers, dashes and underscores. Must not be greater than 255 characters. Example: n

position   integer  optional    

Must be at least 0. Example: 84

PUT api/courses/{course_slug}/modules/{id}

Example request:
curl --request PUT \
    "http://localhost:8000/api/courses/architecto/modules/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"b\",
    \"slug\": \"n\",
    \"position\": 84
}"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/modules/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "b",
    "slug": "n",
    "position": 84
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/courses/{course_slug}/modules/{id}

PATCH api/courses/{course_slug}/modules/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

id   integer     

The ID of the module. Example: 16

Body Parameters

title   string  optional    

Must not be greater than 255 characters. Example: b

slug   string  optional    

Must contain only letters, numbers, dashes and underscores. Must not be greater than 255 characters. Example: n

position   integer  optional    

Must be at least 0. Example: 84

DELETE api/courses/{course_slug}/modules/{id}

Example request:
curl --request DELETE \
    "http://localhost:8000/api/courses/architecto/modules/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/modules/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/courses/{course_slug}/modules/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

id   integer     

The ID of the module. Example: 16

POST api/modules/{module_id}/lessons

Example request:
curl --request POST \
    "http://localhost:8000/api/modules/16/lessons" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "title=b"\
    --form "slug=n"\
    --form "type=lesson"\
    --form "content=architecto"\
    --form "video_url=http://bailey.com/"\
    --form "video_name=m"\
    --form "remove_video=1"\
    --form "estimated_time_minutes=8"\
    --form "position=76"\
    --form "revision_status=published"\
    --form "is_published="\
    --form "video=@C:\Users\Asus\AppData\Local\Temp\phpA399.tmp" 
const url = new URL(
    "http://localhost:8000/api/modules/16/lessons"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('title', 'b');
body.append('slug', 'n');
body.append('type', 'lesson');
body.append('content', 'architecto');
body.append('video_url', 'http://bailey.com/');
body.append('video_name', 'm');
body.append('remove_video', '1');
body.append('estimated_time_minutes', '8');
body.append('position', '76');
body.append('revision_status', 'published');
body.append('is_published', '');
body.append('video', document.querySelector('input[name="video"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/modules/{module_id}/lessons

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

module_id   integer     

The ID of the module. Example: 16

Body Parameters

title   string     

Must not be greater than 255 characters. Example: b

slug   string     

Must contain only letters, numbers, dashes and underscores. Must not be greater than 255 characters. Example: n

type   string  optional    

Example: lesson

Must be one of:
  • lesson
content   string  optional    

Example: architecto

video_url   string  optional    

Must not be greater than 2048 characters. Example: http://bailey.com/

video_name   string  optional    

Must not be greater than 255 characters. Example: m

video   file  optional    

Must be a file. Must not be greater than 512000 kilobytes. Example: C:\Users\Asus\AppData\Local\Temp\phpA399.tmp

remove_video   boolean  optional    

Example: true

estimated_time_minutes   integer  optional    

Must be at least 0. Example: 8

position   integer  optional    

Must be at least 0. Example: 76

revision_status   string  optional    

Example: published

Must be one of:
  • draft
  • pending_review
  • pending_unpublish
  • published
is_published   boolean  optional    

Example: false

PUT api/modules/{module_id}/lessons/{id}

Example request:
curl --request PUT \
    "http://localhost:8000/api/modules/16/lessons/16" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "title=b"\
    --form "slug=n"\
    --form "type=lesson"\
    --form "content=architecto"\
    --form "video_url=http://bailey.com/"\
    --form "video_name=m"\
    --form "remove_video=1"\
    --form "estimated_time_minutes=8"\
    --form "position=76"\
    --form "revision_status=published"\
    --form "is_published=1"\
    --form "video=@C:\Users\Asus\AppData\Local\Temp\phpCB17.tmp" 
const url = new URL(
    "http://localhost:8000/api/modules/16/lessons/16"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('title', 'b');
body.append('slug', 'n');
body.append('type', 'lesson');
body.append('content', 'architecto');
body.append('video_url', 'http://bailey.com/');
body.append('video_name', 'm');
body.append('remove_video', '1');
body.append('estimated_time_minutes', '8');
body.append('position', '76');
body.append('revision_status', 'published');
body.append('is_published', '1');
body.append('video', document.querySelector('input[name="video"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Request      

PUT api/modules/{module_id}/lessons/{id}

PATCH api/modules/{module_id}/lessons/{id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

module_id   integer     

The ID of the module. Example: 16

id   integer     

The ID of the lesson. Example: 16

Body Parameters

title   string  optional    

Must not be greater than 255 characters. Example: b

slug   string  optional    

Must contain only letters, numbers, dashes and underscores. Must not be greater than 255 characters. Example: n

type   string  optional    

Example: lesson

Must be one of:
  • lesson
content   string  optional    

Example: architecto

video_url   string  optional    

Must not be greater than 2048 characters. Example: http://bailey.com/

video_name   string  optional    

Must not be greater than 255 characters. Example: m

video   file  optional    

Must be a file. Must not be greater than 512000 kilobytes. Example: C:\Users\Asus\AppData\Local\Temp\phpCB17.tmp

remove_video   boolean  optional    

Example: true

estimated_time_minutes   integer  optional    

Must be at least 0. Example: 8

position   integer  optional    

Must be at least 0. Example: 76

revision_status   string  optional    

Example: published

Must be one of:
  • draft
  • pending_review
  • pending_unpublish
  • published
is_published   boolean  optional    

Example: true

DELETE api/modules/{module_id}/lessons/{id}

Example request:
curl --request DELETE \
    "http://localhost:8000/api/modules/16/lessons/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/modules/16/lessons/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/modules/{module_id}/lessons/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

module_id   integer     

The ID of the module. Example: 16

id   integer     

The ID of the lesson. Example: 16

PATCH api/modules/{module_id}/lessons/{lesson_id}/unpublish

Example request:
curl --request PATCH \
    "http://localhost:8000/api/modules/16/lessons/16/unpublish" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/modules/16/lessons/16/unpublish"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/modules/{module_id}/lessons/{lesson_id}/unpublish

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

module_id   integer     

The ID of the module. Example: 16

lesson_id   integer     

The ID of the lesson. Example: 16

POST api/lessons/{lesson_id}/comments

Example request:
curl --request POST \
    "http://localhost:8000/api/lessons/16/comments" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"body\": \"b\",
    \"parent_comment_id\": 16
}"
const url = new URL(
    "http://localhost:8000/api/lessons/16/comments"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "body": "b",
    "parent_comment_id": 16
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/lessons/{lesson_id}/comments

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

lesson_id   integer     

The ID of the lesson. Example: 16

Body Parameters

body   string     

Must not be greater than 2000 characters. Example: b

parent_comment_id   integer  optional    

Must match an existing stored value. Example: 16

PUT api/lessons/{lesson_id}/comments/{id}

Example request:
curl --request PUT \
    "http://localhost:8000/api/lessons/16/comments/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"body\": \"b\",
    \"is_published\": true
}"
const url = new URL(
    "http://localhost:8000/api/lessons/16/comments/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "body": "b",
    "is_published": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/lessons/{lesson_id}/comments/{id}

PATCH api/lessons/{lesson_id}/comments/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

lesson_id   integer     

The ID of the lesson. Example: 16

id   integer     

The ID of the comment. Example: 16

Body Parameters

body   string  optional    

Must not be greater than 2000 characters. Example: b

is_published   boolean  optional    

Example: true

DELETE api/lessons/{lesson_id}/comments/{id}

Example request:
curl --request DELETE \
    "http://localhost:8000/api/lessons/16/comments/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/lessons/16/comments/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/lessons/{lesson_id}/comments/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

lesson_id   integer     

The ID of the lesson. Example: 16

id   integer     

The ID of the comment. Example: 16

POST api/courses/{course_slug}/quizzes

Example request:
curl --request POST \
    "http://localhost:8000/api/courses/architecto/quizzes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"module_id\": 16,
    \"pass_score\": 22,
    \"estimated_time_minutes\": 84,
    \"time_limit_seconds\": 12,
    \"is_published\": true,
    \"revision_status\": \"pending_unpublish\",
    \"position\": 77,
    \"questions\": [
        {
            \"type\": \"multiple_choice\",
            \"prompt\": \"architecto\",
            \"points\": 22,
            \"position\": 67,
            \"options\": [
                {
                    \"key\": \"z\",
                    \"text\": \"m\",
                    \"is_correct\": false
                }
            ]
        }
    ]
}"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/quizzes"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "b",
    "description": "Eius et animi quos velit et.",
    "module_id": 16,
    "pass_score": 22,
    "estimated_time_minutes": 84,
    "time_limit_seconds": 12,
    "is_published": true,
    "revision_status": "pending_unpublish",
    "position": 77,
    "questions": [
        {
            "type": "multiple_choice",
            "prompt": "architecto",
            "points": 22,
            "position": 67,
            "options": [
                {
                    "key": "z",
                    "text": "m",
                    "is_correct": false
                }
            ]
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/courses/{course_slug}/quizzes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

Body Parameters

title   string     

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

module_id   integer  optional    

Must match an existing stored value. Example: 16

pass_score   integer  optional    

Must be at least 0. Must not be greater than 100. Example: 22

estimated_time_minutes   integer  optional    

Must be at least 0. Example: 84

time_limit_seconds   integer  optional    

Must be at least 0. Example: 12

is_published   boolean  optional    

Example: true

revision_status   string  optional    

Example: pending_unpublish

Must be one of:
  • draft
  • pending_review
  • pending_unpublish
  • published
position   integer  optional    

Must be at least 0. Example: 77

questions   object[]  optional    
type   string  optional    

This field is required when questions is present. Example: multiple_choice

Must be one of:
  • single_choice
  • multiple_choice
prompt   string  optional    

This field is required when questions is present. Example: architecto

points   integer  optional    

Must be at least 1. Must not be greater than 100. Example: 22

position   integer  optional    

Must be at least 1. Example: 67

options   object[]  optional    

This field is required when questions is present. Must have at least 2 items.

key   string  optional    

This field is required when questions is present. Must not be greater than 100 characters. Example: z

text   string  optional    

This field is required when questions is present. Must not be greater than 500 characters. Example: m

is_correct   boolean  optional    

Example: false

PUT api/courses/{course_slug}/quizzes/{id}

Example request:
curl --request PUT \
    "http://localhost:8000/api/courses/architecto/quizzes/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"module_id\": 16,
    \"pass_score\": 22,
    \"estimated_time_minutes\": 84,
    \"time_limit_seconds\": 12,
    \"is_published\": true,
    \"revision_status\": \"pending_review\",
    \"position\": 77,
    \"questions\": [
        {
            \"type\": \"multiple_choice\",
            \"prompt\": \"architecto\",
            \"points\": 22,
            \"position\": 67,
            \"options\": [
                {
                    \"key\": \"z\",
                    \"text\": \"m\",
                    \"is_correct\": true
                }
            ]
        }
    ]
}"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/quizzes/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "b",
    "description": "Eius et animi quos velit et.",
    "module_id": 16,
    "pass_score": 22,
    "estimated_time_minutes": 84,
    "time_limit_seconds": 12,
    "is_published": true,
    "revision_status": "pending_review",
    "position": 77,
    "questions": [
        {
            "type": "multiple_choice",
            "prompt": "architecto",
            "points": 22,
            "position": 67,
            "options": [
                {
                    "key": "z",
                    "text": "m",
                    "is_correct": true
                }
            ]
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/courses/{course_slug}/quizzes/{id}

PATCH api/courses/{course_slug}/quizzes/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

id   integer     

The ID of the quiz. Example: 16

Body Parameters

title   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

module_id   integer  optional    

Must match an existing stored value. Example: 16

pass_score   integer  optional    

Must be at least 0. Must not be greater than 100. Example: 22

estimated_time_minutes   integer  optional    

Must be at least 0. Example: 84

time_limit_seconds   integer  optional    

Must be at least 0. Example: 12

is_published   boolean  optional    

Example: true

revision_status   string  optional    

Example: pending_review

Must be one of:
  • draft
  • pending_review
  • pending_unpublish
  • published
position   integer  optional    

Must be at least 0. Example: 77

questions   object[]  optional    
type   string  optional    

This field is required when questions is present. Example: multiple_choice

Must be one of:
  • single_choice
  • multiple_choice
prompt   string  optional    

This field is required when questions is present. Example: architecto

points   integer  optional    

Must be at least 1. Must not be greater than 100. Example: 22

position   integer  optional    

Must be at least 1. Example: 67

options   object[]  optional    

This field is required when questions is present. Must have at least 2 items.

key   string  optional    

This field is required when questions is present. Must not be greater than 100 characters. Example: z

text   string  optional    

This field is required when questions is present. Must not be greater than 500 characters. Example: m

is_correct   boolean  optional    

Example: true

DELETE api/courses/{course_slug}/quizzes/{id}

Example request:
curl --request DELETE \
    "http://localhost:8000/api/courses/architecto/quizzes/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/quizzes/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/courses/{course_slug}/quizzes/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

id   integer     

The ID of the quiz. Example: 16

PATCH api/courses/{course_slug}/quizzes/{quiz_id}/unpublish

Example request:
curl --request PATCH \
    "http://localhost:8000/api/courses/architecto/quizzes/16/unpublish" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/quizzes/16/unpublish"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/courses/{course_slug}/quizzes/{quiz_id}/unpublish

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

quiz_id   integer     

The ID of the quiz. Example: 16

POST api/quizzes/{quiz_id}/attempts

Example request:
curl --request POST \
    "http://localhost:8000/api/quizzes/16/attempts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"answers\": [],
    \"started_at\": \"2026-06-14T17:41:04\",
    \"completed_at\": \"2026-06-14T17:41:04\"
}"
const url = new URL(
    "http://localhost:8000/api/quizzes/16/attempts"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "answers": [],
    "started_at": "2026-06-14T17:41:04",
    "completed_at": "2026-06-14T17:41:04"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/quizzes/{quiz_id}/attempts

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

quiz_id   integer     

The ID of the quiz. Example: 16

Body Parameters

answers   object     
score   string  optional    
started_at   string  optional    

Must be a valid date. Example: 2026-06-14T17:41:04

completed_at   string  optional    

Must be a valid date. Example: 2026-06-14T17:41:04

POST api/courses/{course_slug}/reviews

Example request:
curl --request POST \
    "http://localhost:8000/api/courses/architecto/reviews" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"rating\": 1,
    \"comment\": \"architecto\"
}"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/reviews"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "rating": 1,
    "comment": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/courses/{course_slug}/reviews

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

Body Parameters

rating   integer     

Must be at least 1. Must not be greater than 5. Example: 1

comment   string  optional    

Example: architecto

PUT api/courses/{course_slug}/reviews/{id}

Example request:
curl --request PUT \
    "http://localhost:8000/api/courses/architecto/reviews/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"rating\": 1,
    \"comment\": \"architecto\",
    \"is_published\": true
}"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/reviews/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "rating": 1,
    "comment": "architecto",
    "is_published": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/courses/{course_slug}/reviews/{id}

PATCH api/courses/{course_slug}/reviews/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

id   integer     

The ID of the review. Example: 16

Body Parameters

rating   integer  optional    

Must be at least 1. Must not be greater than 5. Example: 1

comment   string  optional    

Example: architecto

is_published   boolean  optional    

Example: true

DELETE api/courses/{course_slug}/reviews/{id}

Example request:
curl --request DELETE \
    "http://localhost:8000/api/courses/architecto/reviews/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/reviews/16"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/courses/{course_slug}/reviews/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

id   integer     

The ID of the review. Example: 16

POST api/payments/stripe/confirm

Example request:
curl --request POST \
    "http://localhost:8000/api/payments/stripe/confirm" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"session_id\": \"b\"
}"
const url = new URL(
    "http://localhost:8000/api/payments/stripe/confirm"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "session_id": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/payments/stripe/confirm

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

session_id   string     

Must not be greater than 255 characters. Example: b

POST api/courses/{course_slug}/payments

Example request:
curl --request POST \
    "http://localhost:8000/api/courses/architecto/payments" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"provider\": \"b\",
    \"amount\": 39,
    \"currency\": \"gzm\",
    \"transaction_id\": \"i\"
}"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/payments"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "provider": "b",
    "amount": 39,
    "currency": "gzm",
    "transaction_id": "i"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/courses/{course_slug}/payments

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

Body Parameters

provider   string     

Must not be greater than 100 characters. Example: b

amount   number     

Must be at least 0. Example: 39

currency   string  optional    

Must be 3 characters. Example: gzm

transaction_id   string  optional    

Must not be greater than 255 characters. Example: i

provider_payload   object  optional    

POST api/courses/{course_slug}/payments/stripe-checkout

Example request:
curl --request POST \
    "http://localhost:8000/api/courses/architecto/payments/stripe-checkout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"success_url\": \"http:\\/\\/www.bailey.biz\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",
    \"cancel_url\": \"https:\\/\\/www.runte.com\\/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci\"
}"
const url = new URL(
    "http://localhost:8000/api/courses/architecto/payments/stripe-checkout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "success_url": "http:\/\/www.bailey.biz\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html",
    "cancel_url": "https:\/\/www.runte.com\/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/courses/{course_slug}/payments/stripe-checkout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

course_slug   string     

The slug of the course. Example: architecto

Body Parameters

success_url   string  optional    

Must not be greater than 2048 characters. Example: http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html

cancel_url   string  optional    

Must not be greater than 2048 characters. Example: https://www.runte.com/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci

POST api/lessons/{lesson_id}/progress

Example request:
curl --request POST \
    "http://localhost:8000/api/lessons/16/progress" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"progress_percent\": 1
}"
const url = new URL(
    "http://localhost:8000/api/lessons/16/progress"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "progress_percent": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/lessons/{lesson_id}/progress

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

lesson_id   integer     

The ID of the lesson. Example: 16

Body Parameters

progress_percent   integer     

Must be at least 0. Must not be greater than 100. Example: 1

PUT api/lessons/{lesson_id}/progress

Example request:
curl --request PUT \
    "http://localhost:8000/api/lessons/16/progress" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"progress_percent\": 1
}"
const url = new URL(
    "http://localhost:8000/api/lessons/16/progress"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "progress_percent": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/lessons/{lesson_id}/progress

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

lesson_id   integer     

The ID of the lesson. Example: 16

Body Parameters

progress_percent   integer     

Must be at least 0. Must not be greater than 100. Example: 1