Introduction
The Teachfloor API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Base URL
https://api.teachfloor.com
Authenticating requests
This API is authenticated by sending an Authorization header with the value "Bearer {YOUR_API_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your API Key in Settings > Integrations and clicking Generate API Key.
Rate Limiting
Example response: HTTP/1.1 200 OK X-RateLimit-Limit: 50 X-RateLimit-Remaining: 48
Teachfloor API has a rate limit of 50 requests per minute per API Key.
Each HTTP response includes headers indicating the rate limit status: X-RateLimit-Limit specifies the rate limit per minute, and X-RateLimit-Remaining indicates the remaining rate limit available.
Activities
Retrieve an Activity
Requires Authentication
Retrieves the details of an existing activity in your organization based on the provided unique activity ID. The response includes comprehensive information about the activity, such as its score, timestamps, associated element details, and related metadata.
If the activity is performed by an individual, the member key contains the details of the member who completed the activity.
If the activity is performed by a group, the members key provides a list of all members who participated in the activity.
The meta object contains additional details and metadata about the activity's completion status. It provides context on the outcome and participant of the activity.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/activities/p5v87ERWKR3dkjyD" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/activities/p5v87ERWKR3dkjyD',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/activities/p5v87ERWKR3dkjyD"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"id": "KwJ8VgrmlAp4PBnM",
"object": "activity",
"timestamp" : "2022-11-27T13:52:02.000000Z",
"status": "PASSED",
"passed": true,
"score": 100,
"completed_by": "6K8vojJn1xe14abL",
"member": {
"id": "6K8vojJn1xe14abL",
"object": "member",
"first_name": "Adalberto",
"last_name": "Bruen",
"full_name": "Adalberto Bruen",
"avatar": null,
"email": "iva52@example.org",
"is_email_verified": true,
"last_seen": "2024-11-27T13:51:52.000000Z"
},
"context": {
"id": "QB8nmEJjqdbLA2K5",
"object": "element",
"created_at": "2024-11-26T11:37:16.000000Z",
"name": "Multiple Choice Quiz",
"cover": null,
"type": "QUIZ",
"position": 3,
"course": "B4peAvmZ1L9OY3Xr",
"module": "no0aApWNyRMD68rv",
"metadata": {}
}
}
Received response:
Request failed with error:
List all Activities
Requires Authentication
Returns a list of activities within your organization. The activities are sorted by their creation date, with the most recently created activities appearing first. Each activity in the list includes information such as the score, dates, element data and more.
If the activity is performed by an individual, the member key contains the details of the member who completed the activity.
If the activity is performed by a group, the members key provides a list of all members who participated in the activity.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/activities?course=B4peAvmZ1L9OY3Xr&module=no0aApWNyRMD68rv&element=QB8nmEJjqdbLA2K5&member=6K8vojJn1xe14abL&page=2" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/activities',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'course'=> 'B4peAvmZ1L9OY3Xr',
'module'=> 'no0aApWNyRMD68rv',
'element'=> 'QB8nmEJjqdbLA2K5',
'member'=> '6K8vojJn1xe14abL',
'page'=> '2',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/activities"
);
const params = {
"course": "B4peAvmZ1L9OY3Xr",
"module": "no0aApWNyRMD68rv",
"element": "QB8nmEJjqdbLA2K5",
"member": "6K8vojJn1xe14abL",
"page": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": [
{
"id": "KwJ8VgrmlAp4PBnM",
"object": "activity",
"timestamp" : "2022-11-27T13:52:02.000000Z",
"status": "PASSED",
"passed": true,
"score": 100,
"completed_by": "6K8vojJn1xe14abL",
"member": {
"id": "6K8vojJn1xe14abL",
"object": "member",
"first_name": "Adalberto",
"last_name": "Bruen",
"full_name": "Adalberto Bruen",
"avatar": null,
"email": "iva52@example.org",
"is_email_verified": true,
"last_seen": "2024-11-27T13:51:52.000000Z"
},
"context": {
"id": "QB8nmEJjqdbLA2K5",
"object": "element",
"created_at": "2024-11-26T11:37:16.000000Z",
"name": "Multiple Choice Quiz",
"cover": null,
"type": "QUIZ",
"position": 3,
"course": "B4peAvmZ1L9OY3Xr",
"module": "no0aApWNyRMD68rv",
"metadata": {}
}
},
{...},
{...},
],
"pagination": {
"total": 3,
"count": 3,
"per_page": 10,
"current_page": 1,
"total_pages": 1
}
}
Received response:
Request failed with error:
Courses
Search Courses
Requires Authentication
Search for existing courses in your organization. You can search by course name. The search is case-insensitive and supports partial matches.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/courses/search" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"Marketing\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/courses/search',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'q' => 'Marketing',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/courses/search"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "Marketing"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": [
{
"id": "p5v87ERWKR3dkjyD",
"object": "course",
"name": "Ultimate Marketing Course",
"status": "PUBLISHED",
"created_at": "2022-02-03T16:06:42.000000Z",
"cover": null,
"availability": "CONTINUOUS",
"visibility": "PRIVATE",
"start_date": null,
"end_date": null,
"currency": "eur",
"price": null,
"url": null,
"public_url": null,
"join_url": null,
"metadata": {}
},
{...},
{...}
],
"pagination": {
"total": 5,
"count": 5,
"per_page": 10,
"current_page": 1,
"total_pages": 1
}
}
}
Received response:
Request failed with error:
Retrieve a Course
Requires Authentication
Retrieves the details of an existing course in your organization based on the provided unique course ID. Returns a comprehensive information about the course, including its name, availability, status, dates, and more.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"id": "p5v87ERWKR3dkjyD",
"object": "course",
"name": "Ultimate Marketing Course",
"status": "PUBLISHED",
"created_at": "2022-02-03T16:06:42.000000Z",
"cover": null,
"availability": "CONTINUOUS",
"visibility": "PRIVATE",
"start_date": null,
"end_date": null,
"currency": "eur",
"price": null,
"content": null,
"url": null,
"public_url": null,
"join_url": null,
"metadata": {}
}
}
Received response:
Request failed with error:
List all Courses
Requires Authentication
Returns a list of courses within your organization. The courses are sorted by their creation date, with the most recently created courses appearing first. Each course in the list includes information such as the course name, availability, status, dates, and more.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/courses?page=2" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/courses',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '2',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/courses"
);
const params = {
"page": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": [
{
"id": "p5v87ERWKR3dkjyD",
"object": "course",
"name": "Ultimate Marketing Course",
"status": "PUBLISHED",
"created_at": "2022-02-03T16:06:42.000000Z",
"cover": null,
"availability": "CONTINUOUS",
"visibility": "PRIVATE",
"start_date": null,
"end_date": null,
"currency": "eur",
"price": null,
"url": null,
"public_url": null,
"join_url": null,
"metadata": {}
},
{...},
{...}
],
"pagination": {
"total": 15,
"count": 5,
"per_page": 10,
"current_page": 1,
"total_pages": 2
}
}
}
Received response:
Request failed with error:
Join a Course
Requires Authentication
Joins a member in one of your courses.
Example request:
curl --request POST \
"https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/join" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"member\": \"e7W6kP8wvjd3GRBz\",
\"role\": \"lecturer\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/join',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'member' => 'e7W6kP8wvjd3GRBz',
'role' => 'lecturer',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/join"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"member": "e7W6kP8wvjd3GRBz",
"role": "lecturer"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": null
}
Received response:
Request failed with error:
Revoke Course Access
Requires Authentication
Revokes a member access to a course.
Example request:
curl --request POST \
"https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/revoke" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"member\": \"e7W6kP8wvjd3GRBz\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/revoke',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'member' => 'e7W6kP8wvjd3GRBz',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/revoke"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"member": "e7W6kP8wvjd3GRBz"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": null
}
Received response:
Request failed with error:
Create a Course
Requires Authentication
Creates a course in your organization. Returns the created course details upon successful creation.
Example request:
curl --request POST \
"https://api.teachfloor.com/v0/courses" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Ultimate Marketing Course\",
\"content\": \"# Introduction\\\\nWelcome to the **Ultimate Marketing Course**.\",
\"availability\": \"CONTINUOUS\",
\"start_date\": \"2023-07-12\",
\"end_date\": \"2023-07-26\",
\"visibility\": \"PUBLIC\",
\"metadata\": {
\"category\": \"marketing\"
}
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.teachfloor.com/v0/courses',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Ultimate Marketing Course',
'content' => '# Introduction\\nWelcome to the **Ultimate Marketing Course**.',
'availability' => 'CONTINUOUS',
'start_date' => '2023-07-12',
'end_date' => '2023-07-26',
'visibility' => 'PUBLIC',
'metadata' => [
'category' => 'marketing',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/courses"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Ultimate Marketing Course",
"content": "# Introduction\\nWelcome to the **Ultimate Marketing Course**.",
"availability": "CONTINUOUS",
"start_date": "2023-07-12",
"end_date": "2023-07-26",
"visibility": "PUBLIC",
"metadata": {
"category": "marketing"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"id": "p5v87ERWKR3dkjyD",
"object": "course",
"name": "Ultimate Marketing Course",
"status": "PUBLISHED",
"created_at": "2022-02-03T16:06:42.000000Z",
"cover": null,
"availability": "CONTINUOUS",
"visibility": "PRIVATE",
"start_date": null,
"end_date": null,
"currency": "eur",
"price": null,
"content": "# Introduction\nWelcome to the **Ultimate Marketing Course**.",
"url": null,
"public_url": null,
"join_url": null,
"metadata": {}
}
}
Received response:
Request failed with error:
List all Course Members
Requires Authentication
Returns a list of members within the course.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/members" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"include_test_user\": false
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/members',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'include_test_user' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/members"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"include_test_user": false
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": [
{
"id": "6jO9XN7mZEVpvxqo",
"object": "course_member",
"joined_at": "2024-01-22T12:56:04.000000Z",
"member": {
"id": "e7W6kP8wvjd3GRBz",
"object": "member",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"avatar": null,
"email": null,
"is_email_verified": false,
"last_seen": "2024-01-22T12:56:04.000000Z"
},
"course": {
"id": "p5v87ERWKR3dkjyD",
"object": "course",
"name": "Ultimate Marketing Course",
"status": "PUBLISHED",
"created_at": "2022-02-03T16:06:42.000000Z",
"cover": null,
"availability": "CONTINUOUS",
"visibility": "PRIVATE",
"start_date": null,
"end_date": null,
"currency": "eur",
"price": null,
"url": null,
"public_url": null,
"join_url": null,
"metadata": {}
},
"custom_fields": {
"field_1": [
"Option A",
"Option B"
]
},
"tags": [
"vip"
]
},
{...},
{...}
],
"pagination": {
"total": 15,
"count": 5,
"per_page": 10,
"current_page": 1,
"total_pages": 2
}
}
}
Received response:
Request failed with error:
List all Course Modules
Requires Authentication
Returns a list of modules within the course.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/courses/LZ6dN0DGgBD3QjxB/modules" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/courses/LZ6dN0DGgBD3QjxB/modules',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/courses/LZ6dN0DGgBD3QjxB/modules"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": [
{
"id": "LZ6dN0DGgBD3QjxB",
"object": "module",
"created_at": "2024-01-22T12:55:11.000000Z",
"name": "Lesson #1",
"type": "LESSON",
"availability": "CONTINUOUS",
"position": 0,
"course": "B4peAvmZ1L9OY3Xr",
"metadata": {}
},
{...},
{...}
],
"pagination": {
"total": 15,
"count": 5,
"per_page": 10,
"current_page": 1,
"total_pages": 2
}
}
}
Received response:
Request failed with error:
List all Course Elements
Requires Authentication
Returns a list of elements within the course.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/courses/WYxKj5OlrekVAGr7/elements" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/courses/WYxKj5OlrekVAGr7/elements',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/courses/WYxKj5OlrekVAGr7/elements"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": [
{
"id": "WYxKj5OlrekVAGr7",
"object": "element",
"created_at": "2024-01-22T12:55:11.000000Z",
"name": "Introduction",
"cover": null,
"type": "CONTENT",
"position": 0,
"module": "LZ6dN0DGgBD3QjxB",
"metadata": {},
"properties": {}
},
{...},
{...}
],
"pagination": {
"total": 15,
"count": 5,
"per_page": 10,
"current_page": 1,
"total_pages": 2
}
}
}
Received response:
Request failed with error:
Update a Course
Requires Authentication
Updates the details of an existing course in your organization based on the provided unique course ID. Any parameters not provided will be left unchanged. Returns the updated course details upon successful update.
Example request:
curl --request POST \
"https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Ultimate Marketing Course\",
\"content\": \"# Introduction\\\\nWelcome to the **Ultimate Marketing Course**.\",
\"availability\": \"CONTINUOUS\",
\"start_date\": \"2023-07-12\",
\"end_date\": \"2023-07-26\",
\"visibility\": \"PUBLIC\",
\"metadata\": {
\"category\": \"marketing\"
}
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Ultimate Marketing Course',
'content' => '# Introduction\\nWelcome to the **Ultimate Marketing Course**.',
'availability' => 'CONTINUOUS',
'start_date' => '2023-07-12',
'end_date' => '2023-07-26',
'visibility' => 'PUBLIC',
'metadata' => [
'category' => 'marketing',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Ultimate Marketing Course",
"content": "# Introduction\\nWelcome to the **Ultimate Marketing Course**.",
"availability": "CONTINUOUS",
"start_date": "2023-07-12",
"end_date": "2023-07-26",
"visibility": "PUBLIC",
"metadata": {
"category": "marketing"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"id": "p5v87ERWKR3dkjyD",
"object": "course",
"name": "Ultimate Marketing Course",
"status": "PUBLISHED",
"created_at": "2022-02-03T16:06:42.000000Z",
"cover": null,
"availability": "CONTINUOUS",
"visibility": "PRIVATE",
"start_date": null,
"end_date": null,
"currency": "eur",
"price": null,
"content": "# Introduction\nWelcome to the **Ultimate Marketing Course**.",
"url": null,
"public_url": null,
"join_url": null,
"metadata": {}
}
}
Received response:
Request failed with error:
Delete a Course
Requires Authentication
Deletes a course in your organization. Returns an object with a deleted parameter upon successful deletion.
Example request:
curl --request DELETE \
"https://api.teachfloor.com/v0/courses/1" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.teachfloor.com/v0/courses/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/courses/1"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"id": "p5v87ERWKR3dkjyD",
"object": "course",
"deleted": true,
}
}
Received response:
Request failed with error:
Retrieve a Course Member
Requires Authentication
Retrieves the details of a specific member in a course, including their progress data.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/members/e7W6kP8wvjd3GRBz" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/members/e7W6kP8wvjd3GRBz',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/members/e7W6kP8wvjd3GRBz"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"id": "6jO9XN7mZEVpvxqo",
"object": "course_member",
"joined_at": "2024-01-22T12:56:04.000000Z",
"member": {
"id": "e7W6kP8wvjd3GRBz",
"object": "member",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"avatar": null,
"email": "john@example.com",
"is_email_verified": true,
"last_seen": "2024-01-22T12:56:04.000000Z"
},
"course": {
"id": "p5v87ERWKR3dkjyD",
"object": "course",
"name": "Ultimate Marketing Course"
},
"custom_fields": {
"field_1": [
"Option A",
"Option B"
],
"field_12": "Vegetarian"
},
"tags": [
"vip",
"beta-cohort"
],
"progress": {
"is_completed": false,
"completion_percentage": 65,
"completed_elements_count": 8,
"total_elements_count": 12,
"completed_modules_count": 3,
"total_modules_count": 5,
"started_at": "2024-01-22T12:56:04.000000Z",
"completed_at": null
}
}
}
Received response:
Request failed with error:
List all Course Custom Fields
Requires Authentication
Returns the custom fields defined on the course — the ones whose values are carried on a course member. Use the key of each field when writing values for a member of this course.
A course either uses the organization-wide set of course fields or its own, depending on how it is configured; this endpoint returns whichever applies. Courses with custom fields switched off return an empty list.
These are separate from the organization fields carried on a member, which are listed by the custom fields endpoint.
The full list is returned in a single response; this endpoint is not paginated.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/custom-fields" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/custom-fields',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/custom-fields"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": [
{
"key": "field_12",
"object": "custom-field",
"created_at": "2024-07-30T16:05:47.000000Z",
"name": "Dietary requirements",
"description": null,
"type": "SINGLE_OPTION",
"options": [
"None",
"Vegetarian",
"Vegan"
],
"required": false
}
]
}
Received response:
Request failed with error:
Update a Course Member
Requires Authentication
Updates a member's enrollment in one of your courses. Currently the member's course custom field values are the writable data; any parameters not provided are left unchanged. Returns the updated course member.
The values written here are the course's own enrollment fields. The organization-level fields carried on a member are written through the member endpoints instead.
Example request:
curl --request POST \
"https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/members/e7W6kP8wvjd3GRBz" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"custom_fields\": {
\"field_12\": \"Vegetarian\"
},
\"tags\": [
\"vip\",
\"beta-cohort\"
]
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/members/e7W6kP8wvjd3GRBz',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'custom_fields' => [
'field_12' => 'Vegetarian',
],
'tags' => [
'vip',
'beta-cohort',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/courses/p5v87ERWKR3dkjyD/members/e7W6kP8wvjd3GRBz"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"custom_fields": {
"field_12": "Vegetarian"
},
"tags": [
"vip",
"beta-cohort"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"id": "6jO9XN7mZEVpvxqo",
"object": "course_member",
"joined_at": "2024-01-22T12:56:04.000000Z",
"member": {
"id": "e7W6kP8wvjd3GRBz",
"object": "member",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"avatar": null,
"email": null,
"is_email_verified": false,
"last_seen": "2024-01-22T12:56:04.000000Z"
},
"course": {
"id": "p5v87ERWKR3dkjyD",
"object": "course",
"name": "Ultimate Marketing Course"
},
"custom_fields": {
"field_12": "Vegetarian"
},
"tags": [
"vip",
"beta-cohort"
],
"progress": {
"is_completed": false,
"completion_percentage": 65,
"completed_elements_count": 8,
"total_elements_count": 12,
"completed_modules_count": 3,
"total_modules_count": 5,
"started_at": "2024-01-22T12:56:04.000000Z",
"completed_at": null
}
}
}
Received response:
Request failed with error:
Elements
List all activites
Requires Authentication
Returns a list of activites related to the element.
If the activity is performed by an individual, the member key contains the details of the member who completed the activity.
If the activity is performed by a group, the members key provides a list of all members who participated in the activity.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/elements/e7W6kP8wvjd3GRBz/activities?member=6K8vojJn1xe14abL" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/elements/e7W6kP8wvjd3GRBz/activities',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'member'=> '6K8vojJn1xe14abL',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/elements/e7W6kP8wvjd3GRBz/activities"
);
const params = {
"member": "6K8vojJn1xe14abL",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": [
{
"id": "KwJ8VgrmlAp4PBnM",
"object": "activity",
"timestamp" : "2022-11-27T13:52:02.000000Z",
"status": "PASSED",
"passed": true,
"score": 100,
"completed_by": "6K8vojJn1xe14abL",
"member": {
"id": "6K8vojJn1xe14abL",
"object": "member",
"first_name": "Adalberto",
"last_name": "Bruen",
"full_name": "Adalberto Bruen",
"avatar": null,
"email": "iva52@example.org",
"is_email_verified": true,
"last_seen": "2024-11-27T13:51:52.000000Z"
},
"context": {
"id": "QB8nmEJjqdbLA2K5",
"object": "element",
"created_at": "2024-11-26T11:37:16.000000Z",
"name": "Multiple Choice Quiz",
"cover": null,
"type": "QUIZ",
"content": null,
"position": 3,
"course": "B4peAvmZ1L9OY3Xr",
"module": "no0aApWNyRMD68rv",
"metadata": {},
"properties": {
"passing_score": 70,
"completion_trigger": "on_pass"
}
},
},
{...},
{...},
],
"pagination": {
"total": 3,
"count": 3,
"per_page": 10,
"current_page": 1,
"total_pages": 1
}
}
Received response:
Request failed with error:
Create element
Requires Authentication
Creates an element in the specified module. Returns the created element details upon successful creation.
Example request:
curl --request POST \
"https://api.teachfloor.com/v0/elements" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"First knowledge\",
\"content\": \"# Element Introduction\\\\nWelcome to the **first element**.\",
\"module\": \"no0aApWNyRMD68rv\",
\"position\": 0,
\"type\": \"QUIZ\",
\"metadata\": {
\"category\": \"marketing\"
},
\"properties\": {
\"video_url\": \"https:\\/\\/www.youtube.com\\/watch?v=dQw4w9WgXcQ\"
}
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.teachfloor.com/v0/elements',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'First knowledge',
'content' => '# Element Introduction\\nWelcome to the **first element**.',
'module' => 'no0aApWNyRMD68rv',
'position' => 0,
'type' => 'QUIZ',
'metadata' => [
'category' => 'marketing',
],
'properties' => [
'video_url' => 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/elements"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "First knowledge",
"content": "# Element Introduction\\nWelcome to the **first element**.",
"module": "no0aApWNyRMD68rv",
"position": 0,
"type": "QUIZ",
"metadata": {
"category": "marketing"
},
"properties": {
"video_url": "https:\/\/www.youtube.com\/watch?v=dQw4w9WgXcQ"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": {
"id": "QB8nmEJjqdbLA2K5",
"object": "element",
"created_at": "2024-11-26T11:37:16.000000Z",
"name": "Multiple Choice Quiz",
"cover": null,
"type": "QUIZ",
"content": null,
"position": 3,
"course": "B4peAvmZ1L9OY3Xr",
"module": "no0aApWNyRMD68rv",
"metadata": {},
"properties": {
"passing_score": 70,
"completion_trigger": "on_pass"
}
}
}
}
Received response:
Request failed with error:
Update element
Requires Authentication
Updates the details of an existing element in your organization based on the provided unique element ID. Any parameters not provided will be left unchanged. Returns the updated element details upon successful update.
Example request:
curl --request POST \
"https://api.teachfloor.com/v0/elements/p5v87ERWKR3dkjyD" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Introduction to Marketing\",
\"content\": \"# Element Introduction\\\\nWelcome to the **first element**.\",
\"position\": 2,
\"metadata\": {
\"category\": \"marketing\"
},
\"properties\": {
\"passing_score\": 80
}
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.teachfloor.com/v0/elements/p5v87ERWKR3dkjyD',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Introduction to Marketing',
'content' => '# Element Introduction\\nWelcome to the **first element**.',
'position' => 2,
'metadata' => [
'category' => 'marketing',
],
'properties' => [
'passing_score' => 80,
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/elements/p5v87ERWKR3dkjyD"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Introduction to Marketing",
"content": "# Element Introduction\\nWelcome to the **first element**.",
"position": 2,
"metadata": {
"category": "marketing"
},
"properties": {
"passing_score": 80
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": {
"id": "QB8nmEJjqdbLA2K5",
"object": "element",
"created_at": "2024-11-26T11:37:16.000000Z",
"name": "Multiple Choice Quiz",
"cover": null,
"type": "QUIZ",
"content": null,
"position": 3,
"course": "B4peAvmZ1L9OY3Xr",
"module": "no0aApWNyRMD68rv",
"metadata": {},
"properties": {
"passing_score": 80,
"completion_trigger": "on_pass"
}
}
}
}
Received response:
Request failed with error:
Search Elements
Requires Authentication
Search for existing elements in your organization. You can search by element name. The search is case-insensitive and supports partial matches.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/elements/search" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"Quiz\",
\"type\": \"DISCUSSION\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/elements/search',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'q' => 'Quiz',
'type' => 'DISCUSSION',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/elements/search"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "Quiz",
"type": "DISCUSSION"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": [
{
"id": "QB8nmEJjqdbLA2K5",
"object": "element",
"created_at": "2024-11-26T11:37:16.000000Z",
"name": "Multiple Choice Quiz",
"cover": null,
"type": "QUIZ",
"content": null,
"position": 3,
"course": "B4peAvmZ1L9OY3Xr",
"module": "no0aApWNyRMD68rv",
"metadata": {},
"properties": {}
},
{...},
{...}
],
"pagination": {
"total": 3,
"count": 3,
"per_page": 10,
"current_page": 1,
"total_pages": 1
}
}
}
Received response:
Request failed with error:
Retrieve an Element
Requires Authentication
Retrieves the details of an existing element in your organization based on the provided unique element ID. Returns comprehensive information about the element, including its name, type, content, position, and type-specific properties.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/elements/QB8nmEJjqdbLA2K5" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/elements/QB8nmEJjqdbLA2K5',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/elements/QB8nmEJjqdbLA2K5"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": {
"id": "QB8nmEJjqdbLA2K5",
"object": "element",
"created_at": "2024-11-26T11:37:16.000000Z",
"name": "Multiple Choice Quiz",
"cover": null,
"type": "QUIZ",
"content": null,
"position": 3,
"course": "B4peAvmZ1L9OY3Xr",
"module": "no0aApWNyRMD68rv",
"metadata": {},
"properties": {
"passing_score": 70,
"completion_trigger": "on_pass"
}
}
}
}
Received response:
Request failed with error:
List all Elements
Requires Authentication
Returns a list of elements within your organization. The elements are sorted by their creation date, with the most recently created elements appearing first.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/elements?page=2" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/elements',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '2',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/elements"
);
const params = {
"page": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": [
{
"id": "QB8nmEJjqdbLA2K5",
"object": "element",
"created_at": "2024-11-26T11:37:16.000000Z",
"name": "Multiple Choice Quiz",
"cover": null,
"type": "QUIZ",
"content": null,
"position": 3,
"course": "B4peAvmZ1L9OY3Xr",
"module": "no0aApWNyRMD68rv",
"metadata": {},
"properties": {}
},
{...},
{...}
],
"pagination": {
"total": 15,
"count": 5,
"per_page": 10,
"current_page": 1,
"total_pages": 2
}
}
}
Received response:
Request failed with error:
Delete an Element
Requires Authentication
Deletes an existing element in your organization. Returns an object with a deleted parameter upon successful deletion.
Example request:
curl --request DELETE \
"https://api.teachfloor.com/v0/elements/QB8nmEJjqdbLA2K5" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.teachfloor.com/v0/elements/QB8nmEJjqdbLA2K5',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/elements/QB8nmEJjqdbLA2K5"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"id": "QB8nmEJjqdbLA2K5",
"object": "element",
"deleted": true
}
}
Received response:
Request failed with error:
Endpoints
List public marketplace apps (featured / recently added / search / category).
Requires Authentication
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/marketplace/apps" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/marketplace/apps',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/marketplace/apps"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: max-age=10800, public
content-type: application/json
x-ratelimit-limit: 256
x-ratelimit-remaining: 255
strict-transport-security: max-age=31536000; includeSubdomains
permissions-policy: autoplay=(*), camera=(*), encrypted-media=(self), fullscreen=(*), geolocation=(self), gyroscope=(self), magnetometer=(), microphone=(self "http://localhost:3000"), midi=(), payment=(self), sync-xhr=(self), usb=()
{
"error": null,
"payload": {
"data": [
{
"id": "6a44e7df08cc1",
"name": "Lesson Feedback",
"description": "Collect learner feedback on every lesson with a quick emoji rating and an optional comment. Instructors, admins, and owners get a clear Satisfaction Rate and the comments behind it, lesson by lesson.",
"icon": "https://cdn.teachfloor.com/public/1/icon-1782490711.png",
"version": "1.2.0",
"built_by": "Teachfloor",
"views": [
"teachfloor.dashboard.course.module.detail",
"teachfloor.dashboard.course.element.detail",
"settings"
],
"permissions": [
"user:read",
"appdata:write",
"appdata:read"
],
"features": [
{
"key": "e214bac4-e053-a619-6181-319d653fcba5",
"image": null,
"title": "Emoji Ratings",
"description": "Learners rate each lesson on a friendly five-point emoji scale, with an optional comment field that appears the moment they pick a reaction. The lightweight, one-tap design keeps response rates high without interrupting the learning flow."
},
{
"key": "a942038c-c587-50e3-42fa-c181fe412d01",
"image": null,
"title": "Satisfaction Rate",
"description": "Every rating rolls up into a single Satisfaction Rate for the lesson, color-coded so you can spot strong and weak content at a glance. Admins and owners see the percentage, the full distribution across all five reactions, and the total number of responses."
},
{
"key": "1a1a12dd-46f4-523d-85bc-06dac89fda8c",
"image": null,
"title": "Comments That Add Context",
"description": "Read the written feedback behind the scores, each tied to the learner who left it. Use the comments to understand exactly what worked, what confused people, and what to improve in the next iteration of your course."
}
],
"screenshots": [
{
"alt": "Teachfloor Reaction Buttons app emojis with feedback screenshot",
"key": "d1a0b48f-cc5a-813f-78a7-22771f1970b3",
"url": "https://cdn.teachfloor.com/public/1/lesson-feedback-1-1782832097.webp"
},
{
"alt": "Teachfloor Reaction Buttons app emoji with feedback screenshot",
"key": "207cba02-09e3-4859-6e4c-e8f4258f0d41",
"url": "https://cdn.teachfloor.com/public/1/lesson-feedback-2-1782832100.webp"
},
{
"alt": "Teachfloor Reaction Buttons app feedback insight screenshot",
"key": "e9e8ea91-2e21-628e-4d53-064bba9cc9dd",
"url": "https://cdn.teachfloor.com/public/1/lesson-feedback-3-1782832105.webp"
}
],
"support_site_url": "https://support.teachfloor.com",
"install_url": "http://localhost/install/6a44e7df08cc1"
},
{
"id": "6a44e7df2c505",
"name": "Segment",
"description": "The Segment app seamlessly integrates with Teachfloor to track user interaction events and provide actionable analytics.",
"icon": "https://wofh.fra1.digitaloceanspaces.com/public/1/segment-1748388479.png",
"version": "1.3.1",
"built_by": "Teachfloor",
"views": [
"settings"
],
"permissions": [
"userdata:write",
"userdata:read",
"user_events:read",
"modules:read",
"elements:read",
"courses:read",
"appdata:write",
"appdata:read"
],
"features": [
{
"key": "28f6f795-6fb3-ac0c-6d67-4de91cea34ca",
"image": null,
"title": "Seamless Segment Integration",
"description": "Effortlessly send real-time data to Segment with minimal setup. Leverage Segment’s powerful analytics and integrations to connect with other tools in your stack."
},
{
"key": "cb2b2d06-25c3-227d-afbc-1716e1a289d9",
"image": null,
"title": "Comprehensive Event Tracking",
"description": "Automatically track user actions, such as clicks, navigation, and interactions, across your Teachfloor app. Gain a complete picture of how users interact with your platform."
},
{
"key": "f927a53f-0cad-874f-687c-0dbb6ff35b26",
"image": null,
"title": "Enhanced Contextual Insights",
"description": "Pair interaction events with contextual details, such as user roles, course progress, or session data, to provide richer insights and improve decision-making for product development and engagement strategies."
}
],
"screenshots": [],
"support_site_url": "https://support.teachfloor.com",
"install_url": "http://localhost/install/6a44e7df2c505"
},
{
"id": "6a44e7df26f9d",
"name": "Calculator",
"description": "Add a sleek, modern calculator feature in your courses whenever it’s needed for your learners to enhance their learning experience.",
"icon": "https://cdn.teachfloor.com/public/1/icon-1780269267.png",
"version": "1.2.0",
"built_by": "Teachfloor",
"views": [
"teachfloor.dashboard.*",
"settings"
],
"permissions": [
"appdata:write",
"appdata:read"
],
"features": [
{
"key": "e6b2ca92-f3b2-92a5-054a-a1e916679ba2",
"image": null,
"title": "A Simple Minimal Calculator",
"description": "A simple and minimal tool designed for seamless integration into the Teachfloor platform. It is a lightweight, built-in tool that enables users to perform quick calculations seamlessly within the platform, enhancing efficiency without distractions."
}
],
"screenshots": [],
"support_site_url": "https://support.teachfloor.com",
"install_url": "http://localhost/install/6a44e7df26f9d"
},
{
"id": "6a44e7df22d3b",
"name": "Intercom",
"description": "Intercom allows you to seamlessly integrate powerful chat and support directly into your Teachfloor LMS, enhancing student and instructor experience.",
"icon": "https://wofh.fra1.digitaloceanspaces.com/public/1/intercom-1750345135.png",
"version": "1.0.2",
"built_by": "Teachfloor",
"views": [
"settings"
],
"permissions": [
"user:read",
"appdata:write",
"appdata:read"
],
"features": [
{
"key": "f075a699-5c9c-dce9-f1ea-1456bf993c39",
"image": null,
"title": "Real-time Live Chat",
"description": "Provide instant help directly within Teachfloor. Segment users (e.g., by course, role) to offer personalized support and route inquiries to the right instructors or support staff."
},
{
"key": "18b0974d-78ac-1277-47b6-d8e5d9bd5613",
"image": null,
"title": "Proactive Messaging & Announcements",
"description": "Drive engagement by sending targeted in-app messages and announcements. Onboard new users, highlight course updates, or gather feedback directly within your Teachfloor platform."
},
{
"key": "696f130d-f139-e56a-0ca1-f4a36da9413c",
"image": null,
"title": "Automated Self-Service",
"description": "Reduce common queries with an AI bot that instantly answers student and instructor questions pulled from your knowledge base. It seamlessly escalates to human support when needed."
}
],
"screenshots": [],
"support_site_url": "https://support.teachfloor.com",
"install_url": "http://localhost/install/6a44e7df22d3b"
},
{
"id": "6a44e7df1efa3",
"name": "AI Assistant",
"description": "An intelligent learning companion that helps learners understand, practice, and engage with course content more effectively. The AI Assistant supports learners throughout their journey with instant answers, explanations, and interactive exercises.",
"icon": "https://wofh.fra1.cdn.digitaloceanspaces.com/public/1/logomark-3-1760399650.png",
"version": "1.3.0",
"built_by": "Teachfloor",
"views": [
"teachfloor.dashboard.course.module.detail",
"teachfloor.dashboard.course.element.detail",
"teachfloor.dashboard.course.detail",
"settings"
],
"permissions": [
"usercollection:write",
"modules:read",
"elements:read",
"courses:read",
"appdata:write",
"ai:text_generate",
"ai:context_external_send"
],
"features": [
{
"key": "e13157dd-2138-8f76-447d-873c97f10ca4",
"image": null,
"title": "Smart Explanations",
"description": "Breaks down complex course concepts into simple, relatable explanations that adapt to each learner’s background and progress. The AI Assistant helps connect theory to real-world examples, ensuring deep understanding and long-term retention."
},
{
"key": "306542ad-86df-e947-aef2-6ceb016cbc53",
"image": null,
"title": "Interactive Practice",
"description": "Engages learners with dynamic exercises, quizzes, and guided examples designed to reinforce comprehension. By interacting with the material, learners can test their knowledge, identify gaps, and receive instant feedback to improve performance."
},
{
"key": "34eda443-4442-e77a-502b-5c85aa587e76",
"image": null,
"title": "Personalized Support",
"description": "Provides contextual guidance based on the learner’s current course, activity, and progress. Whether clarifying a concept or offering study tips, the AI Assistant ensures every learner feels supported, motivated, and confident throughout their journey."
}
],
"screenshots": [
{
"alt": null,
"key": "1c60db88-409e-c8ba-e686-673f24d4785e",
"url": "https://cdn.teachfloor.com/public/1/ai-assistant-1-1782830420.webp"
},
{
"alt": null,
"key": "8754a1ef-b2c3-8e1a-c262-5d94c49d2016",
"url": "https://cdn.teachfloor.com/public/1/ai-assistant-2-1782830430.webp"
},
{
"alt": null,
"key": "ce017741-6cbc-b253-3749-3a26e296fc9b",
"url": "https://cdn.teachfloor.com/public/1/ai-assistant-setting-1-1782830445.webp"
},
{
"alt": null,
"key": "8645d326-52e2-c4f6-36eb-9a6204865047",
"url": "https://cdn.teachfloor.com/public/1/ai-assistant-setting-2-1782830450.webp"
}
],
"support_site_url": "https://support.teachfloor.com",
"install_url": "http://localhost/install/6a44e7df1efa3"
},
{
"id": "6a44e7df1b55e",
"name": "Notes",
"description": "A simple and powerful tool for learners to capture ideas, thoughts, and course insights. The Notes app makes it easy to keep track of key information in one place, whether typed or dictated.",
"icon": "https://wofh.fra1.cdn.digitaloceanspaces.com/public/1/notes-1759333008.png",
"version": "1.1.0",
"built_by": "Teachfloor",
"views": [
"teachfloor.dashboard.*"
],
"permissions": [
"userdata:write",
"userdata:read"
],
"features": [
{
"key": "2c42f737-8747-a9ea-6ef9-21ae81e746a7",
"image": null,
"title": "Organized Note-Taking",
"description": "Create and manage an unlimited list of notes directly within your course. Learners can quickly jot down key takeaways, reflections, or study reminders and keep everything neatly stored in one central place."
},
{
"key": "c8f239c8-c0bc-690a-14bb-a78da3d68b37",
"image": null,
"title": "Voice Dictation with Automatic Transcription",
"description": "Instead of typing, learners can use the integrated mic recording feature to speak their thoughts out loud. The app instantly transcribes spoken words into text, making it faster and easier to capture ideas in the moment."
},
{
"key": "1925a459-7eb4-3062-6398-134f5aebdf0d",
"image": null,
"title": "Always Accessible and Easy to Review",
"description": "Notes are available anytime throughout the course, so learners can revisit, edit, and build upon them whenever they need. This ensures nothing important is lost and helps keep learners organized and focused during their studies."
}
],
"screenshots": [],
"support_site_url": "https://support.teachfloor.com",
"install_url": "http://localhost/install/6a44e7df1b55e"
},
{
"id": "6a44e7df17993",
"name": "Pomodoro Timer",
"description": "A simple pomodoro timer with work and break intervals",
"icon": "https://cdn.teachfloor.com/public/1/icon-1780341452.png",
"version": "1.1.0",
"built_by": "Teachfloor",
"views": [
"teachfloor.dashboard.*"
],
"permissions": [],
"features": [
{
"key": "d8f41d0d-8810-aa34-faff-7c8e2c2678a3",
"image": null,
"title": "Focus Timer - Study in Pomodoros",
"description": "Beat distractions while you learn. Run 25-minute focus blocks with built-in short and long breaks — your timer keeps ticking as you navigate Teachfloor, so you stay on track from one lesson to the next."
}
],
"screenshots": [],
"support_site_url": "https://support.teachfloor.com",
"install_url": "http://localhost/install/6a44e7df17993"
},
{
"id": "6a44e7df135d3",
"name": "Bookmarks",
"description": "Save your spot anywhere in Teachfloor - bookmark courses, activities, and community pages, and jump back to them in one click.",
"icon": "https://cdn.teachfloor.com/public/1/icon-1780420647.png",
"version": "1.2.0",
"built_by": "Teachfloor",
"views": [
"teachfloor.dashboard.*"
],
"permissions": [
"usercollection:write",
"modules:read",
"elements:read",
"courses:read"
],
"features": [
{
"key": "dd5498bc-5778-fcbd-9e30-af816ff38c80",
"image": null,
"title": "Save anywhere in one tap",
"description": "Bookmark any course, module, activity, or community page from the dashboard with a single click. Each saved page comes with a smart label and category, so your list stays organized as it grows."
},
{
"key": "2afb0f1f-c68c-bc3d-e05f-d2df32fd7561",
"image": null,
"title": "Resume from any device",
"description": "Your bookmarks sync to your account, so the spots you save on your laptop are waiting for you on your phone. Jump straight back to a saved page in the same tab - or pop it open in a new one."
}
],
"screenshots": [],
"support_site_url": "https://support.teachfloor.com",
"install_url": "http://localhost/install/6a44e7df135d3"
},
{
"id": "6a44e7df0dbce",
"name": "Links",
"description": "A shared resource shelf, curated by your team. Admins set up a list of external links - tools, docs, references - that follow every learner across every page of the platform.",
"icon": "https://cdn.teachfloor.com/public/1/icon-1780442633.png",
"version": "1.1.0",
"built_by": "Teachfloor",
"views": [
"teachfloor.dashboard.*",
"settings"
],
"permissions": [
"appdata:write"
],
"features": [
{
"key": "ba113728-91ef-9b7e-1f2f-396fa688dcec",
"image": null,
"title": "Curate Once, Available Everywhere",
"description": "Set up your team's go-to tools, docs, and references from the app settings. Learners see the list on every dashboard page, one click away - no more hunting through emails or course descriptions."
}
],
"screenshots": [],
"support_site_url": "https://support.teachfloor.com",
"install_url": "http://localhost/install/6a44e7df0dbce"
},
{
"id": "6a44e7df0331e",
"name": "Net Promoter Score",
"description": "Measure overall learner loyalty with a classic 0–10 Net Promoter Score survey and an optional comment. Admins and owners get the headline NPS, the promoter, passive, and detractor breakdown, and the reasons behind every score.",
"icon": "https://cdn.teachfloor.com/public/1/icon-1782403120.png",
"version": "1.1.0",
"built_by": "Teachfloor",
"views": [
"teachfloor.dashboard.course.list",
"teachfloor.dashboard.course.detail",
"teachfloor.dashboard.community.overview",
"settings"
],
"permissions": [
"user:read",
"appdata:write",
"appdata:read"
],
"features": [
{
"key": "57dfd576-f743-53f0-2439-f8353ea0edeb",
"image": null,
"title": "One-Question Survey",
"description": "Learners answer the single question that matters most on a familiar 0–10 scale, with room to explain their score. The clean, focused layout takes seconds to complete and works anywhere in the academy."
},
{
"key": "9ff743b9-9421-5f15-669d-cd5f0c265712",
"image": null,
"title": "Headline NPS Score",
"description": "Responses are turned into a single Net Promoter Score, shown with a plain-language rating from Poor to Excellent. A color-coded badge and live response count make the health of your academy obvious at a glance."
},
{
"key": "c461b434-b638-fe08-3ac7-d932b304191a",
"image": null,
"title": "Promoters, Passives & Detractors",
"description": "See exactly how your audience splits across promoters, passives, and detractors, complete with percentages and counts. Pair the distribution with written comments to learn what is driving loyalty — or hurting it."
}
],
"screenshots": [
{
"alt": "Teachfloor Net Promoter Score app feedback screenshot",
"key": "ebe212f9-d4c8-e79f-0ad9-b36215bb53f8",
"url": "https://cdn.teachfloor.com/public/1/nps-1-1782832379.webp"
},
{
"alt": "Teachfloor Net Promoter Score app insight screenshot",
"key": "9b07f2db-a092-935f-af83-6721697bdc3e",
"url": "https://cdn.teachfloor.com/public/1/nps-2-1782832382.webp"
}
],
"support_site_url": "https://support.teachfloor.com",
"install_url": "http://localhost/install/6a44e7df0331e"
}
],
"pagination": {
"total": 17,
"count": 10,
"per_page": 10,
"current_page": 1,
"total_pages": 2
}
}
}
Received response:
Request failed with error:
List app categories.
Requires Authentication
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/marketplace/categories" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/marketplace/categories',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/marketplace/categories"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: max-age=86400, public
content-type: application/json
x-ratelimit-limit: 256
x-ratelimit-remaining: 254
strict-transport-security: max-age=31536000; includeSubdomains
permissions-policy: autoplay=(*), camera=(*), encrypted-media=(self), fullscreen=(*), geolocation=(self), gyroscope=(self), magnetometer=(), microphone=(self "http://localhost:3000"), midi=(), payment=(self), sync-xhr=(self), usb=()
{
"error": null,
"payload": [
{
"name": "Data and Analytics",
"slug": "data-and-analytics",
"description": "Apps that help collect, analyze, and visualize data to drive informed decisions."
},
{
"name": "Communication and Support",
"slug": "communication-and-support",
"description": "Tools designed to enhance collaboration, messaging, and customer support."
},
{
"name": "Engagement & Gamification",
"slug": "engagement-gamification",
"description": "Apps that boost user participation through interactive and rewarding experiences."
},
{
"name": "Marketing and Media",
"slug": "marketing-and-media",
"description": "Solutions for content creation, advertising, social media, and brand promotion."
},
{
"name": "Time Management",
"slug": "time-management",
"description": "Apps that help users schedule, plan, and optimize their time effectively."
},
{
"name": "Learning Tools",
"slug": "learning-tools",
"description": "Educational resources and tools that support teaching, training, and skill development."
},
{
"name": "Productivity",
"slug": "productivity",
"description": "Apps that streamline workflows, automate tasks, and improve efficiency."
},
{
"name": "Feedback & Surveys",
"slug": "feedback-surveys",
"description": "Tools for gathering insights, conducting surveys, and improving user experience through feedback."
}
]
}
Received response:
Request failed with error:
Show a single public marketplace app.
Requires Authentication
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/marketplace/apps/69cb046e6bc2c@.." \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/marketplace/apps/69cb046e6bc2c@..',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/marketplace/apps/69cb046e6bc2c@.."
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 256
x-ratelimit-remaining: 253
strict-transport-security: max-age=31536000; includeSubdomains
permissions-policy: autoplay=(*), camera=(*), encrypted-media=(self), fullscreen=(*), geolocation=(self), gyroscope=(self), magnetometer=(), microphone=(self "http://localhost:3000"), midi=(), payment=(self), sync-xhr=(self), usb=()
{
"error": {
"code": 404,
"message": "App Not Found"
},
"payload": null
}
Received response:
Request failed with error:
Members
Search Members
Requires Authentication
Search for existing members in your organization. You can search by first name, last name or email. The search is case-insensitive and supports partial matches.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/members/search" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"John\",
\"include_test_user\": true
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/members/search',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'q' => 'John',
'include_test_user' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/members/search"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "John",
"include_test_user": true
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": [
{
"id": "e7W6kP8wvjd3GRBz",
"object": "member",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"avatar": null,
"email": null,
"is_email_verified": false,
"last_seen": "2024-01-22T12:56:04.000000Z",
"custom_fields": {
"field_7": "Head of Product",
"field_9": [
"Design",
"Marketing"
]
}
},
{...},
{...}
],
"pagination": {
"total": 5,
"count": 5,
"per_page": 10,
"current_page": 1,
"total_pages": 1
}
}
}
Received response:
Request failed with error:
Retrieve a Member
Requires Authentication
Retrieves the details of an existing member in your organization based on the provided unique member ID. Returns a comprehensive information about the member, including their first name, last name, email, and profile image.
The custom_fields object holds the member's organization-level custom field values, keyed by the field's key. It is also returned by the member list and search endpoints; members embedded in other resources do not include it.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/members/e7W6kP8wvjd3GRBz" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/members/e7W6kP8wvjd3GRBz',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/members/e7W6kP8wvjd3GRBz"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"id": "e7W6kP8wvjd3GRBz",
"object": "member",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"avatar": null,
"email": null,
"is_email_verified": false,
"last_seen": "2024-01-22T12:56:04.000000Z",
"custom_fields": {
"field_7": "Head of Product",
"field_9": [
"Design",
"Marketing"
]
}
}
}
Received response:
Request failed with error:
List all Members
Requires Authentication
Retrieves a paginated list of members in your organization. This API endpoint allows you to retrieve detailed information about each member, including their name, email, and other relevant details.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/members?page=2" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/members',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '2',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/members"
);
const params = {
"page": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": [
{
"id": "e7W6kP8wvjd3GRBz",
"object": "member",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"avatar": null,
"email": null,
"is_email_verified": false,
"last_seen": "2024-01-22T12:56:04.000000Z",
"custom_fields": {
"field_7": "Head of Product",
"field_9": [
"Design",
"Marketing"
]
}
},
{...},
{...}
],
"pagination": {
"total": 152,
"count": 10,
"per_page": 10,
"current_page": 1,
"total_pages": 16
}
}
}
Received response:
Request failed with error:
Create a Member
Requires Authentication
Create a member in your organization.
Example request:
curl --request POST \
"https://api.teachfloor.com/v0/members" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"john.doe@example.com\",
\"password\": \"doNotU5e_thiSPassw0rd\",
\"first_name\": \"John\",
\"last_name\": \"Doe\",
\"role\": \"lecturer\",
\"avatar\": \"https:\\/\\/example.com\\/avatar.png\",
\"custom_fields\": {
\"field_7\": \"Head of Product\"
}
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.teachfloor.com/v0/members',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'john.doe@example.com',
'password' => 'doNotU5e_thiSPassw0rd',
'first_name' => 'John',
'last_name' => 'Doe',
'role' => 'lecturer',
'avatar' => 'https://example.com/avatar.png',
'custom_fields' => [
'field_7' => 'Head of Product',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/members"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "john.doe@example.com",
"password": "doNotU5e_thiSPassw0rd",
"first_name": "John",
"last_name": "Doe",
"role": "lecturer",
"avatar": "https:\/\/example.com\/avatar.png",
"custom_fields": {
"field_7": "Head of Product"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"id": "e7W6kP8wvjd3GRBz",
"object": "member",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"avatar": null,
"email": "john.doe@example.com",
"is_email_verified": false,
"last_seen": "2024-01-22T12:56:04.000000Z",
"custom_fields": {
"field_7": "Head of Product"
}
}
}
Received response:
Request failed with error:
List all Member Courses
Requires Authentication
Returns a list of courses the member belongs to.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/members/e7W6kP8wvjd3GRBz/courses" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/members/e7W6kP8wvjd3GRBz/courses',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/members/e7W6kP8wvjd3GRBz/courses"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": [
{
"id": "6jO9XN7mZEVpvxqo",
"object": "course_member",
"joined_at": "2024-01-22T12:56:04.000000Z",
"member": {
"id": "e7W6kP8wvjd3GRBz",
"object": "member",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"avatar": null,
"email": null,
"is_email_verified": false,
"last_seen": "2024-01-22T12:56:04.000000Z"
},
"course": {
"id": "p5v87ERWKR3dkjyD",
"object": "course",
"name": "Ultimate Marketing Course",
"created_at": "2022-02-03T16:06:42.000000Z",
"cover": null,
"availability": "CONTINUOUS",
"visibility": "PRIVATE",
"start_date": null,
"end_date": null,
"currency": "eur",
"price": null,
"url": null,
"public_url": null,
"join_url": null,
"metadata": {}
},
"custom_fields": {
"field_1": [
"Option A",
"Option B"
]
},
"tags": [
"vip"
]
},
{...},
{...}
],
"pagination": {
"total": 15,
"count": 5,
"per_page": 10,
"current_page": 1,
"total_pages": 2
}
}
}
Received response:
Request failed with error:
Update a Member
Requires Authentication
Updates the details of an existing member in your organization based on the provided unique member ID. Any parameters not provided will be left unchanged. Returns the updated member details upon successful update.
Example request:
curl --request POST \
"https://api.teachfloor.com/v0/members/p5v87ERWKR3dkjyD" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"john.doe@example.com\",
\"password\": \"doNotU5e_thiSPassw0rd\",
\"first_name\": \"John\",
\"last_name\": \"Doe\",
\"avatar\": \"https:\\/\\/example.com\\/avatar.png\",
\"custom_fields\": {
\"field_7\": \"Head of Product\"
}
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.teachfloor.com/v0/members/p5v87ERWKR3dkjyD',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'john.doe@example.com',
'password' => 'doNotU5e_thiSPassw0rd',
'first_name' => 'John',
'last_name' => 'Doe',
'avatar' => 'https://example.com/avatar.png',
'custom_fields' => [
'field_7' => 'Head of Product',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/members/p5v87ERWKR3dkjyD"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "john.doe@example.com",
"password": "doNotU5e_thiSPassw0rd",
"first_name": "John",
"last_name": "Doe",
"avatar": "https:\/\/example.com\/avatar.png",
"custom_fields": {
"field_7": "Head of Product"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"id": "e7W6kP8wvjd3GRBz",
"object": "member",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"avatar": null,
"email": "john.doe@example.com",
"is_email_verified": false,
"last_seen": "2024-01-22T12:56:04.000000Z",
"custom_fields": {
"field_7": "Head of Product",
"field_9": [
"Design",
"Marketing"
]
}
}
}
Received response:
Request failed with error:
Modules
Create a module
Requires Authentication
Create a module in the specified course. Returns the created module details upon successful creation.
Example request:
curl --request POST \
"https://api.teachfloor.com/v0/modules" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"First knowledge\",
\"content\": \"# Module Introduction\\\\nWelcome to the **first module**.\",
\"course\": \"qw0aApAGyRKL69rw\",
\"availability\": \"CONTINUOUS\",
\"start_date\": \"2025-02-17T00:00:00Z\",
\"end_date\": \"2025-03-17T00:00:00Z\",
\"position\": 0,
\"metadata\": {
\"category\": \"marketing\"
}
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.teachfloor.com/v0/modules',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'First knowledge',
'content' => '# Module Introduction\\nWelcome to the **first module**.',
'course' => 'qw0aApAGyRKL69rw',
'availability' => 'CONTINUOUS',
'start_date' => '2025-02-17T00:00:00Z',
'end_date' => '2025-03-17T00:00:00Z',
'position' => 0,
'metadata' => [
'category' => 'marketing',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/modules"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "First knowledge",
"content": "# Module Introduction\\nWelcome to the **first module**.",
"course": "qw0aApAGyRKL69rw",
"availability": "CONTINUOUS",
"start_date": "2025-02-17T00:00:00Z",
"end_date": "2025-03-17T00:00:00Z",
"position": 0,
"metadata": {
"category": "marketing"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"id": "e7W6kP8wvjd3GRBz",
"object": "module",
"created_at": "2024-01-22T12:56:04.000000Z",
"name": "Example module",
"type": "LESSON",
"availability": "SCHEDULED",
"start_date": "2025-02-20T00:00:00.000000Z",
"end_date": "2025-02-21T00:00:00.000000Z",
"content": null,
"position": 1,
"course": "p5v87ERWKR3dkjyD",
"metadata": {}
}
}
Received response:
Request failed with error:
Update a module
Requires Authentication
Updates the details of an existing module based on the provided unique module ID. Any parameters not provided will be left unchanged. Returns the updated module details upon successful update.
Example request:
curl --request POST \
"https://api.teachfloor.com/v0/modules/p5v87ERWKR3dkjyD" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"First knowledge\",
\"content\": \"# Module Introduction\\\\nWelcome to the **first module**.\",
\"availability\": \"CONTINUOUS\",
\"start_date\": \"2025-02-17T00:00:00Z\",
\"end_date\": \"2025-03-17T00:00:00Z\",
\"position\": 2,
\"metadata\": {
\"category\": \"marketing\"
}
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.teachfloor.com/v0/modules/p5v87ERWKR3dkjyD',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'First knowledge',
'content' => '# Module Introduction\\nWelcome to the **first module**.',
'availability' => 'CONTINUOUS',
'start_date' => '2025-02-17T00:00:00Z',
'end_date' => '2025-03-17T00:00:00Z',
'position' => 2,
'metadata' => [
'category' => 'marketing',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/modules/p5v87ERWKR3dkjyD"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "First knowledge",
"content": "# Module Introduction\\nWelcome to the **first module**.",
"availability": "CONTINUOUS",
"start_date": "2025-02-17T00:00:00Z",
"end_date": "2025-03-17T00:00:00Z",
"position": 2,
"metadata": {
"category": "marketing"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"id": "e7W6kP8wvjd3GRBz",
"object": "module",
"created_at": "2024-01-22T12:56:04.000000Z",
"name": "Example module",
"type": "LESSON",
"availability": "SCHEDULED",
"start_date": "2025-02-20T00:00:00.000000Z",
"end_date": "2025-02-21T00:00:00.000000Z",
"content": null,
"position": 1,
"course": "p5v87ERWKR3dkjyD",
"metadata": {}
}
}
Received response:
Request failed with error:
Search Modules
Requires Authentication
Search for existing modules in your organization. You can search by module name. The search is case-insensitive and supports partial matches.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/modules/search" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"Introduction\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/modules/search',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'q' => 'Introduction',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/modules/search"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "Introduction"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": [
{
"id": "e7W6kP8wvjd3GRBz",
"object": "module",
"created_at": "2024-01-22T12:56:04.000000Z",
"name": "Introduction to Marketing",
"type": "LESSON",
"availability": "CONTINUOUS",
"start_date": null,
"end_date": null,
"content": null,
"position": 0,
"course": "p5v87ERWKR3dkjyD",
"metadata": {}
},
{...},
{...}
],
"pagination": {
"total": 3,
"count": 3,
"per_page": 10,
"current_page": 1,
"total_pages": 1
}
}
}
Received response:
Request failed with error:
Retrieve a Module
Requires Authentication
Retrieves the details of an existing module in your organization based on the provided unique module ID. Returns comprehensive information about the module, including its name, type, availability, position, and dates.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/modules/e7W6kP8wvjd3GRBz" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/modules/e7W6kP8wvjd3GRBz',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/modules/e7W6kP8wvjd3GRBz"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": {
"id": "e7W6kP8wvjd3GRBz",
"object": "module",
"created_at": "2024-01-22T12:56:04.000000Z",
"name": "Example module",
"type": "LESSON",
"availability": "SCHEDULED",
"start_date": "2025-02-20T00:00:00.000000Z",
"end_date": "2025-02-21T00:00:00.000000Z",
"content": null,
"position": 1,
"course": "p5v87ERWKR3dkjyD",
"metadata": {}
}
}
}
Received response:
Request failed with error:
List Module Elements
Requires Authentication
Returns a list of elements within the specified module.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/modules/e7W6kP8wvjd3GRBz/elements?page=2" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/modules/e7W6kP8wvjd3GRBz/elements',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '2',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/modules/e7W6kP8wvjd3GRBz/elements"
);
const params = {
"page": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": [
{
"id": "QB8nmEJjqdbLA2K5",
"object": "element",
"created_at": "2024-11-26T11:37:16.000000Z",
"name": "Multiple Choice Quiz",
"cover": null,
"type": "QUIZ",
"content": null,
"position": 3,
"course": "B4peAvmZ1L9OY3Xr",
"module": "e7W6kP8wvjd3GRBz",
"metadata": {},
"properties": {}
},
{...},
{...}
],
"pagination": {
"total": 5,
"count": 5,
"per_page": 10,
"current_page": 1,
"total_pages": 1
}
}
}
Received response:
Request failed with error:
List all Modules
Requires Authentication
Returns a list of modules within your organization. The modules are sorted by their creation date, with the most recently created modules appearing first.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/modules?page=2" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/modules',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '2',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/modules"
);
const params = {
"page": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"data": [
{
"id": "e7W6kP8wvjd3GRBz",
"object": "module",
"created_at": "2024-01-22T12:56:04.000000Z",
"name": "Example module",
"type": "LESSON",
"availability": "SCHEDULED",
"start_date": "2025-02-20T00:00:00.000000Z",
"end_date": "2025-02-21T00:00:00.000000Z",
"content": null,
"position": 1,
"course": "p5v87ERWKR3dkjyD",
"metadata": {}
},
{...},
{...}
],
"pagination": {
"total": 15,
"count": 5,
"per_page": 10,
"current_page": 1,
"total_pages": 2
}
}
}
Received response:
Request failed with error:
Delete a Module
Requires Authentication
Deletes an existing module in your organization. Returns an object with a deleted parameter upon successful deletion.
Example request:
curl --request DELETE \
"https://api.teachfloor.com/v0/modules/e7W6kP8wvjd3GRBz" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.teachfloor.com/v0/modules/e7W6kP8wvjd3GRBz',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/modules/e7W6kP8wvjd3GRBz"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"id": "e7W6kP8wvjd3GRBz",
"object": "module",
"deleted": true
}
}
Received response:
Request failed with error:
Organization
Revoke Organization Access
Requires Authentication
Revoke a member access from organization.
Example request:
curl --request POST \
"https://api.teachfloor.com/v0/revoke" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"member\": \"e7W6kP8wvjd3GRBz\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.teachfloor.com/v0/revoke',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'member' => 'e7W6kP8wvjd3GRBz',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/revoke"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"member": "e7W6kP8wvjd3GRBz"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": null
}
Received response:
Request failed with error:
List all Custom Fields
Requires Authentication
Returns the custom fields defined on your organization — the ones whose values are carried on a member. Use the key of each field when writing values through the member endpoints.
Course enrollment fields are a separate set; retrieve them from the course custom fields endpoint.
The full list is returned in a single response; this endpoint is not paginated.
Example request:
curl --request GET \
--get "https://api.teachfloor.com/v0/custom-fields" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.teachfloor.com/v0/custom-fields',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/custom-fields"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": [
{
"key": "field_7",
"object": "custom-field",
"created_at": "2024-07-30T16:05:47.000000Z",
"name": "Job title",
"description": null,
"type": "TEXT",
"required": true
},
{
"key": "field_9",
"object": "custom-field",
"created_at": "2024-07-30T16:05:47.000000Z",
"name": "Interests",
"description": null,
"type": "MULTIPLE_OPTIONS",
"options": [
"Design",
"Marketing",
"Engineering"
],
"required": false
},
{
"key": "field_11",
"object": "custom-field",
"created_at": "2024-07-30T16:05:47.000000Z",
"name": "Years of experience",
"description": null,
"type": "NUMERICAL",
"required": false,
"min": 1,
"max": 10
}
]
}
Received response:
Request failed with error:
Invite Member
Requires Authentication
Invite a member to join the organization or course.
Example request:
curl --request POST \
"https://api.teachfloor.com/v0/invites" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"john.doe@example.com\",
\"full_name\": \"John Doe\",
\"role\": \"customer\",
\"discount_percentage\": 93,
\"course\": \"e7W6kP8wvjd3GRBz\",
\"skip_email\": false
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.teachfloor.com/v0/invites',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'john.doe@example.com',
'full_name' => 'John Doe',
'role' => 'customer',
'discount_percentage' => 93,
'course' => 'e7W6kP8wvjd3GRBz',
'skip_email' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/invites"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "john.doe@example.com",
"full_name": "John Doe",
"role": "customer",
"discount_percentage": 93,
"course": "e7W6kP8wvjd3GRBz",
"skip_email": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"id": "R8dXqkpL1BaJl92y",
"object": "invite",
"token": "PgvInCUzTnNuTYpYWb2c",
"url": null,
"full_name": "John Doe",
"role": "customer",
"discount_percentage": 0,
"course": null,
"skip_email": false
}
}
Received response:
Request failed with error:
Uploads
Upload a file
Requires Authentication
Uploads a file to your organization's storage. Returns the public URL of the uploaded file. The returned URL can be used to set element properties such as video_url, scorm_url, file, or avatar.
Example request:
curl --request POST \
"https://api.teachfloor.com/v0/uploads" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "file=@/tmp/phpRTaOZT" $client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.teachfloor.com/v0/uploads',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'file',
'contents' => fopen('/tmp/phpRTaOZT', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://api.teachfloor.com/v0/uploads"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{
"error": null,
"payload": {
"url": "https://cdn.teachfloor.com/public/123/my-document-1712345678.pdf",
"name": "my-document.pdf",
"mime_type": "application/pdf",
"size": 204800
}
}
Received response:
Request failed with error:
Webhooks
Teachfloor uses webhooks to notify your application when an event happens in your account. Webhooks are particularly useful for asynchronous events like when a new member joins a course, a member has completed an element, or when a course is updated.
You can start receiving event notifications by adding your own webhook endpoint in Developers > Webhooks and clicking on Add Endpoint.
Webhook Retries
Teachfloor webhooks have built-in retry methods for 3xx, 4xx, or 5xx response status codes. If Teachfloor doesn’t quickly receive a 2xx response status code for an event, we will retry calling the webhook after 10 seconds. If that second attempt fails, we will attempt to call the webhook a final time after 100 seconds.
Webhook Signature
Signature verification example:
/**
* Generate the signature using the signing
* secret and the webhook content
*/
$generatedSignature = hash_hmac('sha256', $request->getContent(), $webhookSigningSecret);
/**
* Compare the generated signature with the received
* Teachfloor-Signature header to determine if the
* webhook event is legit
*/
if ($generatedSignature !== $headerSignature) {
/**
* Verification failed
*/
return false;
}
/**
* Legit event, use the webhook content...
*/
Teachfloor will sign the webhook events it sends to your endpoints by including a signature in each event’s Teachfloor-Signature header. This allows you to verify that the events were sent by Teachfloor, not by a third party.
To verify the webhook event signatures, you need to retrieve your endpoint’s secret from your Webhook Endpoints settings. Select an endpoint that you want to obtain the secret for, then click the Reveal Signing Secret button.
Signatures are generated using a hash-based message authentication code (HMAC) with SHA-256. Use the endpoint’s signing secret as the key, convert the event payload to json format and use it as the message in your HMAC-SHA256 function. Compare the generated signature with the received Teachfloor-Signature header to determine if the webhook event is legit.