Skip to content

List audit log entries

GET
/api/v1/audit-logs
curl --request GET \
--url 'https://external-api.moja-ai.com/api/v1/audit-logs?limit=20&offset=0' \
--header 'X-API-Key: <X-API-Key>'
entity_type
Any of:
string

Partial match on entity_type (SQL LIKE %value%)

entity_id
Any of:
string

Filter by entity id

user_id
Any of:
string

Filter by acting user id

action
Any of:
string

Create | update | delete

q
Any of:
string

Search in changes JSON, route, entity_type, user_email, user_id, entity_id, entity_name

from
Any of:
string format: date-time
to
Any of:
string format: date-time
limit
Limit
integer
default: 20 >= 1 <= 200
offset
Offset
integer
0
X-API-Key
Any of:
string

Successful Response

Media typeapplication/json
AuditLogListResponse
object
data
required
Data
Array<object>
AuditLogItem
object
id
required
Id
string
org_id
required
Org Id
string
user_id
Any of:
string
user_email
Any of:
string
impersonated_by
Any of:
string
user_role
Any of:
string
is_internal
Any of:
boolean
api_key_prefix
Any of:
string
entity_type
required
Entity Type
string
entity_id
Any of:
string
entity_name
Any of:
string
action
required
Action
string
route
required
Route
string
method
required
Method
string
status_code
required
Status Code
integer
changes
Any of:
object
key
additional properties
any
trace_id
Any of:
string
client_ip
Any of:
string
user_agent
Any of:
string
created_at
required
Created At
string format: date-time
total
required
Total
integer
limit
required
Limit
integer
>= 1 <= 500
offset
required
Offset
integer
Examplegenerated
{
"data": [
{
"id": "example",
"org_id": "example",
"user_id": "example",
"user_email": "example",
"impersonated_by": "example",
"user_role": "example",
"is_internal": true,
"api_key_prefix": "example",
"entity_type": "example",
"entity_id": "example",
"entity_name": "example",
"action": "example",
"route": "example",
"method": "example",
"status_code": 1,
"changes": {},
"trace_id": "example",
"client_ip": "example",
"user_agent": "example",
"created_at": "2026-04-15T12:00:00Z"
}
],
"total": 1,
"limit": 1,
"offset": 1
}

Bad Request

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Unauthorized

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Not Found

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Conflict

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}

Too Many Requests

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}