Account integrations
Account API
Connect your own systems to your AcademyOS account: read people, courses, enrolments, classes, progress and events, and invite and enrol through the same rules as the admin screens.
What the API does
The account API connects a school's or a creator's own systems to their AcademyOS account: a student information system, a CRM, a spreadsheet job or a data warehouse. It reads the account's people, courses, enrolments, classes, progress, recent events and, for creators, orders. With write access it also invites people, enrols learners, ends enrolments and suspends members, through the same rules the admin screens apply.
Base URL: https://content.academyos.app/api/accounts/v1. Requests and responses are JSON, every time is ISO 8601 in UTC, and every id is a public id such as pers_β¦ or lo_β¦. Treat ids as opaque strings: their format may change.
| Method | Path | Key needed | What it does |
|---|---|---|---|
GET |
/account |
Read only | The key's account and the key itself |
GET |
/people |
Read only | List the account's members |
GET |
/people/:id |
Read only | One member |
POST |
/people/:id/deactivate |
Read and write | Suspend a member |
GET |
/people/:person_id/progress |
Read only | A learner's progress in every course they take |
GET |
/people/:person_id/progress/:id |
Read only | A learner's progress in one course |
POST |
/invitations |
Read and write | Invite a person |
GET |
/courses |
Read only | List the account's courses |
GET |
/courses/:id |
Read only | One course |
GET |
/courses/:id/outline |
Read only | A course's sections and lessons |
GET |
/enrollments |
Read only | List enrolments |
GET |
/enrollments/:id |
Read only | One enrolment |
POST |
/enrollments |
Read and write | Enrol a person in a course |
POST |
/enrollments/:id/end |
Read and write | End an enrolment |
GET |
/classes |
Read only | List classes |
GET |
/classes/:id |
Read only | One class and its members |
GET |
/events |
Read only | Recent webhook events |
GET |
/orders |
Read only | List a creator's orders |
GET |
/orders/:id |
Read only | One order |
Authentication
Every request carries an account API key as a bearer token:
GET /api/accounts/v1/account
Authorization: Bearer aos_ak_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX{
"id": "acct_q9KrLEMm32ilNp8XKnOP0xGD",
"object": "account",
"name": "Riverside Language School",
"kind": "school",
"key": { "id": "akey_j5X7G86rWDj15crZa04onqvy", "name": "Student information system", "access_scope": "read_write" }
}- An admin of the account makes keys in Settings β API keys. A key is shown once, when it is made; AcademyOS keeps only a digest of it, so a lost key is revoked and replaced, never recovered.
- The key acts as the account, not as the admin who made it: it keeps working if that person leaves, and the activity log names the key, not a person, for every change it makes.
- An account may hold up to 10 live keys. To rotate one, make a second key, switch your system to it, then revoke the first.
- The key reaches its own account only. No parameter names an account, and an id from another account answers
404, exactly like an id that never existed. - Keep it on a server. Never put it in a browser, a mobile app or a public repository.
Every authentication failure gets the same 401 and the same body: a missing header, another scheme, a malformed, unknown or revoked key, or a closed account. A signed-in browser session and personal API tokens are refused.
Read and write access
A key is read only or read and write. A read-only key that tries a write gets 403 insufficient_scope. Writes are refused with 403 account_inactive while the account's plan is not active; reads keep working so you can always take your data. Writes also need a plan with the account API, Growth and up (403 plan_without_api); reads keep working on any plan, and new keys need Growth.
A key never makes or unmakes an admin: invitations can be for managers, teachers and learners only, and an admin cannot be suspended through the API.
Errors
Every error has the same shape. Branch on code; message is for people and follows the Accept-Language of the request; details names the parameter or reason when there is one.
{ "error": { "code": "not_found", "message": "Nothing with that id exists in this account.", "details": {} } }| HTTP | code | What it means |
|---|---|---|
| 401 | unauthorized |
The API key is missing, malformed, unknown or revoked. |
| 403 | insufficient_scope |
This key is read only. Make a key with write access to change anything. |
| 403 | account_inactive |
This account's plan is not active, so the API can read but not change anything. |
| 403 | plan_without_api |
This account's plan doesn't include the account API. It comes with Growth and above. |
| 403 | school_only |
Only a school account can do this. |
| 403 | creator_only |
Only an account that sells courses has orders. |
| 404 | not_found |
Nothing with that id exists in this account. |
| 400 | invalid_request |
A parameter is missing or has a value the API can't use. |
| 400 | invalid_cursor |
The cursor was not issued for this list. |
| 400 | invalid_idempotency_key |
The Idempotency-Key header must be between 1 and 255 characters. |
| 409 | already_member |
This person is already a member of the school. |
| 409 | already_invited |
This person already has an open invitation. |
| 409 | idempotency_key_in_use |
A request with this Idempotency-Key is still running. Try again shortly. |
| 422 | idempotency_key_reused |
This Idempotency-Key was already used for a different request. |
| 422 | validation_failed |
The record could not be saved. |
| 422 | student_limit_reached |
The school has reached its plan's limit of active learners. |
| 422 | staff_limit_reached |
The school has reached its plan's limit of staff accounts. |
| 422 | send_email_required |
This email is not a member yet, so enrolling it sends an invitation. Send send_email: true to allow that. |
| 422 | person_inactive |
This member is suspended or has no login. Reactivate them first. |
| 422 | enrollment_locked |
This enrolment was paid for on the marketplace. Only a refund ends it. |
| 422 | enrollment_failed |
The enrolment could not be saved. |
| 422 | cannot_deactivate |
This member can't be suspended. |
| 429 | email_quota_exceeded |
This account has sent as many invitation emails as it may in the last hour. Try again later. |
| 429 | rate_limited |
Too many requests this minute. |
Pagination
Lists return the newest records first, 25 at a time by default and at most 100 (limit). When has_more is true, send next_cursor back as cursor for the next page:
GET /api/accounts/v1/people?role=learner&limit=2{
"object": "list",
"data": [
{
"id": "pers_PpOk1oX3wrI95k80kXzd9nqA",
"object": "person",
"name": "Ana Souza",
"email": "ana@example.com",
"roles": ["learner"],
"status": "active",
"joined_at": "2026-09-01T12:00:00Z",
"created_at": "2026-09-01T12:00:00Z"
}
],
"has_more": true,
"next_cursor": "S3VwZXItc2VjcmV0LWN1cnNvcg..."
}A cursor is opaque and belongs to the list that gave it; one from another list, or one you changed, answers 400 invalid_cursor. Records added while you page appear on the first page next time, so a page never repeats or skips a record.
Idempotency
Send an Idempotency-Key header (1 to 255 characters) with every write, such as your own record id. A network error then never enrols or invites twice:
- The same key with the same request within 24 hours returns the first answer again, with the header
Idempotent-Replayed: true, and changes nothing. - The same key with a different method, path or body answers
422 idempotency_key_reused. - While the first request with a key is still running, a second one answers
409 idempotency_key_in_use; retry it. - Only a successful answer is kept. A refused request frees its key, so you can fix it and retry with the same one.
- Keys are shared by all of the account's API keys and are free again after 24 hours.
People
GET /people lists the account's members. Filter by role (admin, manager, teacher or learner), status (active, suspended or invited) and email (exact, any case). roles holds one staff role at most, plus learner when the person also learns here. Removed members are not listed.
POST /people/:id/deactivate suspends a member, as Suspend on the People page does: they lose the school until an admin reactivates them, and keep their roles, classes and history. Suspending a suspended member answers them again. An admin (the owner included) and a learner who paid for a course are refused with 422 cannot_deactivate, and details.reason says why.
Invitations
POST /invitations invites a person by email, with a role (manager, teacher or learner) and an optional name. It runs the People page's own checks: a member answers 409 already_member, an open invitation 409 already_invited, a learner over the plan's limit 422 student_limit_reached, and a manager or teacher over the plan's staff limit 422 staff_limit_reached (Solo allows two staff, open staff invitations included).
A learner's invitation email goes out only when you send "send_email": true. Without it the invitation waits, and an admin sends it from People β Invitations. A manager's or teacher's invitation always waits for an admin, whatever you send, so a key never hands out a staff login by itself; email_sent says which happened. Invitation emails are capped per account and hour; over the cap the API answers 429 email_quota_exceeded.
Courses
GET /courses lists the account's courses, drafts included; filter with status (draft or published). description is plain text. GET /courses/:id/outline returns the course's sections and lessons in the order learners see them, each with its type, status, parent_id and depth. Lesson content stays in AcademyOS.
Enrolments
GET /enrollments lists enrolments; filter by course_id, person_id and status (active, pending_invite or withdrawn).
POST /enrollments enrols one person in one course, as Enrol on the course page does. Send course_id and either person_id or email, and optionally class_id for a class that follows the course:
POST /api/accounts/v1/enrollments
Authorization: Bearer aos_ak_β¦
Idempotency-Key: sis-enrolment-2026-0042
Content-Type: application/json
{
"course_id": "lo_g71kno9gVPt0pN5dQ2JzBbG6",
"person_id": "pers_PpOk1oX3wrI95k80kXzd9nqA"
}{
"id": "enr_V6vNyJ7EEMIg8BoPr7og8X3x",
"object": "enrollment",
"status": "active",
"source": "manual",
"course_id": "lo_g71kno9gVPt0pN5dQ2JzBbG6",
"person_id": "pers_PpOk1oX3wrI95k80kXzd9nqA",
"email": "ana@example.com",
"class_id": null,
"enrolled_at": "2026-11-26T12:19:54Z",
"ended_at": null,
"expires_at": null,
"created_at": "2026-11-26T12:19:54Z"
}- A new enrolment answers
201; one that already existed answers200with it, so a repeat is harmless. - A member who is not a learner yet becomes one. At the plan's limit of active learners the API answers
422 student_limit_reachedand creates nothing. - An
emailthat is not a member yet gets apending_inviteenrolment and an invitation email, so you must send"send_email": true; without it the answer is422 send_email_requiredand nothing is created. - A suspended member answers
422 person_inactive. - An email with an open manager or teacher invitation answers
409 already_invited(reasonstaff_invitation): enrol them once they accept.
POST /enrollments/:id/end ends an enrolment, as Remove on the course page does; the learner keeps their history. Ending an ended enrolment answers it again. A course bought on the marketplace is ended only by a refund: 422 enrollment_locked.
Creator accounts read enrolments but do not write them: their learners come from orders and access grants.
Classes and progress
GET /classes lists the active classes with their course_ids and teacher_ids (add include_archived=true for archived ones). GET /classes/:id also lists its members: the learners with an active enrolment through the class.
GET /people/:person_id/progress returns the learner's progress in every course they are enrolled in, and GET /people/:person_id/progress/:course_id one course. It counts published lessons, as the learner app does:
{
"object": "progress",
"person_id": "pers_PpOk1oX3wrI95k80kXzd9nqA",
"course_id": "lo_g71kno9gVPt0pN5dQ2JzBbG6",
"status": "in_progress",
"lessons_total": 12,
"lessons_completed": 5,
"lessons_in_progress": 1,
"percent_complete": 41
}A course the learner is not enrolled in answers 404.
Events
GET /events lists the recent webhook events of the account, once each, newest first, with the same data the webhook sent. Filter by type (enrollment.created, enrollment.ended, course.completed, order.paid, order.refunded). Use it to reconcile after an outage of your endpoint. Events are recorded only while an endpoint of the account listens to them, and are kept for 30 days.
Orders
Accounts that sell only. GET /orders lists the orders of a creator account, or of a school that sells its own courses, (filter by status) and GET /orders/:id returns one: what the buyer paid and in which currency, the refunded amount, the discount code, the product and the buyer's name and email. Any other school's key gets 403 creator_only.
Rate limits
Going over a budget answers 429 rate_limited; the windows are one minute. Back off and retry.
| Scope | Budget |
|---|---|
| Every request, per API key | 300 a minute |
| Writes, per API key | 60 a minute |
| Every request, per IP address | 600 a minute |
| Invitation emails, per account | 200 an hour |
What the API shows and hides
- Exposed: members' names, emails, roles and status; courses and their outlines; enrolments; classes and their members; learners' progress; the account's own webhook events; and, for creators, orders with the buyer's name and email.
- Never exposed: passwords and sign-in methods, payment methods, payout destinations, tax ids and documents, AcademyOS fees, answers and recordings, and other accounts' data.
- Whoever holds a key reads the people of the account. The account remains responsible for the systems it connects, as the privacy policy says; revoke a key the moment it may have leaked.
Integration checklist
- Make a read-only key first, keep it in your secret manager, and call
GET /accountto check it. - Page through lists with
cursor, not by counting. - Make a separate read-and-write key for the system that writes, and send an
Idempotency-Keywith every write. - Send
"send_email": trueonly when you mean to email the person. - Handle
429with a back-off, and branch oncode, never onmessage. - Rotate keys by making a second one before revoking the first.
Was this page useful?
Last updated November 26, 2026