Skip to main content

Audit log JSON schema

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+)
}
}

Audit log record examples

Update user preferences

{
"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": {}
}

Create post

{
"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": {}
}

System configuration change

{
"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": {}
}

Audit event types

The following tables list the comprehensive audit event types (event_name values) that are captured in Mattermost audit logs:

User Management Events

Event NameDescription
attachDeviceIdAttaching device IDs to user sessions
createUserCreating new user accounts
createUserAccessTokenCreating user access tokens
deleteUserDeleting user accounts
demoteUserToGuestDemoting users to guest status
disableUserAccessTokenDisabling user access tokens
enableUserAccessTokenEnabling user access tokens
followThreadByUserFollowing message threads by user
getUserAuditsRetrieving user audit logs
loginUser login events
logoutUser logout events
migrateAuthToLdapMigrating user authentication to LDAP
migrateAuthToSamlMigrating user authentication to SAML
patchUserUpdating user properties
promoteGuestToUserPromoting guest users to regular users
resetPasswordResetting user passwords
resetPasswordFailedAttemptsResetting password failed attempt counters
revokeUserAccessTokenRevoking user access tokens
sendPasswordResetSending password reset emails
sendVerificationEmailSending email verification messages
setDefaultProfileImageSetting default profile images
setProfileImageSetting custom profile images
setUnreadThreadByPostIdSetting unread thread status by post ID
switchAccountTypeSwitching account types
unfollowThreadByUserUnfollowing message threads by user
updatePasswordUpdating user passwords
updateReadStateAllThreadsByUserUpdating read state for all threads by user
updateReadStateThreadByUserUpdating read state for specific threads by user
updateUserUpdating user account information
updateUserActiveUpdating user active/inactive status
updateUserAuthUpdating user authentication settings
updateUserMfaUpdating user multi-factor authentication
updateUserRolesUpdating user roles and permissions
verifyUserEmailVerifying user email addresses
verifyUserEmailWithoutTokenVerifying user email without token

Channel Management Events

Event NameDescription
addChannelMemberAdding members to channels
convertGroupMessageToChannelConverting group messages to channels
createChannelCreating new channels
createChannelBookmarkCreating channel bookmarks
createDirectChannelCreating direct message channels
createGroupChannelCreating group message channels
deleteChannelDeleting channels
deleteChannelBookmarkDeleting channel bookmarks
moveChannelMoving channels between teams
patchChannelUpdating channel properties
patchChannelModerationsUpdating channel moderation settings
removeChannelMemberRemoving members from channels
restoreChannelRestoring deleted channels
setChannelMembersBulk set (replace) channel memberships
updateChannelUpdating channel information
updateChannelBookmarkUpdating channel bookmarks
updateChannelBookmarkSortOrderUpdating channel bookmark sort order
updateChannelMemberNotifyPropsUpdating channel member notification properties
updateChannelMemberRolesUpdating channel member roles
updateChannelMemberSchemeRolesUpdating channel member scheme roles
updateChannelPrivacyUpdating channel privacy settings
updateChannelSchemeUpdating channel permission schemes

Team Management Events

Event NameDescription
addTeamMemberAdding members to teams
addTeamMembersAdding multiple members to teams
addUserToTeamFromInviteAdding users to teams from invitations
createTeamCreating new teams
deleteTeamDeleting teams
invalidateAllEmailInvitesInvalidating all email invitations
inviteGuestsToChannelsInviting guests to channels
inviteUsersToTeamInviting users to teams
patchTeamUpdating team properties
regenerateTeamInviteIdRegenerating team invitation IDs
removeTeamIconRemoving team icons
removeTeamMemberRemoving members from teams
restoreTeamRestoring deleted teams
setTeamIconSetting team icons
updateTeamUpdating team information
updateTeamMemberRolesUpdating team member roles
updateTeamMemberSchemeRolesUpdating team member scheme roles
updateTeamPrivacyUpdating team privacy settings
updateTeamSchemeUpdating team permission schemes

Posts & Content Events

