Create an audit event
Records a custom audit log event for the authenticated workspace. Platform-API callers must be on an enterprise plan.
Authorizations
Body
Audit event to create
Context carries event-specific metadata as arbitrary key/value pairs.
EventDescription is a human-readable description of the event (max 500 characters).
500"Client viewed the dashboard"
CustomEventType is the event type to record (max 100 characters).
100"customEvent"
ActorID is the ID of the actor the event is attributed to.
"a1b2c3d4-e5f6-4711-8899-aabbccddeeff"
CompanyID is the company the actor belongs to, when the actor is a client user.
"c1d2e3f4-a5b6-4712-9988-ffeeddccbbaa"
LastActivityAt is the frontend's latest evidence of user activity for the session this event pertains to. On sessionEnded it stamps the entry's CreatedAt so the inactivity timer reports the actual moment the user became idle; on sessionStarted it carries the prior session's last-activity forward so the orphan backfill can stamp the synthetic sessionEnded accurately.
"2024-02-20T14:05:00Z"
Response
Created
ActorID is the ID of the user or system actor that triggered the event.
"a1b2c3d4-e5f6-4711-8899-aabbccddeeff"
ActorRole is the normalized role of the actor (e.g. "admin", "staff"). Internal-only.
"admin"
ActorType identifies whether the actor is an internal user or a client user.
internalUser, clientUser "internalUser"
APIKeyRef references the API key used for platform-API-sourced events. Internal-only.
"key_01HZX8K9P2"
AutomationID is the ID of the automation that triggered the event, when applicable.
"auto_01HZX8K9P2"
CompanyID is the ID of the company the actor belongs to, when the actor is a client user.
"c1d2e3f4-a5b6-4712-9988-ffeeddccbbaa"
Context carries event-specific metadata as arbitrary key/value pairs.
EventDescription is a human-readable description of the event.
"Client created"
"Updated billing address"
"Acme Corp"
EventTextPrefix / EventTextEntity / EventDetails are computed at read time by FormatEvent (see event_formatter.go) and exposed to the internal audit log page and the CSV export so both render identical text. Not persisted, and tagged omitexternal — these are UI helpers, not part of the public platform API contract.
Prefix and Entity intentionally omit omitempty: FormatEvent sets one
of them to "" on purpose for events like messageSent (entity is the
linked label, no prefix). With omitempty the empty string would drop
from the wire, the client would ?? back to eventDescription, and the
row would render as Message sent "Message sent" instead of a single
linked Message sent.
"Client"
EventType categorizes the event.
userLoggedIn, userLoggedOut, userLoginSucceeded, userLoginFailed, passwordReset, passwordChanged, googleDelinked, magicLinkSent, workspaceMfaEnabled, workspaceMfaDisabled, clientCreated, clientActivated, clientUpdated, clientDeleted, clientInvited, companyCreated, companyUpdated, companyCustomFieldsUpdated, companyDeleted, clientCustomFieldsUpdated, fileCreated, fileUpdated, fileDeleted, folderCreated, folderUpdated, folderDeleted, linkCreated, linkUpdated, linkDeleted, invoiceCreated, invoiceInitiated, invoicePaid, invoiceUpdated, invoiceDeleted, invoiceVoided, invoiceDownloaded, refundRequested, refundSucceeded, refundFailed, messageSent, messageChannelCreated, messageChannelDeleted, taskCreated, taskUpdated, taskDeleted, taskArchived, taskCompleted, paymentSucceeded, paymentFailed, subscriptionCreated, subscriptionCancelled, priceCreated, productCreated, productUpdated, contractRequested, contractCompleted, contractDownloaded, fileDownloaded, fileBatchDownloaded, fileBatchDeleted, noteCreated, noteUpdated, noteDeleted, internalUserCreated, internalUserDeleted, internalUserAccessLevelChanged, internalUserClientVisibilitySet, apiKeyCreated, apiKeyDeleted, formCreated, formEdited, formAssigned, formResponseCompleted, customEvent, sessionStarted, sessionEnded "clientCreated"
IP is the client IP address that triggered the event.
"203.0.113.42"
IsSuperAdminTriggered is set when the event originated from an Assembly super-admin proxy session (the admin signed in via /admin and is acting on behalf of a portal user). Hidden from external / platform-API consumers via omitexternal.
false
Source indicates where the event originated from.
web, platform, automation, system "web"
UserAgent is the User-Agent header of the request that triggered the event. UserAgent and IP are intentionally exposed to external consumers (no omitexternal tag). These fields contain PII; consumers are responsible for GDPR/CCPA compliance
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"