Automating the academy: onboarding, offboarding, certificates to HR
This guide walks through three flows with real calls of the automation API v1: onboarding a new person, offboarding someone who leaves, and sending certificates to the HR system. Every step is one HTTP call, so the same flow works in n8n, Zapier, Make, Power Automate or a script. Sign-in, scopes, retries and the v1 promise are in api-v1.md; every route with an example is in the reference at https://<api>/v1/integration-api/docs.
In the calls below, $API is your academy’s API address (for example https://api.academy.example.com) and $TOKEN a machine token.
Before you start
Section titled “Before you start”-
Machine client. Under Administration → Integrations → Machine access, create one client per flow, with only the scopes it needs:
Flow Scopes Onboarding people:readpeople:writeteams:readteams:writerequirements:readrequirements:writeclasses:writeenrollments:writeprograms:readcourses:readcourses:writecourse-runs:readcourse-runs:writelive:writementoring:writewebhooks:readwebhooks:writeOffboarding people:readpeople:writeteams:writeclasses:writelive:readlive:writecertificates:readCertificates to HR people:readcertificates:readtraining:readwebhooks:readwebhooks:write -
Token. Swap the client id and secret for a token (it lasts 15 minutes):
Terminal window curl -s -X POST "$API/v1/integration-oauth/token" \-u "$CLIENT_ID:$CLIENT_SECRET" \-d grant_type=client_credentials{ "access_token": "acm_3q2…", "token_type": "Bearer", "expires_in": 900, "scope": "people:read people:write …" }Send
Authorization: Bearer acm_…with every call below. -
Idempotency-Key. Give every write a key that is the same when your tool retries the step, for example the run id of the step plus the person’s email. The academy then does it once.
1. Onboarding
Section titled “1. Onboarding”A new person starts on 3 November in the warehouse. The HR system knows them as E-1042. They should get their team’s required trainings, join the November starting class, get the onboarding programme, and a short course about their department, written by the course factory if there is none yet.
1.1 Create the person and invite them
Section titled “1.1 Create the person and invite them”PUT /v1/integration-api/people finds the person by email, or creates them as a learner. Running it twice never creates a second person.
curl -s -X PUT "$API/v1/integration-api/people" \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -H "Idempotency-Key: onboarding-ada@example.com-person" \ -d '{ "email": "ada@example.com", "name": "Ada Lovelace", "jobTitle": "Warehouse clerk", "department": "Warehouse", "employeeNumber": "E-1042", "entryDate": "2026-11-03", "managerEmail": "grace@example.com", "invite": true }'{ "person": { "id": "6f1c2a10-…-0000000000a1", "name": "Ada Lovelace", "email": "ada@example.com", "status": "active", "department": "Warehouse", "managerId": "6f1c2a10-…-0000000000a2", "employeeNumber": "E-1042", "joinedAt": null }, "created": true, "invitation": "sent"}Keep person.id: the next steps use it. If the invitation got lost, send it again with POST /v1/integration-api/people/{id}/invitation. When the person signs in for the first time, the event invitation.accepted arrives (see 1.8).
Fields your HR connector leads (for example the department) are refused when they differ:
409 field_owned_by_hr. Leave them out when the HR system already syncs them.
1.2 Add them to their team: the required trainings follow
Section titled “1.2 Add them to their team: the required trainings follow”Teams carry required trainings. Find the team once (GET /v1/integration-api/teams) and add the person:
curl -s -X PUT "$API/v1/integration-api/teams/$TEAM_ID/members/$PERSON_ID" \ -H "Authorization: Bearer $TOKEN" -H "Idempotency-Key: onboarding-ada@example.com-team"{ "teamId": "6f1c2a10-…-0000000000d1", "personId": "6f1c2a10-…-0000000000a1", "changed": true }The person gets a round of every required training of the team at once, with its due date (event training.assigned). Only teams kept by hand can be changed this way; a team synced from Entra or Google, or one that grants a role, is changed in the academy.
1.3 Give the team its required trainings (once)
Section titled “1.3 Give the team its required trainings (once)”If the team doesn’t have its trainings yet, add them. Here: fire safety, mandatory, within 14 days of joining, again every 12 months.
curl -s -X POST "$API/v1/integration-api/requirements" \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -H "Idempotency-Key: warehouse-fire-safety" \ -d '{ "teamId": "'$TEAM_ID'", "courseId": "'$FIRE_SAFETY_COURSE_ID'", "kind": "mandatory", "dueDays": 14, "recurMonths": 12 }'{ "id": "6f1c2a10-…-0000000000f1", "teamId": "6f1c2a10-…-0000000000d1", "courseId": "6f1c2a10-…-0000000000c1", "kind": "mandatory", "dueDays": 14, "recurMonths": 12, "renewDays": 30, "createdAt": "2026-11-03T08:00:00.000Z" }Everyone in the team gets rounds, and everyone who joins later too. A second call for the same course answers 409 requirement_exists. GET /v1/integration-api/requirements?teamId=… shows what the team has.
1.4 Put them in the starting class
Section titled “1.4 Put them in the starting class”curl -s -X PUT "$API/v1/integration-api/classes/$CLASS_ID/members/$PERSON_ID" \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -H "Idempotency-Key: onboarding-ada@example.com-class" \ -d '{ "role": "learner" }'{ "classId": "6f1c2a10-…-0000000000e1", "personId": "6f1c2a10-…-0000000000a1", "role": "learner", "changed": true }No class for November yet? POST /v1/integration-api/classes with {"name": "Start November"} makes one (409 class_exists if the name is taken). A class’s teacher must be a trainer.
1.5 Assign the onboarding programme
Section titled “1.5 Assign the onboarding programme”A programme is assigned like a course. GET /v1/integration-api/programs lists them with their courses.
curl -s -X POST "$API/v1/integration-api/enrollments" \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -H "Idempotency-Key: onboarding-ada@example.com-programme" \ -d '{ "personId": "'$PERSON_ID'", "courseId": "'$PROGRAM_ID'", "dueAt": "2026-11-30T23:59:00.000Z" }'{ "personId": "6f1c2a10-…-0000000000a1", "courseId": "6f1c2a10-…-0000000000c2", "status": "active", "dueAt": "2026-11-30T23:59:00.000Z", "created": true }Events: enrollment.created and program.assigned.
1.6 Have a department course written (if there is none)
Section titled “1.6 Have a department course written (if there is none)”First look for it by title:
curl -s "$API/v1/integration-api/courses?title=Einstieg%20Lager" -H "Authorization: Bearer $TOKEN"{ "items": [], "next": null }None yet: the course factory writes one. It runs for a trainer of the organisation: it reads the organisation’s knowledge as they may, and they find it in the course studio. Its budget is at most the organisation’s caps per course (set under Administration → Courses on request; 3 € and 6 € until set).
curl -s -X POST "$API/v1/integration-api/course-runs" \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -H "Idempotency-Key: course-einstieg-lager" \ -d '{ "trainerEmail": "trainer@example.com", "title": "Einstieg Lager", "language": "de", "audience": "new warehouse staff", "size": "short", "notes": "Wer wir sind, Ansprechpartner, Gabelstapler, Regale, Erste Hilfe" }'{ "id": "6f1c2a10-…-000000000101", "title": "Einstieg Lager", "language": "de", "trainerId": "6f1c2a10-…-0000000000a3", "status": "queued", "stage": null, "waitReason": null, "costEur": 0, "costCapEur": 3, "hardCapEur": null, "courseId": null, "courseStatus": null, "error": null, "createdAt": "2026-11-03T08:00:00.000Z", "startedAt": null, "finishedAt": null }Asking for more than the organisation’s caps answers 409 above_budget. The run takes a while (minutes to an hour). Wait for its events instead of asking again and again (1.8):
| Event | What to do |
|---|---|
course_run.started |
nothing |
course_run.completed |
publish and assign (1.7) |
course_run.failed / course_run.cancelled |
tell someone; GET /v1/integration-api/course-runs/{id} shows error |
Without events, GET /v1/integration-api/course-runs/{id} every 10 minutes is fine.
1.7 Publish the course and assign it
Section titled “1.7 Publish the course and assign it”The run wrote a draft. Publishing it makes it visible to learners:
curl -s -X POST "$API/v1/integration-api/course-runs/$RUN_ID/publish" \ -H "Authorization: Bearer $TOKEN" -H "Idempotency-Key: course-einstieg-lager-publish"{ "id": "6f1c2a10-…-000000000101", "status": "done", "courseId": "6f1c2a10-…-0000000000c1", "courseStatus": "published", "costEur": 2.41, … }The course was written by the factory from the organisation’s knowledge and checked sources, but no person has read it yet. If a trainer should look first, leave out this step and let them publish it in the course studio;
course.publishedtells you when.
Assign it to the whole starting class, with a due date:
curl -s -X POST "$API/v1/integration-api/classes/$CLASS_ID/courses" \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -H "Idempotency-Key: class-november-einstieg-lager" \ -d '{ "courseId": "'$COURSE_ID'", "dueAt": "2026-12-15T00:00:00.000Z" }'{ "classId": "6f1c2a10-…-0000000000e1", "courseId": "6f1c2a10-…-0000000000c1", "dueAt": "2026-12-15T00:00:00.000Z", "created": true }…or to one person with POST /v1/integration-api/enrollments, as in 1.5.
1.8 Hear what happens: subscribe to events
Section titled “1.8 Hear what happens: subscribe to events”Subscribe your flow’s address once (a REST hook). n8n’s Academy Trigger does this by itself; in Zapier and Make, call it once (see below).
curl -s -X POST "$API/v1/integration-api/subscriptions" \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d '{ "url": "https://hooks.example.com/academy", "events": ["invitation.accepted", "course_run.completed", "course_run.failed"] }'{ "id": "6f1c2a10-…-000000000301", "secret": "whsec_AbCdEfGh…", "webhook": { "id": "6f1c2a10-…-000000000301", "events": ["invitation.accepted", "…"], "active": true, … } }Store secret: every delivery is signed with it (webhooks.md). An event looks like this:
{ "specversion": "1.0", "id": "5d1c…", "type": "course_run.completed", "source": "academy", "subject": "course-runs/6f1c2a10-…-000000000101", "time": "2026-11-03T09:12:00.000Z", "datacontenttype": "application/json", "organisationid": "6f1c2a10-…-000000000001", "data": { "runId": "6f1c2a10-…-000000000101", "title": "Einstieg Lager", "status": "done", "stage": null, "waitReason": null, "courseId": "6f1c2a10-…-0000000000c1", "costEur": 2.41, "costCapEur": 3, "hardCapEur": null }}DELETE /v1/integration-api/subscriptions/{id} ends it.
1.9 Optional: welcome session and mentor
Section titled “1.9 Optional: welcome session and mentor”# Register for the welcome session (free sessions open to the organisation)curl -s -X PUT "$API/v1/integration-api/live-sessions/$SESSION_ID/attendees/$PERSON_ID" -H "Authorization: Bearer $TOKEN"# Pair with a mentor (the mentor must have the mentor role)curl -s -X PUT "$API/v1/integration-api/mentoring/pairs" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d '{ "mentorId": "'$MENTOR_ID'", "menteeId": "'$PERSON_ID'" }'The person gets the session’s confirmation email with a calendar entry; the mentor and mentee get their shared workspace.
2. Offboarding
Section titled “2. Offboarding”Ada leaves on 31 January. The HR system sends her employee number.
2.1 Find her
Section titled “2.1 Find her”curl -s "$API/v1/integration-api/people?employeeNumber=E-1042" -H "Authorization: Bearer $TOKEN"{ "items": [ { "id": "6f1c2a10-…-0000000000a1", "name": "Ada Lovelace", "email": "ada@example.com", "status": "active", "employeeNumber": "E-1042", … } ], "next": null }2.2 Keep her certificates for the personnel file
Section titled “2.2 Keep her certificates for the personnel file”curl -s "$API/v1/integration-api/certificates?limit=100" -H "Authorization: Bearer $TOKEN"Keep the entries with her personId (page with after = next). Certificates stay valid and verifiable after she leaves.
2.3 Take her out of teams, classes and sessions
Section titled “2.3 Take her out of teams, classes and sessions”curl -s -X DELETE "$API/v1/integration-api/teams/$TEAM_ID/members/$PERSON_ID" -H "Authorization: Bearer $TOKEN"curl -s -X DELETE "$API/v1/integration-api/classes/$CLASS_ID/members/$PERSON_ID" -H "Authorization: Bearer $TOKEN"curl -s -X DELETE "$API/v1/integration-api/live-sessions/$SESSION_ID/attendees/$PERSON_ID" -H "Authorization: Bearer $TOKEN"Each answers "changed": true, or false when she wasn’t in it. Her open training rounds of the team drop (event training.dropped); completed ones stay in the records.
2.4 Deactivate her
Section titled “2.4 Deactivate her”curl -s -X POST "$API/v1/integration-api/people/$PERSON_ID/deactivate" \ -H "Authorization: Bearer $TOKEN" -H "Idempotency-Key: offboarding-E-1042"{ "person": { "id": "6f1c2a10-…-0000000000a1", "status": "inactive", … }, "changed": true }Her sessions end at once; she can’t sign in; open trainings drop (event person.deactivated). Her history stays. POST …/reactivate brings her back, for example if the date moves.
- Administrators are deactivated in the academy, never by an automation (
409 person_is_admin). - Erasing a person (GDPR) is done in the academy, under the organisation’s retention rules; the API doesn’t erase.
- If your HR connector or SCIM already deactivates people, you don’t need this step.
3. Certificates to the HR system
Section titled “3. Certificates to the HR system”When someone gets a certificate, the HR system should file it under their employee number.
3.1 Subscribe to the certificate events
Section titled “3.1 Subscribe to the certificate events”curl -s -X POST "$API/v1/integration-api/subscriptions" \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d '{ "url": "https://hooks.example.com/certificates", "events": ["certificate.issued", "certificate.revoked", "certificate.expiring"] }'3.2 On each event: who is it?
Section titled “3.2 On each event: who is it?”The event carries ids and dates:
{ "type": "certificate.issued", "data": { "certificateId": "6f1c2a10-…-0000000000f3", "personId": "6f1c2a10-…-0000000000a1", "courseId": "6f1c2a10-…-0000000000c1", "recordId": "6f1c2a10-…-0000000000f2", "teamId": "6f1c2a10-…-0000000000d1", "issuedAt": "2026-11-20T10:31:00.000Z", "validUntil": "2027-11-20", "revokedAt": null } }Check the signature, then read the person for their employee number:
curl -s "$API/v1/integration-api/people/$PERSON_ID" -H "Authorization: Bearer $TOKEN"{ "id": "6f1c2a10-…-0000000000a1", "name": "Ada Lovelace", "email": "ada@example.com", "status": "active", "employeeNumber": "E-1042", … }and the course’s title from GET /v1/integration-api/courses (cache it; titles rarely change).
3.3 Write it to the HR system
Section titled “3.3 Write it to the HR system”With employeeNumber, the course title, issuedAt and validUntil, create the training entry in the HR system through its API (a training record, a custom attribute or a document, whatever your HR system keeps them as). On certificate.revoked mark it withdrawn; on certificate.expiring (30 days before) the HR system can remind the manager. Deduplicate on the event’s id: a retried delivery keeps it.
If the academy’s own HR connector already writes training evidence back to your HR system, you don’t need this flow.
Zapier, Make and Power Automate
Section titled “Zapier, Make and Power Automate”There are no Zapier, Make or Power Automate apps for the academy yet (planned; see the end). Their HTTP and webhook steps do everything above.
Zapier
Section titled “Zapier”- Token: Webhooks by Zapier → POST to
$API/v1/integration-oauth/token, Payload Typeform, datagrant_type=client_credentials, Basic Authclient id|secret. Mapaccess_tokeninto the next steps. - Calls: Webhooks by Zapier → Custom Request with method, URL, the JSON body and the headers
Authorization: Bearer {{access_token}},Content-Type: application/jsonandIdempotency-Key: {{zap_meta_human_now}}-…(any value that stays the same when Zapier replays the step, e.g. the trigger’s record id). - Find or create:
PUT /peopleandPUT /coursesfind or create in one step;createdtells you which. - Trigger: a Zap with Webhooks by Zapier → Catch Hook; subscribe its URL once with
POST /v1/integration-api/subscriptions(a one-off Zap or curl), or add it under Administration → Integrations → Webhooks. To check the signature, use Catch Raw Hook instead, which hands over the unchanged body and the headers, and verify them in a Code by Zapier step (JavaScript in webhooks.md).
- Token: module HTTP → Make a request,
POSTto the token URL, body type application/x-www-form-urlencoded withgrant_type=client_credentials, headerAuthorization: Basic <base64(id:secret)>, Parse response on. - Calls: more HTTP → Make a request modules with
Authorization: Bearer {{access_token}}and theIdempotency-Keyheader; JSON body as rawapplication/json. - Trigger: Webhooks → Custom webhook; subscribe its address once with
POST /v1/integration-api/subscriptions. To check the signature, let the webhook pass the unchanged body on (JSON pass-through) together with the headers.
Power Automate
Section titled “Power Automate”- Token: action HTTP,
POSTto the token URL, headerContent-Type: application/x-www-form-urlencoded, bodygrant_type=client_credentials, authentication Basic with client id and secret; then Parse JSON. - Calls: HTTP actions with
Authorization: Bearer @{body('Parse_JSON')?['access_token']}andIdempotency-Key: @{workflow()?['run']?['name']}-<step>. - Trigger: When an HTTP request is received (premium); subscribe its URL once with
POST /v1/integration-api/subscriptions.
Tokens last 15 minutes: fetch one at the start of each run, not once for all runs.
Not yet (future features)
Section titled “Not yet (future features)”- Own apps for Zapier (Platform CLI, client credentials with automatic token exchange, REST-hook triggers, actions and searches; it needs Zapier’s review of the API), Make and Power Automate. Until then, HTTP and webhooks as above.
- Required trainings attach to teams. A training for one person alone is given as a course assignment with a due date (
POST /enrollments), or through a small team of their own. - Approving a course run’s budget stays with the organisation’s administrators in the academy, on purpose.