{"openapi":"3.1.0","info":{"title":"AttendSure API","version":"1.1.0","summary":"Attendance, certificates, class lists, live classes, monitoring bookings and webhooks.","description":"One organisation’s AttendSure records, for a student management system, LMS, HR platform, Zapier or Make. Every key reads; certificates, classes and monitoring permissions are chosen when the key is made. Times are ISO 8601 UTC, durations milliseconds. Reference: https://www.attendsure.net/attendance-api","contact":{"name":"AttendSure support","url":"https://www.attendsure.net/support"}},"servers":[{"url":"https://www.attendsure.net/api/v1"}],"security":[{"apiKey":[]}],"tags":[{"name":"Records"},{"name":"Files"},{"name":"Live"},{"name":"Certificates"},{"name":"Class lists"},{"name":"Saved classes"},{"name":"Monitoring"},{"name":"Webhooks"}],"paths":{"/organisation":{"get":{"tags":["Records"],"operationId":"getOrganisation","summary":"The key’s organisation and permissions","responses":{"200":{"description":"The organisation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organisation"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions":{"get":{"tags":["Records"],"operationId":"listSessions","summary":"Finished sessions, newest first","parameters":[{"name":"from","in":"query","required":false,"description":"On or after this date or time, e.g. 2026-11-01 or 2026-11-01T09:00:00Z.","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"description":"Before this date or time.","schema":{"type":"string","format":"date-time"}},{"name":"before","in":"query","required":false,"description":"The nextBefore value of the previous page.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1 to 100. Default 50.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"A page.","content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/SessionSummary"}},"nextBefore":{"type":["string","null"],"description":"Pass back as before; null when there is no more."}}}}}},"400":{"description":"A parameter could not be read. Codes: invalid_date, invalid_limit, invalid_cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}":{"get":{"tags":["Records"],"operationId":"getSession","summary":"One finished session with everyone’s attendance","parameters":[{"name":"id","in":"path","required":true,"description":"The session id.","schema":{"type":"string"}}],"responses":{"200":{"description":"The session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDetail"}}}},"400":{"description":"The id in the path could not be read. Codes: invalid_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such finished session. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/attendance":{"get":{"tags":["Records"],"operationId":"listAttendance","summary":"One row per person per session","parameters":[{"name":"from","in":"query","required":false,"description":"On or after this date or time, e.g. 2026-11-01 or 2026-11-01T09:00:00Z.","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"description":"Before this date or time.","schema":{"type":"string","format":"date-time"}},{"name":"before","in":"query","required":false,"description":"The nextBefore value of the previous page.","schema":{"type":"string"}},{"name":"sessions","in":"query","required":false,"description":"Sessions per page, 1 to 25. Default 10.","schema":{"type":"integer","minimum":1,"maximum":25,"default":10}}],"responses":{"200":{"description":"A page.","content":{"application/json":{"schema":{"type":"object","properties":{"attendance":{"type":"array","items":{"$ref":"#/components/schemas/AttendanceRow"}},"nextBefore":{"type":["string","null"],"description":"Pass back as before; null when there is no more."}}}}}},"400":{"description":"A parameter could not be read. Codes: invalid_date, invalid_limit, invalid_cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/attendance.csv":{"get":{"tags":["Files"],"operationId":"sessionAttendanceCsv","summary":"One session’s attendance as CSV","parameters":[{"name":"id","in":"path","required":true,"description":"The session id.","schema":{"type":"string"}}],"responses":{"200":{"description":"UTF-8 CSV with a byte-order mark.","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The id in the path could not be read. Codes: invalid_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such finished session. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/attendance.xlsx":{"get":{"tags":["Files"],"operationId":"sessionAttendanceXlsx","summary":"One session’s attendance as Excel","parameters":[{"name":"id","in":"path","required":true,"description":"The session id.","schema":{"type":"string"}}],"responses":{"200":{"description":"An Excel workbook.","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The id in the path could not be read. Codes: invalid_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such finished session. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/attendance.csv":{"get":{"tags":["Files"],"operationId":"attendanceCsv","summary":"Attendance for a date range as CSV","description":"The next page’s cursor is in the X-Next-Before header.","parameters":[{"name":"from","in":"query","required":false,"description":"On or after this date or time, e.g. 2026-11-01 or 2026-11-01T09:00:00Z.","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"description":"Before this date or time.","schema":{"type":"string","format":"date-time"}},{"name":"before","in":"query","required":false,"description":"The nextBefore value of the previous page.","schema":{"type":"string"}},{"name":"sessions","in":"query","required":false,"description":"Sessions per page, 1 to 25. Default 10.","schema":{"type":"integer","minimum":1,"maximum":25,"default":10}}],"responses":{"200":{"description":"UTF-8 CSV.","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"A parameter could not be read. Codes: invalid_date, invalid_limit, invalid_cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/attendance.xlsx":{"get":{"tags":["Files"],"operationId":"attendanceXlsx","summary":"Attendance for a date range as Excel","description":"The next page’s cursor is in the X-Next-Before header.","parameters":[{"name":"from","in":"query","required":false,"description":"On or after this date or time, e.g. 2026-11-01 or 2026-11-01T09:00:00Z.","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"description":"Before this date or time.","schema":{"type":"string","format":"date-time"}},{"name":"before","in":"query","required":false,"description":"The nextBefore value of the previous page.","schema":{"type":"string"}},{"name":"sessions","in":"query","required":false,"description":"Sessions per page, 1 to 25. Default 10.","schema":{"type":"integer","minimum":1,"maximum":25,"default":10}}],"responses":{"200":{"description":"An Excel workbook.","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"A parameter could not be read. Codes: invalid_date, invalid_limit, invalid_cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/live":{"get":{"tags":["Live"],"operationId":"listLive","summary":"Classes being monitored now","responses":{"200":{"description":"Live classes.","content":{"application/json":{"schema":{"type":"object","properties":{"live":{"type":"array","items":{"$ref":"#/components/schemas/LiveClass"}}}}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/live/{id}":{"get":{"tags":["Live"],"operationId":"getLive","summary":"One live class, person by person","parameters":[{"name":"id","in":"path","required":true,"description":"The session id.","schema":{"type":"string"}}],"responses":{"200":{"description":"The class.","content":{"application/json":{"schema":{"type":"object","properties":{"live":{"$ref":"#/components/schemas/LiveClass"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/LiveParticipant"}}}}}}},"400":{"description":"The id in the path could not be read. Codes: invalid_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not live: it may have ended (see /sessions/{id}). Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/certificates":{"get":{"tags":["Certificates"],"operationId":"listCertificates","summary":"Issued certificates, newest first","parameters":[{"name":"session","in":"query","required":false,"description":"Only this session’s.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"Issued on or after.","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"description":"Issued before.","schema":{"type":"string","format":"date-time"}},{"name":"before","in":"query","required":false,"description":"The nextBefore value of the previous page.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1 to 100. Default 50.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"A page.","content":{"application/json":{"schema":{"type":"object","properties":{"certificates":{"type":"array","items":{"$ref":"#/components/schemas/Certificate"}},"nextBefore":{"type":["string","null"],"description":"Pass back as before; null when there is no more."}}}}}},"400":{"description":"A parameter could not be read. Codes: invalid_date, invalid_limit, invalid_cursor, invalid_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/certificates/{id}":{"get":{"tags":["Certificates"],"operationId":"getCertificate","summary":"One certificate, by id or serial","parameters":[{"name":"id","in":"path","required":true,"description":"The id, or the serial number.","schema":{"type":"string"}}],"responses":{"200":{"description":"The certificate.","content":{"application/json":{"schema":{"type":"object","properties":{"certificate":{"$ref":"#/components/schemas/Certificate"}}}}}},"400":{"description":"The id in the path could not be read. Codes: invalid_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/certificates/{id}/pdf":{"get":{"tags":["Certificates"],"operationId":"getCertificatePdf","summary":"The certificate PDF","parameters":[{"name":"id","in":"path","required":true,"description":"The certificate id.","schema":{"type":"string"}}],"responses":{"200":{"description":"The PDF.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The id in the path could not be read. Codes: invalid_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{id}/certificates":{"post":{"tags":["Certificates"],"operationId":"issueCertificates","summary":"Issue certificates for a finished session","description":"Safe to retry: nobody is issued twice; a repeat answers 409 already_issued.","x-attendsure-permission":"certificates","parameters":[{"name":"id","in":"path","required":true,"description":"The session id.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"Default: the class name, or \"Certificate of Attendance\".","maxLength":120},"participants":{"type":"array","maxItems":300,"items":{"type":"string"},"description":"Default: everyone eligible."}}}}}},"responses":{"200":{"description":"Nobody qualifies (with no participants named).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueResult"}}}},"201":{"description":"Issued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueResult"}}}},"400":{"description":"Bad title or names. Codes: bad_title, invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan does not allow it for this session. Codes: trial_expired, subscription_ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such session. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Nothing issued: everyone already has one, nobody named qualifies, or the session is still running. Codes: already_issued, not_eligible, duplicate_name, session_live.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large. Codes: too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/class-lists":{"get":{"tags":["Class lists"],"operationId":"listClassLists","summary":"Class lists","responses":{"200":{"description":"Lists.","content":{"application/json":{"schema":{"type":"object","properties":{"classLists":{"type":"array","items":{"$ref":"#/components/schemas/ClassList"}}}}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Class lists"],"operationId":"saveClassList","summary":"Create or replace the list for a meeting","description":"Safe to retry: one list per meeting, so posting again replaces it. Needs Custom Attendance Rules on the plan.","x-attendsure-permission":"classes","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassListInput"}}}},"responses":{"200":{"description":"Saved.","content":{"application/json":{"schema":{"type":"object","properties":{"classList":{"$ref":"#/components/schemas/ClassList"}}}}}},"400":{"description":"Bad meeting or names. Codes: invalid_meeting, invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large. Codes: too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/class-lists/{id}":{"delete":{"tags":["Class lists"],"operationId":"deleteClassList","summary":"Delete a class list","x-attendsure-permission":"classes","parameters":[{"name":"id","in":"path","required":true,"description":"The class list id.","schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted. A repeat answers 404."},"400":{"description":"The id in the path could not be read. Codes: invalid_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/saved-classes":{"get":{"tags":["Saved classes"],"operationId":"listSavedClasses","summary":"Saved classes","description":"The 25 most recently used saved classes, newest first. There is no cursor.","responses":{"200":{"description":"Saved classes.","content":{"application/json":{"schema":{"type":"object","properties":{"savedClasses":{"type":"array","items":{"$ref":"#/components/schemas/SavedClass"}}}}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Saved classes"],"operationId":"saveSavedClass","summary":"Create or update a saved Zoom class","description":"Safe to retry: one per meeting number, so posting again updates it. Fields left out keep their stored value.","x-attendsure-permission":"classes","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedClassInput"}}}},"responses":{"201":{"description":"Saved.","content":{"application/json":{"schema":{"type":"object","properties":{"savedClass":{"$ref":"#/components/schemas/SavedClass"}}}}}},"400":{"description":"A field could not be used. Codes: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The plan does not allow it. Codes: trial_expired, subscription_ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large. Codes: too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/saved-classes/{id}":{"delete":{"tags":["Saved classes"],"operationId":"deleteSavedClass","summary":"Remove a saved class","x-attendsure-permission":"classes","parameters":[{"name":"id","in":"path","required":true,"description":"The saved class id.","schema":{"type":"string"}}],"responses":{"204":{"description":"Removed. A repeat answers 404."},"400":{"description":"The id in the path could not be read. Codes: invalid_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitoring":{"get":{"tags":["Monitoring"],"operationId":"listBookings","summary":"Bookings scheduled or running","responses":{"200":{"description":"Bookings.","content":{"application/json":{"schema":{"type":"object","properties":{"bookings":{"type":"array","items":{"$ref":"#/components/schemas/Booking"}}}}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Monitoring"],"operationId":"bookMonitoring","summary":"Book monitoring for a meeting","description":"Zoom: Cloud Monitoring with the key owner’s Zoom connection. Teams / Meet: the AttendSure bot, admitted by the host. Uses AttendSure Hours. Retrying: a second Zoom booking for the same meeting answers 409 cloud_already_booked; for Teams / Meet, check GET /monitoring before retrying a booking whose answer you did not get.","x-attendsure-permission":"monitoring","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingInput"}}}},"responses":{"201":{"description":"Booked.","content":{"application/json":{"schema":{"type":"object","properties":{"booking":{"$ref":"#/components/schemas/Booking"}}}}}},"400":{"description":"The meeting or a field could not be used, or the time is out of range. Codes: invalid_meeting, invalid_date, start_required, too_soon, invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Plan, classes-at-once, Hours or access end. Codes: concurrent_limit, hours_exhausted, access_ends_before_start, trial_expired, subscription_ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Zoom is not connected for the key owner, or the meeting is already booked. Codes: zoom_not_connected, cloud_already_booked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large. Codes: too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The meeting service would not take the booking. Try again. Codes: error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Teams / Meet monitoring is paused or at capacity. Codes: bots_paused, bots_at_capacity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/monitoring/{id}":{"delete":{"tags":["Monitoring"],"operationId":"cancelBooking","summary":"Cancel a booking, or stop a running Zoom class","description":"cloud_<n>: cancels it, or stops it if already running (the record is filed). bot_<id>: cancels the Teams / Meet booking.","x-attendsure-permission":"monitoring","parameters":[{"name":"id","in":"path","required":true,"description":"cloud_<n> or bot_<id>.","schema":{"type":"string"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Zoom: cancelled or stopping.","enum":["cancelled","stopping"]},"ok":{"type":"boolean","description":"Teams / Meet."}}}}}},"400":{"description":"The id in the path could not be read. Codes: invalid_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not booked or running. A repeat answers 404. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"tags":["Webhooks"],"operationId":"listWebhooks","summary":"List webhook subscriptions","description":"Needs the API & webhooks add-on; read-only API access (Team, Business) answers 403 addon_required.","responses":{"200":{"description":"The subscriptions.","content":{"application/json":{"schema":{"type":"object","properties":{"webhooks":{"type":"array","items":{"type":"object"}},"events":{"type":"array","items":{"type":"string","description":""}}}}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Webhooks"],"operationId":"createWebhook","summary":"Subscribe a URL to events (REST hook)","description":"How Zapier, Make and n8n subscribe. AttendSure POSTs each event to the URL, signed with the secret in the answer (shown once). `targetUrl` is accepted as a name for `url`. Up to 10 per organisation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","description":"An https address."},"events":{"type":"array","items":{"type":"string","description":"","enum":["session.ended","certificates.issued","alert.raised","presence_check.missed"]}},"description":{"type":"string","description":"Shown in Settings > Integrations."}}}}}},"responses":{"201":{"description":"Subscribed.","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"type":"object"},"secret":{"type":"string","description":"Shown once."}}}}}},"400":{"description":"Bad URL or unknown event. Codes: invalid_url.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is too large. Codes: too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"delete":{"tags":["Webhooks"],"operationId":"deleteWebhook","summary":"Unsubscribe","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Removed."},"400":{"description":"The id in the path could not be read. Codes: invalid_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or a wrong or revoked key. Codes: missing_key, invalid_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API is not on this plan, or the key lacks the permission. Codes: feature_off, insufficient_scope, key_owner_not_admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such subscription. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 120 requests a minute from one key. Codes: rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"session.ended":{"post":{"summary":"A class ended and its record is filed","parameters":[{"name":"AttendSure-Event","in":"header","required":true,"description":"The event name.","schema":{"type":"string"}},{"name":"AttendSure-Delivery","in":"header","required":true,"description":"The delivery id (evt_<n>), the same on retries.","schema":{"type":"string"}},{"name":"AttendSure-Signature","in":"header","required":true,"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your whsec_ secret>.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"data":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/SessionSummary"},"links":{"type":"object","properties":{"session":{"type":"string","description":""},"attendanceCsv":{"type":"string","description":""},"attendanceXlsx":{"type":"string","description":""}}}}}}}]}}}},"responses":{"2XX":{"description":"Received. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 8 h and 24 h."}}}},"certificates.issued":{"post":{"summary":"Certificates were issued","parameters":[{"name":"AttendSure-Event","in":"header","required":true,"description":"The event name.","schema":{"type":"string"}},{"name":"AttendSure-Delivery","in":"header","required":true,"description":"The delivery id (evt_<n>), the same on retries.","schema":{"type":"string"}},{"name":"AttendSure-Signature","in":"header","required":true,"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your whsec_ secret>.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"data":{"type":"object","properties":{"sessionId":{"type":"string","description":""},"title":{"type":"string","description":""},"automatic":{"type":"boolean","description":"True when issued automatically at the end of the class."},"certificates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":""},"serial":{"type":"string","description":""},"name":{"type":"string","description":""},"issuedAt":{"type":"string","description":""},"verifyUrl":{"type":["string","null"],"description":""},"pdf":{"type":"string","description":""}}}}}}}}]}}}},"responses":{"2XX":{"description":"Received. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 8 h and 24 h."}}}},"alert.raised":{"post":{"summary":"A camera was off past the threshold (once per person per class)","parameters":[{"name":"AttendSure-Event","in":"header","required":true,"description":"The event name.","schema":{"type":"string"}},{"name":"AttendSure-Delivery","in":"header","required":true,"description":"The delivery id (evt_<n>), the same on retries.","schema":{"type":"string"}},{"name":"AttendSure-Signature","in":"header","required":true,"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your whsec_ secret>.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"data":{"type":"object","properties":{"sessionId":{"type":"string","description":""},"meeting":{"type":["string","null"],"description":""},"label":{"type":["string","null"],"description":""},"participant":{"type":"string","description":""},"thresholdMs":{"type":["integer","null"],"description":""},"cameraOffMs":{"type":["integer","null"],"description":""},"at":{"type":"string","description":"","format":"date-time"}}}}}]}}}},"responses":{"2XX":{"description":"Received. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 8 h and 24 h."}}}},"presence_check.missed":{"post":{"summary":"A Presence Check was not answered in time","parameters":[{"name":"AttendSure-Event","in":"header","required":true,"description":"The event name.","schema":{"type":"string"}},{"name":"AttendSure-Delivery","in":"header","required":true,"description":"The delivery id (evt_<n>), the same on retries.","schema":{"type":"string"}},{"name":"AttendSure-Signature","in":"header","required":true,"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your whsec_ secret>.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"data":{"type":"object","properties":{"sessionId":{"type":["string","null"],"description":""},"checkId":{"type":"string","description":""},"participant":{"type":"string","description":""},"sentAt":{"type":["string","null"],"description":""},"expiredAt":{"type":["string","null"],"description":""}}}}}]}}}},"responses":{"2XX":{"description":"Received. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 8 h and 24 h."}}}},"ping":{"post":{"summary":"A test from Settings › Integrations › Webhooks","parameters":[{"name":"AttendSure-Event","in":"header","required":true,"description":"The event name.","schema":{"type":"string"}},{"name":"AttendSure-Delivery","in":"header","required":true,"description":"The delivery id (evt_<n>), the same on retries.","schema":{"type":"string"}},{"name":"AttendSure-Signature","in":"header","required":true,"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your whsec_ secret>.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string","description":""}}}}}]}}}},"responses":{"2XX":{"description":"Received. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 8 h and 24 h."}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key from Settings › Integrations: Authorization: Bearer as_live_…"}},"schemas":{"Error":{"type":"object","required":["error","code"],"properties":{"error":{"type":"string","description":"A sentence for a person."},"code":{"type":"string","description":"For your code to branch on."}}},"Rules":{"type":["object","null"],"description":"The attendance rules in force, or null without them.","properties":{"enabled":{"type":"boolean","description":""},"minAttendancePct":{"type":"integer","description":"Minimum attendance %."},"lateAfterMin":{"type":"integer","description":"Minutes after the start that count as late."},"earlyLeaveMin":{"type":"integer","description":"Minutes before the end that count as leaving early."}}},"Organisation":{"type":"object","properties":{"id":{"type":"string","description":""},"name":{"type":"string","description":""},"timezone":{"type":["string","null"],"description":"IANA timezone."},"attendanceRules":{"$ref":"#/components/schemas/Rules"},"classListsAvailable":{"type":"boolean","description":"Whether class lists (Custom Attendance Rules) are on this plan."},"key":{"type":"object","properties":{"id":{"type":"string","description":""},"name":{"type":"string","description":""},"scopes":{"type":"array","items":{"type":"string","enum":["read","certificates","classes","monitoring"]}}}}}},"SessionSummary":{"type":"object","properties":{"id":{"type":"string","description":""},"meeting":{"type":"string","description":"Zoom meeting number, or the Teams / Meet reference."},"label":{"type":["string","null"],"description":"Class name given at the start."},"trainer":{"type":["string","null"],"description":"Trainer given at the start."},"platform":{"type":"string","description":"","enum":["zoom","teams","meet"]},"startedAt":{"type":"string","description":"","format":"date-time"},"endedAt":{"type":"string","description":"","format":"date-time"},"durationMs":{"type":"integer","description":""},"participantCount":{"type":"integer","description":""},"alertCount":{"type":"integer","description":"People whose camera was off past the threshold."},"notObservedMs":{"type":["integer","null"],"description":"Time nothing was watching (a sleeping computer), excluded from everyone."},"attendanceRules":{"$ref":"#/components/schemas/Rules"},"stoppedUnexpectedly":{"type":"boolean","description":"True when the record was closed because monitoring stopped unexpectedly. It can reopen within 24 hours and end again; session.ended is then sent again with the final figures."}}},"AttendanceEntry":{"type":"object","properties":{"name":{"type":"string","description":"Display name in the meeting."},"previousNames":{"type":"array","items":{"type":"string"},"description":"Earlier names this session."},"assessed":{"type":"boolean","description":"False for people marked not assessed (a trainer, an observer)."},"joinedAt":{"type":["string","null"],"description":"","format":"date-time"},"leftAt":{"type":["string","null"],"description":"Null if still there when the class ended.","format":"date-time"},"presentMs":{"type":"integer","description":"Time in the meeting, breakout-room time included."},"breakoutMs":{"type":"integer","description":"The part of presentMs spent in a breakout room. Counted in attendancePct, not in cameraOnPct."},"attendancePct":{"type":["integer","null"],"description":"Present time over the class length, whole %."},"cameraOnPct":{"type":["integer","null"],"description":"Camera on over their own present time; null when not assessed."},"cameraOffMs":{"type":"integer","description":""},"wentOverThreshold":{"type":["boolean","null"],"description":"Camera off past the threshold at least once; null when not assessed."},"lateByMs":{"type":"integer","description":""},"leftEarlyByMs":{"type":"integer","description":""},"disconnections":{"type":"integer","description":""},"status":{"type":["string","null"],"description":"Needs attendance rules.","enum":["attended","late","left_early","partial","absent",null]},"statusLabel":{"type":["string","null"],"description":""},"meetsMinimum":{"type":["boolean","null"],"description":"Needs attendance rules."}}},"SessionDetail":{"type":"object","properties":{"session":{"allOf":[{"$ref":"#/components/schemas/SessionSummary"},{"type":"object","properties":{"monitoredMs":{"type":"integer","description":""},"stoppedUnexpectedly":{"type":"boolean","description":""},"expectedAttendees":{"type":["array","null"],"description":"The class list it started with.","items":{"type":"string"}},"breaks":{"type":"array","items":{"type":"object","properties":{"startedAt":{"type":"string","description":"","format":"date-time"},"endedAt":{"type":["string","null"],"description":"","format":"date-time"}}}}}}]},"attendance":{"type":"array","items":{"$ref":"#/components/schemas/AttendanceEntry"}}}},"AttendanceRow":{"allOf":[{"type":"object","properties":{"sessionId":{"type":"string","description":""},"meeting":{"type":"string","description":""},"label":{"type":["string","null"],"description":""},"sessionStartedAt":{"type":"string","description":"","format":"date-time"}}},{"$ref":"#/components/schemas/AttendanceEntry"}]},"LiveClass":{"type":"object","properties":{"id":{"type":"string","description":"The session id, also used by /sessions/{id} once it ends."},"meeting":{"type":"string","description":""},"label":{"type":["string","null"],"description":""},"trainer":{"type":["string","null"],"description":""},"platform":{"type":"string","description":""},"startedAt":{"type":"string","description":"","format":"date-time"},"plannedEndAt":{"type":["string","null"],"description":"","format":"date-time"},"asOf":{"type":"string","description":"When the monitor last saved (about every 15 seconds).","format":"date-time"},"thresholdMs":{"type":["integer","null"],"description":""},"counts":{"type":"object","properties":{"present":{"type":"integer","description":""},"cameraOn":{"type":"integer","description":""},"cameraOff":{"type":"integer","description":""},"cameraUnknown":{"type":"integer","description":""},"overThreshold":{"type":"integer","description":""},"notAssessed":{"type":"integer","description":""}}}}},"LiveParticipant":{"type":"object","properties":{"name":{"type":"string","description":""},"present":{"type":"boolean","description":""},"cameraOn":{"type":["boolean","null"],"description":"Null once they have left, or if not reported."},"assessed":{"type":"boolean","description":""},"overThreshold":{"type":["boolean","null"],"description":""},"cameraOffMs":{"type":"integer","description":""},"joinedAt":{"type":["string","null"],"description":"","format":"date-time"},"leftAt":{"type":["string","null"],"description":"","format":"date-time"}}},"Certificate":{"type":"object","properties":{"id":{"type":"string","description":""},"serial":{"type":"string","description":"Printed on the certificate, e.g. AS-2026-000088."},"name":{"type":"string","description":""},"title":{"type":"string","description":""},"sessionId":{"type":["string","null"],"description":""},"meeting":{"type":"string","description":""},"sessionStartedAt":{"type":"string","description":"","format":"date-time"},"durationMs":{"type":"integer","description":""},"cameraOnPct":{"type":"integer","description":""},"cameraOffMs":{"type":"integer","description":""},"issuedAt":{"type":"string","description":"","format":"date-time"},"revoked":{"type":"boolean","description":""},"revokedAt":{"type":["string","null"],"description":"","format":"date-time"},"verifyUrl":{"type":["string","null"],"description":"Public page anyone can open to check it; also in the PDF QR code."},"pdf":{"type":"string","description":"API path of the PDF."}}},"IssueResult":{"type":"object","properties":{"issued":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":""},"serial":{"type":"string","description":""},"name":{"type":"string","description":""},"title":{"type":"string","description":""},"issuedAt":{"type":"string","description":"","format":"date-time"},"verifyUrl":{"type":["string","null"],"description":""},"pdf":{"type":"string","description":""}}}},"refused":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":""},"reason":{"type":"string","description":"","enum":["already_issued","not_eligible","duplicate_name"]}}}}}},"ClassList":{"type":"object","properties":{"id":{"type":"string","description":""},"meeting":{"type":"string","description":"Zoom digits, or the Teams / Meet reference."},"label":{"type":"string","description":""},"names":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":"string","description":"","format":"date-time"}}},"ClassListInput":{"type":"object","required":["meeting","label","names"],"properties":{"meeting":{"type":"string","description":"Zoom meeting ID (spaces allowed) or the Teams / Google Meet link."},"label":{"type":"string","description":"","minLength":1,"maxLength":120},"names":{"type":"array","maxItems":2000,"items":{"type":"string","maxLength":200}}}},"SavedClass":{"type":"object","properties":{"id":{"type":"string","description":""},"meeting":{"type":"string","description":""},"label":{"type":["string","null"],"description":""},"displayName":{"type":["string","null"],"description":"AttendSure’s name in the meeting."},"thresholdMs":{"type":["integer","null"],"description":""},"trainer":{"type":["string","null"],"description":""},"language":{"type":"string","description":""},"hasPasscode":{"type":"boolean","description":"Whether a passcode is stored. The passcode itself is never returned."},"lastUsedAt":{"type":["string","null"],"description":"","format":"date-time"}}},"SavedClassInput":{"type":"object","required":["meeting"],"properties":{"meeting":{"type":"string","description":"Zoom meeting number, 9 to 12 digits (spaces allowed)."},"label":{"type":"string","description":"","maxLength":80},"displayName":{"type":"string","description":"","maxLength":80},"passcode":{"type":"string","description":"Stored encrypted. Send \"\" to clear it.","maxLength":20},"thresholdMs":{"type":"integer","description":"5, 10, 15 or 20 minutes, or 1 to 60 whole minutes, in ms."},"trainer":{"type":"string","description":"","maxLength":120},"language":{"type":"string","description":"","enum":["en","es","fr","pt","de","it","id","hi","ar","zh"]}}},"Booking":{"type":"object","properties":{"id":{"type":"string","description":"cloud_<n> for Zoom, bot_<id> for Teams / Meet."},"platform":{"type":"string","description":"","enum":["zoom","teams","meet"]},"meeting":{"type":"string","description":""},"label":{"type":["string","null"],"description":""},"startAt":{"type":"string","description":"","format":"date-time"},"status":{"type":"string","description":"","enum":["scheduled","running"]},"sessionId":{"type":["string","null"],"description":"Set once monitoring has started; the session at /live/{id}."}}},"BookingInput":{"type":"object","required":["meeting"],"properties":{"meeting":{"type":"string","description":"A Zoom meeting ID or link, or a Teams / Google Meet link."},"startAt":{"type":"string","description":"Zoom: optional, now if absent, up to 24 h ahead. Teams / Meet: required, 10 min to 24 h ahead.","format":"date-time"},"passcode":{"type":"string","description":"Zoom only."},"thresholdMs":{"type":"integer","description":"Camera-off threshold in ms. Default: the key owner’s."},"unattended":{"type":"boolean","description":"Zoom only. true (default): join as the Zoom account; false: alongside the host, who must be in the meeting."},"liveView":{"type":"boolean","description":"Teams / Meet only. Default true."},"label":{"type":"string","description":"Class name.","maxLength":120},"trainer":{"type":"string","description":"Trainer, marked not assessed.","maxLength":120},"plannedEndAt":{"type":"string","description":"When the class is meant to end.","format":"date-time"},"language":{"type":"string","description":"Language of participant messages.","enum":["en","es","fr","pt","de","it","id","hi","ar","zh"]},"classList":{"description":"A class list id, or \"none\". Default: the list for the meeting.","oneOf":[{"type":"integer"},{"type":"string","enum":["none","auto"]}]},"emailReport":{"type":"boolean","description":"Email the report to the key owner for this class."},"reportRecipients":{"type":"array","maxItems":5,"items":{"type":"string","format":"email"}},"autoCertificates":{"type":"boolean","description":"Issue certificates automatically when the class ends."},"certificateTitle":{"type":"string","description":"","maxLength":120}}},"WebhookEnvelope":{"type":"object","required":["id","event","createdAt","organisationId","data"],"properties":{"id":{"type":"string","description":"evt_<n>. The same id on a repeat delivery."},"event":{"type":"string","description":"","enum":["session.ended","certificates.issued","alert.raised","presence_check.missed","ping"]},"createdAt":{"type":"string","description":"","format":"date-time"},"organisationId":{"type":"string","description":""},"data":{"type":"object","description":"See each event."}}}}}}