> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cisisk.projects.bernardopinto.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Audit Logs

> View system audit logs

Every meaningful action (create, update, delete, login, logout) is logged automatically. All endpoints require level 0 permission and a Bearer token.

***

## List logs

```
GET /api/v1/audit-logs
```

| Query param | Type    | Default | Max |
| ----------- | ------- | ------- | --- |
| limit       | integer | 100     | 500 |
| offset      | integer | 0       | —   |

```json theme={null}
{
  "success": true,
  "message": "5 log(s) found",
  "data": [
    {
      "uuid": "990e8400-e29b-41d4-a716-446655440004",
      "user_uuid": "550e8400-e29b-41d4-a716-446655440000",
      "action": "user.created",
      "entity_type": "user",
      "entity_uuid": "660e8400-e29b-41d4-a716-446655440001",
      "payload": {
        "username": "janesmith"
      },
      "ip": "::1",
      "user_agent": "curl/8.0",
      "created_at": "2026-06-28T12:00:00.000Z"
    }
  ],
  "metadata": {}
}
```

***

## List logs for a user

```
GET /api/v1/audit-logs/by-user/{userUuid}
```

| Query param | Type    | Default | Max |
| ----------- | ------- | ------- | --- |
| limit       | integer | 50      | 200 |

```json theme={null}
{
  "success": true,
  "message": "3 log(s) found for user",
  "data": [
    {
      "uuid": "990e8400-e29b-41d4-a716-446655440004",
      "user_uuid": "550e8400-e29b-41d4-a716-446655440000",
      "action": "auth.login",
      "entity_type": "user",
      "entity_uuid": "550e8400-e29b-41d4-a716-446655440000",
      "payload": null,
      "ip": "::1",
      "user_agent": "curl/8.0",
      "created_at": "2026-06-28T12:00:00.000Z"
    }
  ],
  "metadata": {}
}
```
