---
updatedAt: 2026-08-26T17:36:42.000Z
agentTools:
  projectIndex: https://docs.mesh.complyadvantage.com/llms.txt
---

# Get audit log for a user

Returns the audit log trail for a user.


You need the "View users" permission to use this endpoint.

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "audit_AccountReference": {
        "properties": {
          "identifier": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "identifier"
        ],
        "type": "object"
      },
      "audit_AccountWithRolesInfo": {
        "properties": {
          "added_role_identifiers": {
            "items": {
              "$ref": "#/components/schemas/audit_RoleReference"
            },
            "type": "array",
            "uniqueItems": true
          },
          "identifier": {
            "format": "uuid",
            "type": "string"
          },
          "removed_role_identifiers": {
            "items": {
              "$ref": "#/components/schemas/audit_RoleReference"
            },
            "type": "array",
            "uniqueItems": true
          }
        },
        "required": [
          "added_role_identifiers",
          "identifier",
          "removed_role_identifiers"
        ],
        "type": "object"
      },
      "audit_ActionedBy": {
        "properties": {
          "identifier": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "type": {
            "enum": [
              "SYSTEM",
              "USER"
            ],
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "audit_ClientReference": {
        "properties": {
          "identifier": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "identifier"
        ],
        "type": "object"
      },
      "audit_ProblemDetailErrorResponse": {
        "additionalProperties": true,
        "properties": {
          "detail": {
            "nullable": true,
            "type": "string"
          },
          "identifier": {
            "format": "uuid",
            "type": "string"
          },
          "instance": {
            "format": "uri",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          },
          "type": {
            "format": "uri",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "identifier",
          "timestamp"
        ],
        "type": "object"
      },
      "audit_RoleReference": {
        "properties": {
          "identifier": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "identifier"
        ],
        "type": "object"
      },
      "audit_UserAccountAssignedDetailV2": {
        "properties": {
          "account": {
            "$ref": "#/components/schemas/audit_AccountReference"
          },
          "user": {
            "$ref": "#/components/schemas/audit_UserReference"
          }
        },
        "required": [
          "account",
          "user"
        ],
        "type": "object"
      },
      "audit_UserAccountAssignedLogV2": {
        "properties": {
          "actioned_by": {
            "$ref": "#/components/schemas/audit_ActionedBy"
          },
          "detail": {
            "$ref": "#/components/schemas/audit_UserAccountAssignedDetailV2"
          },
          "grouping_key": {
            "nullable": true,
            "type": "string"
          },
          "identifier": {
            "format": "uuid",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "enum": [
              "USER_ACCOUNT_ASSIGNED"
            ],
            "type": "string"
          }
        },
        "required": [
          "actioned_by",
          "detail",
          "identifier",
          "occurred_at",
          "type"
        ],
        "type": "object"
      },
      "audit_UserAccountRemovedDetailV2": {
        "properties": {
          "account": {
            "$ref": "#/components/schemas/audit_AccountReference"
          },
          "user": {
            "$ref": "#/components/schemas/audit_UserReference"
          }
        },
        "required": [
          "account",
          "user"
        ],
        "type": "object"
      },
      "audit_UserAccountRemovedLogV2": {
        "properties": {
          "actioned_by": {
            "$ref": "#/components/schemas/audit_ActionedBy"
          },
          "detail": {
            "$ref": "#/components/schemas/audit_UserAccountRemovedDetailV2"
          },
          "grouping_key": {
            "nullable": true,
            "type": "string"
          },
          "identifier": {
            "format": "uuid",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "enum": [
              "USER_ACCOUNT_REMOVED"
            ],
            "type": "string"
          }
        },
        "required": [
          "actioned_by",
          "detail",
          "identifier",
          "occurred_at",
          "type"
        ],
        "type": "object"
      },
      "audit_UserActivatedDetailV2": {
        "properties": {
          "user": {
            "$ref": "#/components/schemas/audit_UserReference"
          }
        },
        "required": [
          "user"
        ],
        "type": "object"
      },
      "audit_UserActivatedLogV2": {
        "properties": {
          "actioned_by": {
            "$ref": "#/components/schemas/audit_ActionedBy"
          },
          "detail": {
            "$ref": "#/components/schemas/audit_UserActivatedDetailV2"
          },
          "grouping_key": {
            "nullable": true,
            "type": "string"
          },
          "identifier": {
            "format": "uuid",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "enum": [
              "USER_ACTIVATED"
            ],
            "type": "string"
          }
        },
        "required": [
          "actioned_by",
          "detail",
          "identifier",
          "occurred_at",
          "type"
        ],
        "type": "object"
      },
      "audit_UserAuditLogsPageV2": {
        "properties": {
          "audit_logs": {
            "items": {
              "discriminator": {
                "mapping": {
                  "USER_ACCOUNT_ASSIGNED": "#/components/schemas/audit_UserAccountAssignedLogV2",
                  "USER_ACCOUNT_REMOVED": "#/components/schemas/audit_UserAccountRemovedLogV2",
                  "USER_ACTIVATED": "#/components/schemas/audit_UserActivatedLogV2",
                  "USER_CREATED": "#/components/schemas/audit_UserCreatedLogV2",
                  "USER_DEACTIVATED": "#/components/schemas/audit_UserDeactivatedLogV2",
                  "USER_NAME_UPDATED": "#/components/schemas/audit_UserNameUpdatedLogV2",
                  "USER_ROLES_UPDATED": "#/components/schemas/audit_UserRolesUpdatedLogV2"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/audit_UserCreatedLogV2"
                },
                {
                  "$ref": "#/components/schemas/audit_UserActivatedLogV2"
                },
                {
                  "$ref": "#/components/schemas/audit_UserDeactivatedLogV2"
                },
                {
                  "$ref": "#/components/schemas/audit_UserNameUpdatedLogV2"
                },
                {
                  "$ref": "#/components/schemas/audit_UserAccountAssignedLogV2"
                },
                {
                  "$ref": "#/components/schemas/audit_UserAccountRemovedLogV2"
                },
                {
                  "$ref": "#/components/schemas/audit_UserRolesUpdatedLogV2"
                }
              ],
              "type": "object"
            },
            "type": "array"
          },
          "first": {
            "description": "The URL path to the first page.",
            "example": "/v1/resource?page_number=1",
            "type": "string"
          },
          "next": {
            "description": "The URL path to the next page.",
            "example": "/v1/resource?page_number=4",
            "nullable": true,
            "type": "string"
          },
          "prev": {
            "description": "The URL path to the previous page.",
            "example": "/v1/resource?page_number=2",
            "nullable": true,
            "type": "string"
          },
          "self": {
            "description": "The URL path to the current page.",
            "example": "/v1/resource?page_number=3",
            "type": "string"
          },
          "total_count": {
            "description": "Total number of items.",
            "example": 60,
            "format": "int64",
            "nullable": true,
            "type": "integer"
          }
        },
        "required": [
          "audit_logs",
          "first",
          "self"
        ],
        "type": "object"
      },
      "audit_UserCreatedDetailV2": {
        "properties": {
          "client": {
            "$ref": "#/components/schemas/audit_ClientReference"
          },
          "user": {
            "$ref": "#/components/schemas/audit_UserReference"
          }
        },
        "required": [
          "client",
          "user"
        ],
        "type": "object"
      },
      "audit_UserCreatedLogV2": {
        "properties": {
          "actioned_by": {
            "$ref": "#/components/schemas/audit_ActionedBy"
          },
          "detail": {
            "$ref": "#/components/schemas/audit_UserCreatedDetailV2"
          },
          "grouping_key": {
            "nullable": true,
            "type": "string"
          },
          "identifier": {
            "format": "uuid",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "enum": [
              "USER_CREATED"
            ],
            "type": "string"
          }
        },
        "required": [
          "actioned_by",
          "detail",
          "identifier",
          "occurred_at",
          "type"
        ],
        "type": "object"
      },
      "audit_UserDeactivatedDetailV2": {
        "properties": {
          "user": {
            "$ref": "#/components/schemas/audit_UserReference"
          }
        },
        "required": [
          "user"
        ],
        "type": "object"
      },
      "audit_UserDeactivatedLogV2": {
        "properties": {
          "actioned_by": {
            "$ref": "#/components/schemas/audit_ActionedBy"
          },
          "detail": {
            "$ref": "#/components/schemas/audit_UserDeactivatedDetailV2"
          },
          "grouping_key": {
            "nullable": true,
            "type": "string"
          },
          "identifier": {
            "format": "uuid",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "enum": [
              "USER_DEACTIVATED"
            ],
            "type": "string"
          }
        },
        "required": [
          "actioned_by",
          "detail",
          "identifier",
          "occurred_at",
          "type"
        ],
        "type": "object"
      },
      "audit_UserNameUpdatedDetailV2": {
        "properties": {
          "user": {
            "$ref": "#/components/schemas/audit_UserWithNameInfo"
          }
        },
        "required": [
          "user"
        ],
        "type": "object"
      },
      "audit_UserNameUpdatedLogV2": {
        "properties": {
          "actioned_by": {
            "$ref": "#/components/schemas/audit_ActionedBy"
          },
          "detail": {
            "$ref": "#/components/schemas/audit_UserNameUpdatedDetailV2"
          },
          "grouping_key": {
            "nullable": true,
            "type": "string"
          },
          "identifier": {
            "format": "uuid",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "enum": [
              "USER_NAME_UPDATED"
            ],
            "type": "string"
          }
        },
        "required": [
          "actioned_by",
          "detail",
          "identifier",
          "occurred_at",
          "type"
        ],
        "type": "object"
      },
      "audit_UserReference": {
        "properties": {
          "identifier": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "identifier"
        ],
        "type": "object"
      },
      "audit_UserRolesUpdatedDetailV2": {
        "properties": {
          "account": {
            "$ref": "#/components/schemas/audit_AccountWithRolesInfo"
          },
          "user": {
            "$ref": "#/components/schemas/audit_UserReference"
          }
        },
        "required": [
          "account",
          "user"
        ],
        "type": "object"
      },
      "audit_UserRolesUpdatedLogV2": {
        "properties": {
          "actioned_by": {
            "$ref": "#/components/schemas/audit_ActionedBy"
          },
          "detail": {
            "$ref": "#/components/schemas/audit_UserRolesUpdatedDetailV2"
          },
          "grouping_key": {
            "nullable": true,
            "type": "string"
          },
          "identifier": {
            "format": "uuid",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "enum": [
              "USER_ROLES_UPDATED"
            ],
            "type": "string"
          }
        },
        "required": [
          "actioned_by",
          "detail",
          "identifier",
          "occurred_at",
          "type"
        ],
        "type": "object"
      },
      "audit_UserWithNameInfo": {
        "properties": {
          "identifier": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "previous_name": {
            "type": "string"
          }
        },
        "required": [
          "identifier",
          "name",
          "previous_name"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "description": "HTTP Bearer Token Authentication",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "title": "Mesh API",
    "version": "v2.0"
  },
  "openapi": "3.0.3",
  "paths": {
    "/v2/audit/users/{user_identifier}": {
      "get": {
        "description": "Returns the audit log trail for a user.\n\n\nYou need the \"View users\" permission to use this endpoint.",
        "operationId": "auditGetUserAuditTrailV2",
        "parameters": [
          {
            "description": "The user identifier",
            "example": "018d0dd4-9b7c-7537-aaac-13f2f48877af",
            "in": "path",
            "name": "user_identifier",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Page index",
            "example": 1,
            "in": "query",
            "name": "page_number",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "The size of the page to be returned",
            "example": 50,
            "in": "query",
            "name": "page_size",
            "schema": {
              "default": 50,
              "type": "integer"
            }
          },
          {
            "description": "Sorting criteria in the format (-)?[parameter]. Default sort order is ascending. for descending prefix the parameter with `-` Multiple sort criteria are supported.",
            "example": [
              "-occurred_at"
            ],
            "in": "query",
            "name": "sort",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/audit_UserAuditLogsPageV2"
                }
              }
            },
            "description": "Returns the audit log trail for the user."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/audit_ProblemDetailErrorResponse"
                }
              }
            },
            "description": "Invalid user uuid identifier."
          }
        },
        "summary": "Get audit log for a user",
        "tags": [
          "Audit"
        ]
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "servers": [
    {
      "description": "ComplyAdvantage Mesh API",
      "url": "https://api.mesh.complyadvantage.com"
    }
  ],
  "tags": [
    {
      "name": "Audit"
    }
  ]
}
```