API reference
Audit Logs
Read-only audit trail. Every state change is logged with actor, timestamp, and before/after values. Query for compliance, investigation, or analytics.
Key points
- Every write to FlexiScheduler is logged automatically — no opt-in needed
- Logs include actor (user), action, before/after values, and request metadata
- Three query surfaces: filtered global query, per-entity timeline, per-actor history
- Logs are immutable and retained per your organization’s configured retention policy
About audit logs
FlexiScheduler logs every state-changing operation automatically. Creating an entity, updating a template, cancelling an event, resolving a conflict — all produce audit log entries with the actor (user), timestamp, before-and-after values, and request metadata.
The audit log is immutable. There is no API for modifying or deleting entries. Retention is governed by your organization’s policy — typically 7 years for HIPAA-bound organizations, configurable lower for others.
Query audit logs
/api/v1/audit-logsFiltered query across all audit logs in the organization.
Headers
x-organization-idUUIDrequiredOrganization scope
Query parameters
entityTypestringFilter by entity type (e.g. event, entity, template)
entityIdstringFilter to a specific entity ID
actorIdstringFilter by acting user ID
actionstringFilter by action verb (e.g. created, updated, cancelled)
startDatedatetimeLogs on or after this time
endDatedatetimeLogs on or before this time
limitintegerDefault 20, max 100
offsetintegerDefault 0
Responses
200Paginated audit log entries{
"items": [
{
"id": "audit_a8f4c2d1-...",
"timestamp": "2026-04-26T15:30:00.000Z",
"action": "event.created",
"entityType": "event",
"entityId": "evt_b29f4e58-...",
"actorId": "usr_abc123",
"organizationId": "org_a8f4...",
"changes": {
"before": null,
"after": { "status": "scheduled", ... }
},
"metadata": {
"userAgent": "FlexiSchedulerSDK/1.0",
"ipAddress": "203.0.113.42"
}
}
],
"total": 1247,
"limit": 20,
"offset": 0
}401UnauthorizedLogs by entity
/api/v1/audit-logs/entity/{entityType}/{entityId}Full audit history for a specific entity. Useful for showing “what happened to this record” timelines in admin UIs.
Headers
x-organization-idUUIDrequiredOrganization scope
Path parameters
entityTypestringrequiredType of entity (event, entity, template, etc.)
entityIdstringrequiredID of the entity
Query parameters
actorIdstringFilter to actions by a specific user
actionstringFilter by action verb
startDatedatetimeStart of time range
endDatedatetimeEnd of time range
limitintegerDefault 20, max 100
offsetintegerDefault 0
Responses
200Audit log entries for the entity, chronologically ordered404Entity not foundLogs by actor
/api/v1/audit-logs/actor/{actorId}All audit log entries for a specific user. Useful for compliance reviews — “what did this user do this week”.
Headers
x-organization-idUUIDrequiredOrganization scope
Path parameters
actorIdstringrequiredUser ID
Query parameters
entityTypestringFilter by entity type
entityIdstringFilter to a specific entity
actionstringFilter by action verb
startDatedatetimeStart of time range
endDatedatetimeEnd of time range
limitintegerDefault 20, max 100
offsetintegerDefault 0
Responses
200Audit log entries for the actorUse date ranges for compliance reports
startDate and endDate to scope the query. Unbounded queries against organizations with high write volume can be slow — the index is optimized for time-bounded slices.