Event NameDescription
createPostCreating new posts
createSchedulePostCreating scheduled posts
deletePostDeleting posts
deleteScheduledPostDeleting scheduled posts
moveThreadMoving message threads
patchPostUpdating post properties
restorePostVersionRestoring previous post versions
saveIsPinnedPostSaving pinned post status
searchPostsSearching through posts
updatePostUpdating post content
updateScheduledPostUpdating scheduled posts

Authentication and Security Events

Event NameDescription
addLdapPrivateCertificateAdding LDAP private certificates
addLdapPublicCertificateAdding LDAP public certificates
addSamlIdpCertificateAdding SAML IDP certificates
addSamlPrivateCertificateAdding SAML private certificates
addSamlPublicCertificateAdding SAML public certificates
completeSamlCompleting SAML authentication
extendSessionExpiryExtending session expiry times
idMigrateLdapMigrating IDs to LDAP
linkLdapGroupLinking LDAP groups
removeLdapPrivateCertificateRemoving LDAP private certificates
removeLdapPublicCertificateRemoving LDAP public certificates
removeSamlIdpCertificateRemoving SAML IDP certificates
removeSamlPrivateCertificateRemoving SAML private certificates
removeSamlPublicCertificateRemoving SAML public certificates
revokeAllSessionsAllUsersRevoking all sessions for all users
revokeAllSessionsForUserRevoking all sessions for specific user
revokeSessionRevoking individual sessions
syncLdapSynchronizing LDAP data
unlinkLdapGroupUnlinking LDAP groups

System Administration Events

Event NameDescription
clearServerBusyClearing server busy status
completeOnboardingCompleting system onboarding
configReloadReloading system configuration
databaseRecycleRecycling database connections
downloadLogsDownloading system logs
getAppliedSchemaMigrationsGetting applied schema migrations
getAuditsRetrieving audit logs
getConfigGetting system configuration
getLogsGetting system logs
getOnboardingGetting onboarding status
invalidateCachesInvalidating system caches
migrateConfigMigrating configuration
patchConfigUpdating configuration properties
queryLogsQuerying system logs
restartServerRestarting server
setServerBusySetting server busy status
updateConfigUpdating system configuration
updateViewedProductNoticesUpdating viewed product notices
upgradeToEnterpriseUpgrading to Enterprise edition

File Management Events

Event NameDescription
createUploadCreating file uploads
getFileRetrieving files
getFileLinkGetting file links
uploadDataUploading data
uploadFileMultipartUploading multipart files
uploadFileMultipartLegacyUploading legacy multipart files
uploadFileSimpleUploading simple files

OAuth Applications Events

Event NameDescription
authorizeOAuthAppAuthorizing OAuth applications
authorizeOAuthPageOAuth authorization page access
completeOAuthCompleting OAuth flow
createOAuthAppCreating OAuth applications
deauthorizeOAuthAppDeauthorizing OAuth applications
deleteOAuthAppDeleting OAuth applications
getAccessTokenGetting OAuth access tokens
loginWithOAuthLogin with OAuth
mobileLoginWithOAuthMobile login with OAuth
regenerateOAuthAppSecretRegenerating OAuth app secrets
signupWithOAuthSignup with OAuth
updateOAuthAppUpdating OAuth applications

Webhooks Events

Event NameDescription
createIncomingHookCreating incoming webhooks
createOutgoingHookCreating outgoing webhooks
deleteIncomingHookDeleting incoming webhooks
deleteOutgoingHookDeleting outgoing webhooks
getIncomingHookGetting incoming webhooks
getOutgoingHookGetting outgoing webhooks
regenOutgoingHookTokenRegenerating outgoing webhook tokens
updateIncomingHookUpdating incoming webhooks
updateOutgoingHookUpdating outgoing webhooks

Slash Commands Events

Event NameDescription
createCommandCreating slash commands
deleteCommandDeleting slash commands
executeCommandExecuting slash commands
moveCommandMoving slash commands
regenCommandTokenRegenerating command tokens
updateCommandUpdating slash commands

Plugins Events

