Developers
Website API
Build your own website, mobile app or integration on top of an organisation's VLearned content: programmes, courses, instructors, events, news, testimonials and pages. You can also send contact-form enquiries.
Overview
Every endpoint is scoped to one organisation by its slug, the first part of its website address. For acme.vlearned.com the slug is acme.
| Base URL | https://vlearned.com/apis/v1 |
|---|---|
| Authentication | None. These endpoints only return content the organisation has published publicly. |
| Format | JSON responses. Send Accept: application/json. Dates use ISO 8601. |
| CORS | Allowed from any origin, so you can call the API directly from browser JavaScript. |
| Availability | Returns 404 if the organisation is inactive or has switched its website off. |
Quick start
Fetch an organisation's latest courses:
curl -H "Accept: application/json" \
"https://vlearned.com/apis/v1/organisations/your-organisation/courses?per_page=6"
The same request from a web page:
const res = await fetch('https://vlearned.com/apis/v1/organisations/your-organisation/courses?per_page=6', {
headers: { Accept: 'application/json' },
});
const { data, meta } = await res.json();
data.forEach((course) => console.log(course.title, course.url));
Responses and errors
Single records are wrapped in data. Lists that support paging also include meta:
{
"data": [ { "id": 12, "slug": "intro-to-data", "title": "Intro to Data", "...": "..." } ],
"meta": { "current_page": 1, "last_page": 3, "per_page": 12, "total": 31, "organisation": "your-organisation" }
}
| Status | Meaning |
|---|---|
200 | Success. |
201 | Enquiry received. |
404 | Organisation, website or record not found, or not public. |
422 | Validation failed. The body lists errors per field under errors. |
429 | Too many requests. Wait and retry; see Retry-After. |
Rate limits
Read endpoints allow 120 requests per minute per IP address. Enquiry submissions allow 5 per minute. The X-RateLimit-Limit and X-RateLimit-Remaining headers show your current allowance. Cache responses on your side where you can.
Organisation
Organisation profile: name, logo, colours, tagline, about text, contact details, headline stats and website address.
Website settings: theme, announcement bar, hero, homepage section order, call to action, menus and social links.
Learning catalogue
Published public programmes, featured first.
| Query | Description |
|---|---|
q | Search by name or summary |
per_page | 1 to 50, default 12 |
page | Page number |
One programme by slug or ID, including its description, outcomes, requirements, courses and admission settings.
Published public courses, newest first.
| Query | Description |
|---|---|
q | Search by title or summary |
per_page | 1 to 50, default 12 |
page | Page number |
One course by slug or ID, including objectives, the curriculum (sections and lesson titles) and whether learners enrol or apply.
Instructors with a public profile: name, bio, photo, subjects, languages and rating.
Website content
Published events.
| Query | Description |
|---|---|
when | upcoming (default), past or all |
per_page | 1 to 50, default 12 |
page | Page number |
One event with its full description.
Published news articles, newest first.
| Query | Description |
|---|---|
per_page | 1 to 50, default 12 |
page | Page number |
One article with its full content.
Published testimonials in display order.
Published custom pages (slug, title, address).
One custom page with content and SEO fields.
Enquiries
Send a contact-form message to the organisation. It appears in the admin under Website → Enquiries. Returns 404 if the organisation has switched its contact form off.
| Field | Description |
|---|---|
name | Required, up to 120 characters |
email | Required, valid email |
phone | Optional |
subject | Optional, up to 160 characters |
message | Required, 10 to 5000 characters |
Examples
Course object
{
"id": 12,
"slug": "intro-to-data",
"title": "Intro to Data",
"short_description": "Learn the basics of data analysis.",
"thumbnail_url": "https://...",
"category": "Data",
"price": "49.00",
"discount_price": null,
"currency": "MYR",
"is_free": false,
"level": "beginner",
"total_lessons": 18,
"instructor": { "id": 7, "name": "Aisha Rahman" },
"published_at": "2026-09-01T08:00:00+00:00",
"url": "https://your-organisation.vlearned.com/catalogue/intro-to-data",
"admission": {
"mode": "apply",
"applications_open": true,
"deadline": "2026-12-15",
"questions": ["What is your highest qualification?"],
"action_url": "https://your-organisation.vlearned.com/apply/course/intro-to-data"
}
}
Enrolment and applications
Every course and programme includes an admission object. When mode is enrol, learners join directly (paid courses go through checkout first). When it is apply, learners submit an application that the organisation reviews. Send learners to action_url: they sign in or create an account on the organisation's website and then enrol, pay or apply there. Enrolment and payment always happen on the organisation's website, never through this API.
Send an enquiry
curl -X POST "https://vlearned.com/apis/v1/organisations/your-organisation/enquiries" \
-H "Accept: application/json" -H "Content-Type: application/json" \
-d '{"name":"Sam Lee","email":"sam@example.com","subject":"January intake","message":"Is there still space in the January intake?"}'
{ "data": { "id": "9d2c...", "received_at": "2026-10-12T09:30:00+00:00" }, "message": "Thank you. Your message has been received." }
Show upcoming events on any website
<ul id="events"></ul>
<script>
fetch('https://vlearned.com/apis/v1/organisations/your-organisation/events?per_page=3')
.then((r) => r.json())
.then(({ data }) => {
document.getElementById('events').innerHTML = data
.map((e) => `<li><a href="${e.url}">${e.title}</a> – ${new Date(e.starts_at).toLocaleDateString()}</li>`)
.join('');
});
</script>
Other APIs
Signed-in features such as enrolments, progress, assessments and administration use the authenticated platform API. Read about tokens, scopes and endpoints in the platform API reference.
Need higher limits, webhooks or help with an integration? Contact us at info@aismartuallearning.com.