---
title: "Get Audit Log"
method: POST
path: "/v2/Account/AuditLog"
tags: ["Account"]
---

# Get Audit Log

`POST /v2/Account/AuditLog`

Retrieves the audit log.

## Request body

- AuditLogAPIRequest
  - `from` string, date-time — The start date and time of the audit log query range (UTC).
  - `to` string, date-time — The end date and time of the audit log query range (UTC).
  - `eventType` integer — The type of event recorded in the audit log. `1 - LoginAttempt` `2 - LoginSuccessful` `10 - PublishPearl` `11 - PearlStatus` `18 - TransferPearl` `19 - DeletePearl` `30 - CreateAPIKey` `31 - DeleteAPIKey` `40 - PurchaseAgents` `41 - DeleteAgent` `50 - SetBillingDetails` `51 - SetPaymentMethod` `52 - SetSubscription` `59 - CancelSubscription` `60 - PurchaseCredits` `61 - SetAutoRecharge` `70 - InviteUser` `71 - UserJoin` `72 - InvitationCanceled` `73 - UpdateUserRole` `74 - UpdateAccountInformations` `75 - RemoveUserFromTheAccount` `76 - UserLeftAccount` `80 - UpdateSessionTTL` `81 - Set2FA`
  - `userId` string, nullable — Optional filter by user ID. If not provided, logs for all users are returned.

## Response `200`

The list of audit log.

- AuditLogView[]
  - `timestamp` string, date-time
  - `eventType` integer — The type of event recorded in the audit log. `1 - LoginAttempt` `2 - LoginSuccessful` `10 - PublishPearl` `11 - PearlStatus` `18 - TransferPearl` `19 - DeletePearl` `30 - CreateAPIKey` `31 - DeleteAPIKey` `40 - PurchaseAgents` `41 - DeleteAgent` `50 - SetBillingDetails` `51 - SetPaymentMethod` `52 - SetSubscription` `59 - CancelSubscription` `60 - PurchaseCredits` `61 - SetAutoRecharge` `70 - InviteUser` `71 - UserJoin` `72 - InvitationCanceled` `73 - UpdateUserRole` `74 - UpdateAccountInformations` `75 - RemoveUserFromTheAccount` `76 - UserLeftAccount` `80 - UpdateSessionTTL` `81 - Set2FA`
  - `user` AuditLogUserInfo
    - `id` string, nullable — The unique identifier of the user.
    - `name` string, nullable — The display name of the user.
    - `type` integer — The type/role of the user who triggered the audit log event. `1 - Platform` `3 - APIKey` `90 - Support` `99 - System`
  - `additionalData` object, nullable

## Other responses

- `400` — Error

---

[API](https://skmtc.net/nlpearl/apis/nlpearl-client-api.md) · [All operations](https://skmtc.net/nlpearl/apis/nlpearl-client-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nlpearl/nlpearl-client-api/versions/52d64fc5d6e9/schema)