Event NameDescription
disablePluginDisabling plugins
enablePluginEnabling plugins
getFirstAdminVisitMarketplaceStatusGetting first admin visit marketplace status
installMarketplacePluginInstalling marketplace plugins
installPluginFromURLInstalling plugins from URL
removePluginRemoving plugins
setFirstAdminVisitMarketplaceStatusSetting first admin visit marketplace status
uploadPluginUploading plugins

Groups & LDAP Events

Event NameDescription
addGroupMembersAdding members to groups
addUserToGroupSyncablesAdding users to group syncables
createGroupCreating new groups
deleteGroupDeleting groups
deleteGroupMembersRemoving members from groups
linkGroupSyncableLinking group syncables to teams/channels
patchGroupUpdating group properties
patchGroupSyncableUpdating group syncable properties
restoreGroupRestoring deleted groups
unlinkGroupSyncableUnlinking group syncables from teams/channels

Remote Clusters Events

Event NameDescription
createRemoteClusterCreating remote cluster connections
deleteRemoteClusterDeleting remote cluster connections
generateRemoteClusterInviteGenerating invites for remote clusters
inviteRemoteClusterToChannelInviting remote clusters to channels
patchRemoteClusterUpdating remote cluster properties
remoteClusterAcceptInviteAccepting remote cluster invites
remoteClusterAcceptMessageAccepting messages from remote clusters
remoteUploadProfileImageUploading profile images from remote clusters
uninviteRemoteClusterToChannelRemoving remote cluster invites from channels
uploadRemoteDataUploading data from remote clusters

Data Retention Events

Event NameDescription
addChannelsToPolicyAdding channels to data retention policies
addTeamsToPolicyAdding teams to data retention policies
createPolicyCreating data retention policies
deletePolicyDeleting data retention policies
patchPolicyUpdating data retention policies
removeChannelsFromPolicyRemoving channels from data retention policies
removeTeamsFromPolicyRemoving teams from data retention policies

Jobs Events

Event NameDescription
cancelJobCanceling background jobs
createJobCreating new background jobs
jobServerJob server operations
updateJobStatusUpdating job status/progress

Licensing Events

Event NameDescription
addLicenseAdding enterprise licenses
localAddLicenseLocal license addition (cluster mode)
localRemoveLicenseLocal license removal (cluster mode)
removeLicenseRemoving enterprise licenses
requestTrialLicenseRequesting trial licenses

Bot Management Events

Event NameDescription
assignBotAssigning bots to users
convertBotToUserConverting bot accounts to user accounts
convertUserToBotConverting user accounts to bot accounts
createBotCreating new bot accounts
patchBotUpdating bot account properties
updateBotActiveUpdating bot account active/inactive status

Custom Emojis Events

Event NameDescription
createEmojiCreating custom emojis
deleteEmojiDeleting custom emojis

Branding Events

Event NameDescription
deleteBrandImageDeleting brand images
uploadBrandImageUploading brand images

Search Events

Event NameDescription
purgeBleveIndexesPurging Bleve search indexes
purgeElasticsearchIndexesPurging Elasticsearch search indexes

Roles and Schemes Events

Event NameDescription
createSchemeCreating permission schemes
deleteSchemeDeleting permission schemes
patchRoleUpdating role permissions
patchSchemeUpdating permission schemes

Preferences Events

Event NameDescription
deletePreferencesDeleting user preferences
updatePreferencesUpdating user preferences

Channel Categories Events

Event Name | Description
createCategoryForTeamForUser | Creating channel categories for users
deleteCategoryForTeamForUserDeleting channel categories for users
updateCategoriesForTeamForUserUpdating multiple channel categories for users
updateCategoryForTeamForUserUpdating single channel category for users
updateCategoryOrderForTeamForUserUpdating channel category order for users

Export and Import Events

Event NameDescription
bulkExportBulk data export operations
bulkImportBulk data import operations
deleteExportDeleting export files
deleteImportDeleting import files
generatePresignURLExportGenerating presigned URLs for exports
scheduleExportScheduling export operations

Access Control Events

Event NameDescription
applyIPFiltersApplying IP filtering rules
assignAccessPolicyAssigning access policies to users/teams
createAccessControlPolicyCreating new access control policies
deleteAccessControlPolicyDeleting access control policies
unassignAccessPolicyUnassigning access policies from users/teams
updateActiveStatusUpdating active status of access control policies

