AttendSure API
v1REST + webhooksConnect AttendSure to a student management system, an LMS, an HR platform, Zapier or Make: read sessions, attendance, certificates and live classes; issue certificates, keep class lists in step and book monitoring; and be told by webhook when something happens. JSON over HTTPS, authenticated with an API key.
- Base URL
https://www.attendsure.net/api/v1- Authentication
Authorization: Bearer as_live_…- Format
- JSON, UTF-8. Times in ISO 8601 (UTC), durations in milliseconds.
- Rate limit
- 120 requests a minute per key.
- OpenAPI and Postman
- openapi.json · Postman collection
Overview
The API exposes the same records the AttendSure report screen and Excel export show, computed by the same code, so an integration and a person reading the report never see different numbers. A key sees only its own organisation.
Every key reads. A key can also be given permission to issue certificates, change class lists and saved classes, or book monitoring; those requests act as the person who created the key and go through the same plan, Hours and safety checks as the app. Webhooks push events to your system as they happen. The AttendSure API is an add-on, included on Enterprise plans and available on other plans by arrangement.
Authentication
An owner or admin creates a key in the AttendSure app under Settings › Integrations › AttendSure API. The key is shown once; AttendSure keeps only a fingerprint, so a lost key is revoked there and replaced. Keys start with as_live_.
Send the key in the Authorization header of every request:
curl https://www.attendsure.net/api/v1/organisation \
-H "Authorization: Bearer as_live_XXXXXXXXXXXXXXXXXXXXXXXX"Keep the key in the other system's settings, never in email or a shared document, and revoke it if it is exposed. A request with no key answers 401 missing_key; a wrong or revoked key answers 401 invalid_key.
Key permissions
Permissions are chosen when the key is created and cannot be added later, so a key that leaks can never do more than it was made for. Give each system its own key with only what it needs.
| Permission | When | Allows |
|---|---|---|
read | Always | Organisation, sessions, attendance, files, live classes, certificates, class lists, saved classes and bookings. |
certificates | Ticked | POST /sessions/{id}/certificates. |
classes | Ticked | POST and DELETE on /class-lists and /saved-classes. |
monitoring | Ticked | POST and DELETE on /monitoring. Bookings use AttendSure Hours. |
GET /organisation shows the key's permissions. A write the key may not make answers 403 insufficient_scope. Writes act as the person who created the key: if they stop being an owner or admin, the key keeps reading but stops writing (403 key_owner_not_admin). Three reads go through that person too and stop with it: GET /class-lists, GET /saved-classes and GET /certificates/{id}/pdf. Create a new key from a current owner or admin to restore them.
{
"id": "17",
"name": "Example Institute",
"timezone": "Australia/Sydney",
"attendanceRules": null,
"classListsAvailable": false,
"key": { "id": "3", "name": "LMS sync", "scopes": ["read", "certificates", "classes"] }
}Quick start
- Create a key and call
GET /organisationto confirm it works. - Call
GET /sessions?from=<date>to list the finished sessions since a date. - For each session you have not imported yet, call
GET /sessions/{id}for everyone's attendance, or useGET /attendanceto get the rows for many sessions in one call. - Run it daily. Sessions are listed newest first and never change once finished, so a date window and the session id are enough to avoid double imports.
OpenAPI and Postman
Every endpoint, field, permission, error and webhook on this page is also described in a machine-readable OpenAPI 3.1 file. Generate a client in your language with it, or import it into Postman, Insomnia, Zapier, Make or an AI coding assistant. The Postman collection has every request ready: import it and set the apiKey variable to your key. Neither needs a key to download.
# The OpenAPI 3.1 description: generate a client, or import it into
# Postman, Insomnia, Zapier, Make or your AI coding assistant.
curl -o attendsure-openapi.json https://www.attendsure.net/api/v1/openapi.json
# A ready Postman collection: set the apiKey variable to your key.
curl -o attendsure.postman_collection.json https://www.attendsure.net/api/v1/postman.jsonOrganisation
/organisationThe organisation the key belongs to, its current attendance rules, and the key's name. The simplest way to test a key.
{
"id": "17",
"name": "Example Institute",
"timezone": "America/Los_Angeles",
"attendanceRules": { "enabled": true, "minAttendancePct": 80, "lateAfterMin": 10, "earlyLeaveMin": 10 },
"key": { "id": "3", "name": "Student records" }
}Responses
| HTTP | code | When |
|---|---|---|
200 | The organisation and the key. |
Retrying. Safe to retry: it only reads. Every endpoint can also give the common errors.
List sessions
/sessionsFinished sessions, newest first. Sessions still running are not listed until they end.
| Parameter | Type | Description |
|---|---|---|
from | date | Only sessions that started on or after this date or time. 2026-11-01 or 2026-11-01T09:00:00Z. |
to | date | Only sessions that started before this date or time. |
limit | integer | 1 to 100. Default 50. |
before | string | The nextBefore value of the previous page, for the next page. |
curl "https://www.attendsure.net/api/v1/sessions?from=2026-11-01&to=2026-12-01&limit=50" \
-H "Authorization: Bearer as_live_..."{
"sessions": [
{
"id": "412",
"meeting": "81234567890",
"label": "Data Structures, week 4",
"trainer": "Sarah Chen",
"platform": "zoom",
"startedAt": "2026-11-03T09:00:00.000Z",
"endedAt": "2026-11-03T10:00:00.000Z",
"durationMs": 3600000,
"participantCount": 24,
"alertCount": 2,
"notObservedMs": 0,
"attendanceRules": { "enabled": true, "minAttendancePct": 80, "lateAfterMin": 10, "earlyLeaveMin": 10 }
}
],
"nextBefore": null
}When a page is full, nextBefore holds the id to pass back as before for the next page. It is null when there are no more.
Responses
| HTTP | code | When |
|---|---|---|
200 | A page of sessions, possibly empty. | |
400 | invalid_date, invalid_limit, invalid_cursor | A parameter could not be read. |
Retrying. Safe to retry: it only reads. Every endpoint can also give the common errors.
One session, with attendance
/sessions/{id}The session and one entry per person, including anyone on the class list who never joined (status absent). Field meanings are in the field reference.
curl https://www.attendsure.net/api/v1/sessions/412 \
-H "Authorization: Bearer as_live_..."{
"session": {
"id": "412",
"meeting": "81234567890",
"label": "Data Structures, week 4",
"trainer": "Sarah Chen",
"platform": "zoom",
"startedAt": "2026-11-03T09:00:00.000Z",
"endedAt": "2026-11-03T10:00:00.000Z",
"durationMs": 3600000,
"monitoredMs": 3600000,
"notObservedMs": 0,
"stoppedUnexpectedly": false,
"attendanceRules": { "enabled": true, "minAttendancePct": 80, "lateAfterMin": 10, "earlyLeaveMin": 10 },
"expectedAttendees": ["Ava Patel", "Ben Okafor", "Eli Brown"],
"breaks": []
},
"attendance": [
{
"name": "Ava Patel",
"previousNames": [],
"assessed": true,
"joinedAt": "2026-11-03T09:00:12.000Z",
"leftAt": null,
"presentMs": 3588000,
"breakoutMs": 0,
"attendancePct": 100,
"cameraOnPct": 100,
"cameraOffMs": 0,
"wentOverThreshold": false,
"lateByMs": 12000,
"leftEarlyByMs": 0,
"disconnections": 0,
"status": "attended",
"statusLabel": "Attended",
"meetsMinimum": true
},
{
"name": "Eli Brown",
"previousNames": [],
"assessed": true,
"joinedAt": null,
"leftAt": null,
"presentMs": 0,
"breakoutMs": 0,
"attendancePct": 0,
"cameraOnPct": null,
"cameraOffMs": 0,
"wentOverThreshold": null,
"lateByMs": 0,
"leftEarlyByMs": 0,
"disconnections": 0,
"status": "absent",
"statusLabel": "Absent",
"meetsMinimum": false
}
]
}Responses
| HTTP | code | When |
|---|---|---|
200 | The session and everyone’s attendance. | |
400 | invalid_id | Not a session id. |
404 | not_found | No finished session with that id in this organisation. A class still running is at /live/{id}. |
Retrying. Safe to retry: it only reads. Every endpoint can also give the common errors.
Attendance rows for import
/attendanceThe same per-person data as above, flattened to one row per person per session across many sessions. Each row carries the session's id, meeting and start time beside the person's fields.
| Parameter | Type | Description |
|---|---|---|
from | date | As for /sessions. |
to | date | As for /sessions. |
sessions | integer | Sessions per page, 1 to 25. Default 10. |
before | string | The nextBefore value of the previous page. |
curl "https://www.attendsure.net/api/v1/attendance?from=2026-11-01&sessions=25" \
-H "Authorization: Bearer as_live_..."{
"attendance": [
{
"sessionId": "412",
"meeting": "81234567890",
"sessionStartedAt": "2026-11-03T09:00:00.000Z",
"name": "Ava Patel",
"previousNames": [],
"assessed": true,
"joinedAt": "2026-11-03T09:00:12.000Z",
"leftAt": null,
"presentMs": 3588000,
"breakoutMs": 0,
"attendancePct": 100,
"cameraOnPct": 100,
"cameraOffMs": 0,
"wentOverThreshold": false,
"lateByMs": 12000,
"leftEarlyByMs": 0,
"disconnections": 0,
"status": "attended",
"statusLabel": "Attended",
"meetsMinimum": true
}
],
"nextBefore": null
}Responses
| HTTP | code | When |
|---|---|---|
200 | A page of rows, possibly empty. | |
400 | invalid_date, invalid_limit, invalid_cursor | A parameter could not be read. |
Retrying. Safe to retry: it only reads. Every endpoint can also give the common errors.
CSV and Excel files
/sessions/{id}/attendance.csv · .xlsx · /attendance.csv · .xlsxThe attendance table as a file, one row per person, for one session or for every session in a date range (the same from, to, sessions and before as /attendance; the next page's cursor is in the X-Next-Before header). CSV is UTF-8 with a byte-order mark, so Excel opens names correctly. Times are UTC.
curl -o attendance.csv https://www.attendsure.net/api/v1/sessions/412/attendance.csv \
-H "Authorization: Bearer as_live_..."
curl -o november.xlsx "https://www.attendsure.net/api/v1/attendance.xlsx?from=2026-11-01&to=2026-12-01&sessions=25" \
-H "Authorization: Bearer as_live_..."Responses
| HTTP | code | When |
|---|---|---|
200 | The file, with Content-Disposition: attachment. | |
400 | invalid_date, invalid_limit, invalid_cursor, invalid_id | A parameter could not be read. |
404 | not_found | No finished session with that id. |
Retrying. Safe to retry: it only reads. Every endpoint can also give the common errors.
Live classes
/live · /live/{id}The classes being monitored right now, with how many people are on and off camera, for a coordinator's wall screen or an alerting job. /live/{id} adds each person. The figures are as of the monitor's last save, about every 15 seconds. No video: only camera state.
curl https://www.attendsure.net/api/v1/live -H "Authorization: Bearer as_live_..."{
"live": [
{
"id": "433",
"meeting": "81234567890",
"label": "First Aid, week 2",
"trainer": "Sarah Chen",
"platform": "zoom",
"startedAt": "2026-11-04T09:00:00.000Z",
"plannedEndAt": "2026-11-04T12:00:00.000Z",
"asOf": "2026-11-04T09:41:15.000Z",
"thresholdMs": 600000,
"counts": { "present": 24, "cameraOn": 21, "cameraOff": 3, "cameraUnknown": 0, "overThreshold": 1, "notAssessed": 1 }
}
]
}{
"live": { "id": "433", "counts": { "present": 24, "cameraOn": 21, "cameraOff": 3 } },
"participants": [
{ "name": "Ava Patel", "present": true, "cameraOn": true, "assessed": true, "overThreshold": false,
"cameraOffMs": 0, "joinedAt": "2026-11-04T08:58:40.000Z", "leftAt": null }
]
}| Field | Type | Meaning |
|---|---|---|
counts.present | integer | Assessed people in the meeting now. |
counts.cameraOn / cameraOff | integer | Of those, camera on or off at the last save. |
counts.cameraUnknown | integer | Present, camera state not reported (an older monitor). |
counts.overThreshold | integer | People whose camera has been off past the threshold in this class. |
counts.notAssessed | integer | People marked not assessed (a trainer, an observer) who are here. |
asOf | date-time | When the monitor last saved, about every 15 seconds. |
Responses
| HTTP | code | When |
|---|---|---|
200 | The live classes (an empty list when none), or the one asked for. | |
404 | not_found | /live/{id} only: the class is not live. If it has ended, read /sessions/{id}. |
Retrying. Safe to retry: it only reads. Every endpoint can also give the common errors.
Certificates
/certificates · /certificates/{id} · /certificates/{id}/pdfIssued attendance certificates, newest first, paged like sessions. Filter with session, from and to (issue date). Look one up by id or by its serial number, or download its PDF. verifyUrl is the public page anyone can open to check it, also in the PDF's QR code.
curl "https://www.attendsure.net/api/v1/certificates?session=412" -H "Authorization: Bearer as_live_..."{
"certificates": [
{
"id": "88",
"serial": "AS-2026-000088",
"name": "Ava Patel",
"title": "First Aid Refresher",
"sessionId": "412",
"meeting": "81234567890",
"sessionStartedAt": "2026-11-03T09:00:00.000Z",
"durationMs": 3600000,
"cameraOnPct": 98,
"cameraOffMs": 45000,
"issuedAt": "2026-11-03T10:00:05.000Z",
"revoked": false,
"revokedAt": null,
"verifyUrl": "https://www.attendsure.net/certificate/…",
"pdf": "/api/v1/certificates/88/pdf"
}
],
"nextBefore": null
}Responses
| HTTP | code | When |
|---|---|---|
200 | A page of certificates, the certificate, or its PDF. | |
400 | invalid_date, invalid_limit, invalid_cursor, invalid_id | A parameter could not be read. |
404 | not_found | No certificate with that id or serial. |
Retrying. Safe to retry: it only reads. Every endpoint can also give the common errors.
Issue certificates
/sessions/{id}/certificatesNeeds the certificates permission. Issues certificates for a finished session to the people named in participants, or to everyone who qualifies when it is left out: the same rule as the Issue button (no camera alert, assessed, every Presence Check answered). title defaults to the class name. Anyone who does not qualify is listed under refused with the reason; nobody is issued twice.
| Field | Type | Description |
|---|---|---|
title | string | Printed on the certificate. Optional: the class name, or "Certificate of Attendance". |
participants | string[] | Names as on the record. Optional: everyone eligible. Up to 300. |
curl -X POST https://www.attendsure.net/api/v1/sessions/412/certificates \
-H "Authorization: Bearer as_live_..." \
-H "Content-Type: application/json" \
-d '{ "title": "First Aid Refresher" }'{
"issued": [
{ "id": "88", "serial": "AS-2026-000088", "name": "Ava Patel", "title": "First Aid Refresher",
"issuedAt": "2026-11-03T10:00:05.000Z", "verifyUrl": "https://www.attendsure.net/certificate/…",
"pdf": "/api/v1/certificates/88/pdf" }
],
"refused": [ { "name": "Cara Brief", "reason": "not_eligible" } ]
}Responses
| HTTP | code | When |
|---|---|---|
201 | Certificates issued; anyone who did not qualify is under refused. | |
200 | No participants were named and nobody qualifies: nothing to issue. | |
400 | bad_title, invalid_request | The title or the names could not be used. |
402 | trial_expired, subscription_ended | The plan did not cover this session. |
403 | insufficient_scope, key_owner_not_admin | The key may not issue certificates. |
404 | not_found | No such session. |
409 | already_issued, not_eligible, duplicate_name, session_live | Nothing was issued, and the code says why. |
Retrying. Safe to retry: nobody is issued twice. A repeat answers 409 already_issued. Every endpoint can also give the common errors.
Class lists
/class-lists · /class-lists/{id}Who is expected in a class, so anyone enrolled who never joins is marked Absent. Push the enrolment from your system before each class. One list per meeting: posting again for the same meeting replaces it. Writing needs the classes permission; class lists need Custom Attendance Rules on the plan.
| Field | Type | Description |
|---|---|---|
meeting | string | The Zoom meeting ID (spaces allowed) or the Teams / Google Meet link. |
label | string | The list’s name, 1 to 120 characters. |
names | string[] | Up to 2,000 names, as people appear in the meeting. Repeats are dropped. |
curl -X POST https://www.attendsure.net/api/v1/class-lists \
-H "Authorization: Bearer as_live_..." \
-H "Content-Type: application/json" \
-d '{ "meeting": "812 3456 7890", "label": "Tuesday cohort",
"names": ["Ava Patel", "Ben Okafor", "Chloe Nguyen"] }'{
"classList": {
"id": "5",
"meeting": "81234567890",
"label": "Tuesday cohort",
"names": ["Ava Patel", "Ben Okafor", "Chloe Nguyen"],
"updatedAt": "2026-11-03T08:00:00.000Z"
}
}Responses
| HTTP | code | When |
|---|---|---|
200 | The lists, or the list just saved. | |
204 | Deleted. | |
400 | invalid_meeting, invalid_request | The meeting, label or names could not be used. |
403 | feature_off, insufficient_scope, key_owner_not_admin | Class lists are not on the plan, or the key may not change them. |
404 | not_found | No such list (DELETE). |
Retrying. Safe to retry: one list per meeting, so POST again replaces it; DELETE again answers 404. Every endpoint can also give the common errors.
Saved classes
/saved-classes · /saved-classes/{id}The classes your team picks from on the start form. Posting for a Zoom meeting number that is already saved updates it. The passcode is stored encrypted and never returned (hasPasscode says whether there is one). Writing needs the classes permission.
curl -X POST https://www.attendsure.net/api/v1/saved-classes \
-H "Authorization: Bearer as_live_..." \
-H "Content-Type: application/json" \
-d '{ "meeting": "81234567890", "label": "First Aid", "passcode": "abc123",
"thresholdMs": 600000, "trainer": "Sarah Chen", "language": "en" }'{
"savedClass": {
"id": "9",
"meeting": "81234567890",
"label": "First Aid",
"displayName": null,
"thresholdMs": 600000,
"trainer": "Sarah Chen",
"language": "en",
"hasPasscode": true,
"lastUsedAt": null
}
}Responses
| HTTP | code | When |
|---|---|---|
200 | The saved classes. | |
201 | Saved (created or updated). | |
204 | Removed. | |
400 | invalid_request | A field could not be used: the message names it. |
402 | trial_expired, subscription_ended | The plan has ended. |
403 | insufficient_scope, key_owner_not_admin | The key may not change saved classes. |
404 | not_found | No such saved class (DELETE). |
Retrying. Safe to retry: one per Zoom meeting number, so POST again updates it; fields left out keep their value. Every endpoint can also give the common errors.
Book monitoring
/monitoring · /monitoring/{id}Needs the monitoring permission. Books AttendSure into a class so nobody has to open the app. A Zoom meeting is monitored by Cloud Monitoring, on AttendSure's servers with the key owner's Zoom connection, now or at startAt up to 24 hours ahead. A Teams or Google Meet link books the AttendSure bot to join at startAt, 10 minutes to 24 hours ahead; the host admits it from the lobby and the class is monitored and filed on its own. Both use AttendSure Hours and count against the plan's classes at once.
| Field | Type | Description |
|---|---|---|
meeting | string | Required. A Zoom meeting ID or link, or a Teams / Google Meet link. |
startAt | date-time | When to start. Zoom: optional (now). Teams / Meet: required. |
passcode | string | Zoom only, if the meeting has one. |
thresholdMs | integer | Camera-off threshold. Optional: the key owner’s default. |
unattended | boolean | Zoom only. true (default): join as the Zoom account; false: alongside the host, who must be in the meeting. |
liveView | boolean | Teams / Meet only. Default true. |
label, trainer, plannedEndAt, language | The Meeting details, as on the start form. | |
autoCertificates, certificateTitle | Issue certificates automatically when the class ends. | |
emailReport, reportRecipients | Who gets the report email (up to five extra addresses). | |
classList | integer | "none" | A class list id for this class, or none. Default: the list for the meeting. |
curl -X POST https://www.attendsure.net/api/v1/monitoring \
-H "Authorization: Bearer as_live_..." \
-H "Content-Type: application/json" \
-d '{
"meeting": "https://us02web.zoom.us/j/81234567890",
"passcode": "123456",
"startAt": "2026-11-04T09:00:00Z",
"thresholdMs": 600000,
"label": "First Aid, week 2",
"trainer": "Sarah Chen",
"autoCertificates": true,
"certificateTitle": "First Aid Refresher",
"reportRecipients": ["coordinator@example.com"]
}'{
"booking": {
"id": "cloud_57",
"platform": "zoom",
"meeting": "81234567890",
"startAt": "2026-11-04T09:00:00.000Z",
"status": "scheduled"
}
}GET /monitoring lists bookings that are scheduled or running. DELETE /monitoring/{id} cancels a booking; for a Zoom class that is already running it stops monitoring and files the record.
{
"bookings": [
{ "id": "cloud_57", "platform": "zoom", "meeting": "81234567890", "label": "First Aid, week 2",
"startAt": "2026-11-04T09:00:00.000Z", "status": "scheduled", "sessionId": null },
{ "id": "bot_8c1f…", "platform": "teams", "meeting": "Microsoft Teams 9387…", "label": null,
"startAt": "2026-11-04T13:00:00.000Z", "status": "scheduled", "sessionId": null }
]
}Responses
| HTTP | code | When |
|---|---|---|
201 | Booked. | |
200 | GET: the bookings. DELETE: {"status":"cancelled"} or {"status":"stopping"} for Zoom, {"ok":true} for Teams / Meet. | |
400 | invalid_meeting, invalid_date, start_required, too_soon, invalid_request | The meeting, the time or a field could not be used. |
402 | concurrent_limit, hours_exhausted, access_ends_before_start, trial_expired, subscription_ended | The plan’s classes at once, the AttendSure Hours, or the plan’s end. |
403 | insufficient_scope, key_owner_not_admin, cloud_not_available | The key may not book, or Cloud Monitoring is not on this account. |
404 | not_found | DELETE: nothing booked or running with that id. |
409 | zoom_not_connected, cloud_already_booked | The key owner has not connected Zoom, or the meeting is already booked. |
502 | The meeting service did not take the booking. Try again. | |
503 | bots_paused, bots_at_capacity | Teams / Meet monitoring is paused or full right now. |
Retrying. Zoom: safe, a second booking for the same meeting answers 409 cloud_already_booked. Teams / Meet: if you did not get an answer, check GET /monitoring before booking again. Every endpoint can also give the common errors.
Webhooks
Instead of asking every few minutes, let AttendSure tell your system. An owner or admin adds an endpoint under Settings › Integrations › Webhooks: a public https:// address and the events it wants. The signing secret (whsec_…) is shown once.
| Event | When | data |
|---|---|---|
session.ended | A class ended and its record is filed. | session (as in GET /sessions), links to the record and its files |
certificates.issued | Certificates were issued, by a person or automatically at the end of a class. | sessionId, title, automatic, certificates[] (id, serial, name, verifyUrl, pdf) |
alert.raised | Somebody’s camera was off past the threshold. Once per person per class. | sessionId, meeting, label, participant, thresholdMs, cameraOffMs, at |
presence_check.missed | Somebody did not answer a Presence Check in time. | sessionId, checkId, participant, sentAt, expiredAt |
Each event is a POST of JSON. Answer with any 2xx within 10 seconds. Anything else is tried again after 1 minute, 5 minutes, 30 minutes, 2 hours, 8 hours and 24 hours, then given up; Settings shows each endpoint's recent deliveries and a Send a test button. Redirects are not followed. The same event can, rarely, arrive twice: use id to ignore a repeat.
POST /your/endpoint HTTP/1.1
Content-Type: application/json
User-Agent: AttendSure-Webhooks/1.0
AttendSure-Event: session.ended
AttendSure-Delivery: evt_1042
AttendSure-Signature: t=1793700000,v1=5d41402abc4b2a76b9719d911017c592…
{
"id": "evt_1042",
"event": "session.ended",
"createdAt": "2026-11-03T10:00:04.000Z",
"organisationId": "17",
"data": {
"session": {
"id": "412",
"meeting": "81234567890",
"label": "Data Structures, week 4",
"trainer": "Sarah Chen",
"platform": "zoom",
"startedAt": "2026-11-03T09:00:00.000Z",
"endedAt": "2026-11-03T10:00:00.000Z",
"durationMs": 3600000,
"participantCount": 24,
"alertCount": 2,
"notObservedMs": 0,
"attendanceRules": null
},
"links": {
"session": "/api/v1/sessions/412",
"attendanceCsv": "/api/v1/sessions/412/attendance.csv",
"attendanceXlsx": "/api/v1/sessions/412/attendance.xlsx"
}
}
}{
"id": "evt_1043",
"event": "certificates.issued",
"createdAt": "2026-11-03T10:00:05.000Z",
"organisationId": "17",
"data": {
"sessionId": "412",
"title": "First Aid Refresher",
"automatic": true,
"certificates": [
{
"id": "88",
"serial": "AS-2026-000088",
"name": "Ava Patel",
"issuedAt": "2026-11-03T10:00:05.000Z",
"verifyUrl": "https://www.attendsure.net/certificate/…",
"pdf": "/api/v1/certificates/88/pdf"
}
]
}
}{
"id": "evt_1040",
"event": "alert.raised",
"createdAt": "2026-11-03T09:24:10.000Z",
"organisationId": "17",
"data": {
"sessionId": "412",
"meeting": "81234567890",
"label": "Data Structures, week 4",
"participant": "Ben Okafor",
"thresholdMs": 600000,
"cameraOffMs": 601200,
"at": "2026-11-03T09:24:10.000Z"
}
}{
"id": "evt_1041",
"event": "presence_check.missed",
"createdAt": "2026-11-03T09:31:02.000Z",
"organisationId": "17",
"data": {
"sessionId": "412",
"checkId": "5531",
"participant": "Chloe Nguyen",
"sentAt": "2026-11-03T09:29:00.000Z",
"expiredAt": "2026-11-03T09:31:00.000Z"
}
}{
"id": "evt_1039",
"event": "ping",
"createdAt": "2026-11-03T08:00:00.000Z",
"organisationId": "17",
"data": { "message": "A test from AttendSure. Your endpoint is reachable." }
}Checking the signature
AttendSure-Signature is t=<unix seconds>,v1=<hex>, where the hex is HMAC-SHA256 of <t>.<raw body> with your secret. Reject a delivery whose signature does not match or whose t is more than five minutes old.
// Node.js (Express). Read the RAW body: the signature is over the exact bytes.
import crypto from 'node:crypto';
import express from 'express';
const app = express();
const SECRET = process.env.ATTENDSURE_WEBHOOK_SECRET; // whsec_...
app.post('/attendsure', express.raw({ type: 'application/json' }), (req, res) => {
const header = req.get('AttendSure-Signature') || '';
const { t, v1 } = Object.fromEntries(header.split(',').map((p) => p.split('=')));
const expected = crypto.createHmac('sha256', SECRET).update(`${t}.${req.body}`).digest('hex');
const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300;
const same = v1 && v1.length === expected.length && crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected));
if (!fresh || !same) {
return res.status(400).end();
}
const event = JSON.parse(req.body);
// Answer quickly; do the work after. Use event.id to ignore a repeat.
res.status(200).end();
});# Python (Flask). Use the RAW body: the signature is over the exact bytes.
import hashlib, hmac, os, time
from flask import Flask, request, abort
app = Flask(__name__)
SECRET = os.environ["ATTENDSURE_WEBHOOK_SECRET"].encode() # whsec_...
@app.post("/attendsure")
def attendsure():
# Pieces without "=" are skipped, so a missing header is a 400, not a crash.
header = request.headers.get("AttendSure-Signature", "")
parts = dict(p.split("=", 1) for p in header.split(",") if "=" in p)
t, v1 = parts.get("t", ""), parts.get("v1", "")
expected = hmac.new(SECRET, f"{t}.".encode() + request.get_data(), hashlib.sha256).hexdigest()
if not t.isdigit() or abs(time.time() - int(t)) > 300 or not hmac.compare_digest(v1, expected):
abort(400)
event = request.get_json()
# Answer quickly; do the work after. Use event["id"] to ignore a repeat.
return "", 200<?php
// PHP. Use the RAW body: the signature is over the exact bytes.
$secret = getenv('ATTENDSURE_WEBHOOK_SECRET'); // whsec_...
$body = file_get_contents('php://input');
parse_str(str_replace(',', '&', $_SERVER['HTTP_ATTENDSURE_SIGNATURE'] ?? ''), $sig);
$t = $sig['t'] ?? '';
$expected = hash_hmac('sha256', $t . '.' . $body, $secret);
if (!ctype_digit($t) || abs(time() - (int) $t) > 300 || !hash_equals($expected, $sig['v1'] ?? '')) {
http_response_code(400);
exit;
}
$event = json_decode($body, true);
// Answer quickly; do the work after. Use $event['id'] to ignore a repeat.
http_response_code(200);Field reference
Session
| Field | Type | Meaning |
|---|---|---|
id | string | The session id. Use it with GET /sessions/{id}. |
meeting | string | The Zoom meeting number, or the Teams / Meet reference. |
label | string | null | The class name given when the session was started, or null. |
trainer | string | null | The trainer named when the session was started, or null. |
platform | string | "zoom", "teams" or "meet". |
startedAt, endedAt | string | ISO 8601, UTC. |
durationMs | number | Length of the session in milliseconds, breaks included. |
monitoredMs | number | Time actually monitored: duration minus breaks and unobserved time. |
notObservedMs | number | null | Time nothing was watching (a slept computer, a reconnect). null when not measured. |
stoppedUnexpectedly | boolean | true when the record was closed without End session. |
attendanceRules | object | null | The rules the session ran under, or null when none were in force. |
expectedAttendees | string[] | null | The class list when the session started, or null. |
breaks | object[] | Declared breaks: { startedAt, endedAt }. |
Attendance entry
| Field | Type | Meaning |
|---|---|---|
name | string | The display name they joined with. |
previousNames | string[] | Earlier names in the same session, if they renamed. |
assessed | boolean | false for someone marked "not assessed", such as the trainer. |
joinedAt, leftAt | string | null | First join and last leave, ISO 8601 UTC. leftAt is null when they stayed to the end. |
presentMs | number | Time present, net of breaks and time away. Breakout-room time counts as present. |
breakoutMs | number | The part of presentMs spent in a breakout room. Not used for cameraOnPct. |
attendancePct | number | presentMs as a share of monitoredMs, 0 to 100. |
cameraOnPct | number | null | Share of their present time with the camera on. null when not assessed. |
cameraOffMs | number | Total camera-off time. |
wentOverThreshold | boolean | null | Whether their camera stayed off past the organisation’s threshold. |
lateByMs | number | How long after the start they joined; 0 when on time. |
leftEarlyByMs | number | How long before the end they left; 0 when they stayed. |
disconnections | number | Times they dropped out and came back. A breakout room does not count. |
status | string | null | One of the statuses below, or null when no rules were in force. |
statusLabel | string | null | The status in words, as the report shows it. |
meetsMinimum | boolean | null | Against the minimum attendance rule; null when there is no such rule. |
Percentages are whole numbers. attendancePct and presentMs are measurements and are always present; status and meetsMinimum are judgements and need attendance rules.
Attendance statuses
A status is judged against the attendance rules the organisation had on when the session started, so a session keeps its status if the rules change later. With no rules, status is null.
| status | statusLabel | Meaning |
|---|---|---|
attended | Attended | Met every rule. |
late | Late | Joined after the late-arrival allowance. |
left-early | Left early | Left before the early-departure allowance. |
late-left-early | Late and left early | Both of the above. |
below | Below minimum attendance | Present for less than the minimum share of the class. Takes precedence over the others. |
absent | Absent | On the class list and never joined. |
not-assessed | Not assessed | Marked as not assessed by the organisation. |
Errors
Every error is JSON with error (a sentence for a person) and code (for your code to branch on).
{ "error": "That API key is not valid, or has been revoked.", "code": "invalid_key" }| HTTP | code | Meaning |
|---|---|---|
400 | invalid_date, invalid_limit, invalid_cursor, invalid_id | A parameter could not be read. The message says which. |
401 | missing_key | No Authorization header. |
401 | invalid_key | The key is wrong or has been revoked. |
403 | feature_off | The AttendSure API is not included in this organisation’s plan. |
404 | not_found | No such session, or no such endpoint. |
400 | invalid_meeting, start_required, invalid_json, invalid_request | The body could not be used. The message says what to change. |
402 | plan_limit, access_ends_before_start, out_of_hours | The plan, its limits or its AttendSure Hours do not allow it. |
403 | insufficient_scope | The key does not have the permission for this. Create a key that does. |
403 | key_owner_not_admin | The person who created the key is no longer an owner or admin. Create a new key. |
409 | conflict, cloud_already_booked, too_many_* | It clashes with something that exists: the message says what. |
429 | rate_limited | More than 120 requests in a minute from one key. |
500 | server_error | Something went wrong on our side. Retry. |
Rate limits and paging
Each key may make 120 requests a minute; above that the API answers 429 rate_limited with standard RateLimit headers. Lists are paged newest first with limit (or sessions) and before. A finished session can still change for up to 24 hours when monitoring stopped unexpectedly and then carried on (its stoppedUnexpectedly is true): the record is reopened and session.ended is sent again with the final figures. A daily job that re-reads the last few days, and replaces what it imported, is enough.
What is recorded
AttendSure records camera status, join and leave times, Presence Check replies and the figures above. No meeting video, audio, chat content or screen share is recorded or stored, so none can be requested.
Connecting a system we have not seen before? Contact support and we will help map the fields.