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
}
}
| Field | Required | Description |
|---|---|---|
app | yes | Source application (lettings, concierge, xadmin). |
actorId | yes | Stable identifier of the actor performing the action. |
entityType | yes | Polymorphic entity kind (BOOKING, PROPERTY, USER). |
entityId | yes | Stable identifier of the entity. |
action | yes | Verb describing the action (CREATED, APPROVED, CANCELLED). |
metadata | no | Free-form structured context. |
occurredAt | no | ISO 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
| Endpoint | Scope |
|---|---|
POST /api/v1/audit/log | audit:write |