User Attributes Events

Event NameDescription
createCPAFieldCreating custom profile attribute fields
deleteCPAFieldDeleting custom profile attribute fields
patchCPAFieldUpdating custom profile attribute fields
patchCPAValuesUpdating custom profile attribute values

Outgoing OAuth Connections Events

Event NameDescription
createOutgoingOauthConnectionCreating outgoing OAuth connections
deleteOutgoingOAuthConnectionDeleting outgoing OAuth connections
updateOutgoingOAuthConnectionUpdating outgoing OAuth connections
validateOutgoingOAuthConnectionCredentialsValidating outgoing OAuth connection credentials

Terms of Service Events

Event NameDescription
createTermsOfServiceCreating terms of service
saveUserTermsOfServiceSaving user acceptance of terms of service

Compliance and Audit Events

Event NameDescription
addAuditLogCertificateAdding audit log certificates
createComplianceReportCreating compliance reports
downloadComplianceReportDownloading compliance reports
getComplianceReportGetting compliance reports
getComplianceReportsGetting multiple compliance reports
removeAuditLogCertificateRemoving audit log certificates

Local Operations Events

Event NameDescription
localCheckIntegrityLocal integrity checks
localCreateChannelLocal channel creation
localCreateCommandLocal command creation
localCreateIncomingHookLocal incoming webhook creation
localCreateTeamLocal team creation
localDeleteChannelLocal channel deletion
localDeletePostLocal post deletion
localDeleteTeamLocal team deletion
localDeleteUserLocal user deletion
localGetClientConfigLocal client configuration retrieval
localGetConfigLocal configuration retrieval
localInviteUsersToTeamLocal user invitation to teams
localMoveChannelLocal channel moving
localPatchChannelLocal channel patching
localPatchConfigLocal configuration patching
localPermanentDeleteAllUsersLocal permanent deletion of all users
localRemoveChannelMemberLocal channel member removal
localRestoreChannelLocal channel restoration
localUpdateChannelPrivacyLocal channel privacy update
localUpdateConfigLocal configuration update

AI Recap Events

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.

Event NameDescription
createRecapCreating channel recaps
deleteRecapDeleting channel recaps
getRecapRetrieving channel recaps
getRecapsRetrieving multiple channel recaps
markRecapAsReadMarking channel recaps as read
regenerateRecapRegenerating channel recaps

JSON data model

NameTypeDescription
timestampint64
Date/time when event or activity has taken place. |

Mattermost currently supports three log formats: plain, JSON, and | GELF. | | - Plain log format uses RFC3339 by default. | See the plain log format configuration documentation for supported options. | - JSON log format uses RFC3339 by default. | See the JSON log format configuration documentation for supported options. | | - GELF log format uses unixtime. | See the GELF log format configuration documentation for supported options. |

event_namestringUnique name and identifier of the event type taking place. See the audit event types section for a comprehensive list of all supported event names.
statusstringSuccess or failure of the audited event.
eventEventDataEvent parameters and object states.
actorEventActorUser involved with the event.
metaEventMetaRelated event metadata.
errorEventErrorThe resulting error if the status is in a failed state.

EventData

Field nameData typeDescription
parametersmapPayload and parameters being processed as part of the request.
prior_statemapPrior state of the entity being modified. null if there was no prior state.
resulting_statemapResulting entity after creating or modifying it.
object_typestringString representation of the entity type (e.g. post)

EventActor

Field nameData typeDescription
user_idstringUnique identifier of the event actor.
session_idstringUnique session identifier of the event actor.
clientstringUser agent of the client/platform in use by the event actor.
ip_addressstringIPv4/IPv6 IP address of the event actor.

EventMeta

Field nameData typeDescription
api_pathstringThe REST endpoint which caused the event.
cluster_idintegerCluster identifier.
non_channel_member_accessboolean(Optional) Available from v11.5.0. Set to true when a user | accesses posts or content in a channel they are not a member of.

EventError

Field nameData typeDescription
descriptionstring(Optional) Error description.
status_codeinteger(Optional) Error status code.