docs/main/administration-guide/comply/embedded-json-audit-log-schema.mdx
The audit log JSON schema functions as a standardized blueprint or schematic that consistently defines how a single event should appear when being written to the audit log, including: field names, data types, objects, and structure.
An outline of the JSON audit logging schema is provided below. See the JSON data model for additional details.
{
"timestamp": "", // Event time
"status": "", // Success or failure of the audited event or activity
"event_name": "", // Logged event name
"error": { // Error if status = fail
"status_code": 0,
"description": ""
},
"actor": { // The user performing the action
"user_id": "" // Unique identifier of the event user
"session_id": "" // Unique session identifier of the event user
"client": "" // User agent of the client/platform in use by the event user
"ip_address": "" // IPv4/IPv6 IP address of the event user
},
"event": { // Event-specific data
"parameters": {} // Map containing parameters of the audited event or activity
"prior_state": {} // Pre-event state of the object
"resulting_state": {} // Post-event state of the object
"object_type": "" // Object targeted by the event or activity
},
"meta": {
"api_path": "", // API endpoint interacted with for event or activity
"cluster_id": "" // Unique identifier of the cluster in use by the event user
"non_channel_member_access": false // true if user accessed channel content without being a member (v11.5.0+)
}
}
{
"timestamp": "2022-08-17 20:37:52.846 +01:00",
"event_name": "updatePreferences",
"status": "success",
"actor": {
"user_id": "aw8ehkwaziytzry1qqxi9tsqwh",
"session_id": "kth3jyadc3b1p84kbz6y3o75na",
"client": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6 Safari/605.1.15",
"ip_address": "192.168.0.169"
},
"event": {
"parameters": {},
"prior_state": {},
"resulting_state": {},
"object_type": ""
},
"meta": {
"api_path": "/api/v4/users/aw8ehkwaziytzry1qqxi9tsqwh/preferences",
"cluster_id": "8dxdbfx6fpdwtki1z6n8whtkho"
},
"error": {}
}
{
"timestamp": "2025-04-30 16:17:44.207 Z",
"event_name": "createPost",
"status": "success",
"actor": {
"user_id": "i764hi6h5bbz8p1955ed4ahj6y",
"session_id": "t7894ft76igtpb788nkkej1yoy",
"client": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36",
"ip_address": "172.19.0.8"
},
"event": {
"parameters": {
"post": {
"channel_id": "pfis7ycuy78o7m3zebajmxqeuo",
"user_id": "i764hi6h5bbz8p1955ed4ahj6y",
"message": "Sample post content"
}
},
"prior_state": {},
"resulting_state": {
"channel_id": "pfis7ycuy78o7m3zebajmxqeuo",
"create_at": 1746029864145,
"id": "xpw97hf6kfncirzhqisb5sym7e",
"user_id": "i764hi6h5bbz8p1955ed4ahj6y"
},
"object_type": "post"
},
"meta": {
"api_path": "/api/v4/posts",
"cluster_id": "i5twhjm3ainatcifiy3oksshae"
},
"error": {}
}
{
"timestamp": "2025-04-30 16:18:30.803 Z",
"event_name": "patchConfig",
"status": "success",
"actor": {
"user_id": "i764hi6h5bbz8p1955ed4ahj6y",
"session_id": "t7894ft76igtpb788nkkej1yoy",
"client": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36",
"ip_address": "172.19.0.8"
},
"event": {
"parameters": {},
"prior_state": {
"config_diffs": [
{
"actual_val": false,
"base_val": true,
"path": "MetricsSettings.EnableClientMetrics"
}
]
},
"resulting_state": {},
"object_type": "config"
},
"meta": {
"api_path": "/api/v4/config/patch",
"cluster_id": "i5twhjm3ainatcifiy3oksshae"
},
"error": {}
}
The following tables list the comprehensive audit event types (event_name values) that are captured in Mattermost audit logs:
From Mattermost v11.5.0, audit log entries for posts and content access events include a non_channel_member_access field in the meta object. When a user accesses posts or content in a channel they are not a member of, this field is set to true. Admins can use this indicator to identify and review unauthorized or unexpected content access in their audit logs.
Recap events include a channel_id in the event parameters, indicating which channel's content was accessed during the recap operation. Use this field when reviewing audit logs for compliance or access monitoring.
This comprehensive list includes all audit events captured by Mattermost across all major system operations. Additional events may be logged depending on your Mattermost version, enabled features, and configuration settings. Enterprise and Enterprise Advanced features may generate additional audit events.
</Note>