Skip to content

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

GET/api/v1/audit-logs

Filtered query across all audit logs in the organization.

Headers

  • x-organization-idUUIDrequired

    Organization scope

Query parameters

  • entityTypestring

    Filter by entity type (e.g. event, entity, template)

  • entityIdstring

    Filter to a specific entity ID

  • actorIdstring

    Filter by acting user ID

  • actionstring

    Filter by action verb (e.g. created, updated, cancelled)

  • startDatedatetime

    Logs on or after this time

  • endDatedatetime

    Logs on or before this time

  • limitinteger

    Default 20, max 100

  • offsetinteger

    Default 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
}
401Unauthorized

Logs by entity

GET/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-idUUIDrequired

    Organization scope

Path parameters

  • entityTypestringrequired

    Type of entity (event, entity, template, etc.)

  • entityIdstringrequired

    ID of the entity

Query parameters

  • actorIdstring

    Filter to actions by a specific user

  • actionstring

    Filter by action verb

  • startDatedatetime

    Start of time range

  • endDatedatetime

    End of time range

  • limitinteger

    Default 20, max 100

  • offsetinteger

    Default 0

Responses

200Audit log entries for the entity, chronologically ordered
404Entity not found

Logs by actor

GET/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-idUUIDrequired

    Organization scope

Path parameters

  • actorIdstringrequired

    User ID

Query parameters

  • entityTypestring

    Filter by entity type

  • entityIdstring

    Filter to a specific entity

  • actionstring

    Filter by action verb

  • startDatedatetime

    Start of time range

  • endDatedatetime

    End of time range

  • limitinteger

    Default 20, max 100

  • offsetinteger

    Default 0

Responses

200Audit log entries for the actor

Use date ranges for compliance reports

For SOC 2 reviews, HIPAA audits, or internal compliance reports, always include 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.