Key permissions¶
A key's permissions are set per area, each at one of three levels. A new key holds
none everywhere — it can do nothing until a person gives it something on the
API Keys page.
| Level | Allows |
|---|---|
none |
nothing in this area — every request is refused with 403 |
view |
reading: GET |
edit |
reading and changing: GET, POST, PUT, PATCH, DELETE |
Area (scopes key) |
Shown in the web app as | Controls |
|---|---|---|
courses |
Courses | /api/v1/agent/courses/ |
chapters |
Units (called chapters in the API) | /api/v1/agent/courses/{id}/chapters/ |
lessons |
Lessons (including quizzes and tasks) (also each quiz and task) |
…/chapters/{id}/lessons/ |
org_settings |
Organization settings | /api/v1/agent/org-settings/, record of changes, join code |
pricing |
Course prices | …/courses/{id}/price/, refund policy |
payments |
Payments and plan | /api/v1/agent/payments/, plans, storage purchase links |
media |
Media files | …/courses/{id}/uploads/, images, documents |
storefront |
Storefront and branding | brand picture, address, landing page, hero image |
promotions |
Promotions | coupons and partners |
sales |
Sales and analytics | /api/v1/agent/analytics/… (read) |
cohorts |
Learners, groups and join codes | learners, groups, access codes, roster imports |
gradebook |
Gradebook, marking and rubrics | grades, review, AI marking, rubrics |
certificates |
Certificates | settings, preview, cancel |
discussions |
Discussion boards | settings and checking posts |
Two ready-made sets set many areas at once: Build and sell courses (everything to make, price
and launch a course, with view on sales) and Run courses (edit on every area).
Neither gives a key the power to move money out of your organisation.
GET /api/v1/agent/whoami/ needs no permission and returns the key's current levels.
Permissions are checked on every request. A person can raise, lower or take them
away at any moment and the next request sees the change. An unknown permission, or one that is
not written correctly, is always treated as none.