PlatformXeDocs
Get API Key

Audit Log

Federated audit event dispatch for cross-app activity tracking.

The Audit Log service ingests audit events from your applications into PlatformXe's federated trace pipeline. Events are accepted asynchronously (HTTP 202) and durably recorded by the inngest worker, surfaced in the audit dashboard for cross-app forensics.

When to use

Use the Audit Log to record any state-changing action that needs an immutable forensic trail:

  • Booking confirmations, cancellations, refunds
  • Permission grants, role changes, override approvals
  • Property approvals, suspensions, archive actions
  • Payment captures, settlements, payouts
  • Manual reviewer transitions on fraud cases

Each event carries a polymorphic entityType + entityId plus a verb-style action, so a single audit query can stitch together activity across Lettings, Concierge, xAdmin and any future app — without each consuming app having to query its own database.

Endpoint

POST /api/v1/audit/log

Request shape

{
  "app": "lettings",
  "actorId": "user_123",
  "entityType": "BOOKING",
  "entityId": "bk_abc",
  "action": "CONFIRMED",
  "metadata": {
    "propertyId": "prop_xyz",
    "amount": 50000
  }
}
FieldRequiredDescription
appyesSource application (lettings, concierge, xadmin).
actorIdyesStable identifier of the actor performing the action.
entityTypeyesPolymorphic entity kind (BOOKING, PROPERTY, USER).
entityIdyesStable identifier of the entity.
actionyesVerb describing the action (CREATED, APPROVED, CANCELLED).
metadatanoFree-form structured context.
occurredAtnoISO 8601 timestamp. Defaults to server-side new Date().

SDK usage

See the SDK reference for typed examples in TypeScript, Python, and Go.

Delivery semantics

Events are accepted with HTTP 202 and processed asynchronously. PlatformXe never returns the persisted event from this endpoint — fire-and-forget is the contract. To verify an event landed, query the federated audit dashboard or subscribe to audit.log.recorded events via Event Subscriptions.

Scopes required

EndpointScope
POST /api/v1/audit/logaudit:write