Skip to main content
GET
/
v1
/
audit-logs
List Audit Logs
curl --request GET \
  --url https://api.example.com/v1/audit-logs
{
  "data": {
    "logs": [
      {
        "id": "<string>",
        "timestamp": "<string>",
        "user": {
          "id": "<string>",
          "email": "<string>",
          "type": "<string>"
        },
        "action": "<string>",
        "resource_type": "<string>",
        "resource_id": "<string>",
        "details": {},
        "ip_address": "<string>",
        "user_agent": "<string>"
      }
    ]
  },
  "meta": {
    "page": 123,
    "per_page": 123,
    "total": 123
  }
}
Returns a paginated, filterable log of every write action performed in the workspace — API calls, user actions, and automations. Essential for SOC 2, ISO 27001, and internal forensics.
This endpoint requires an admin API key. Standard API keys receive a 403 insufficient_permissions response.

Request

Query Parameters

page
integer
default:"1"
Page number for pagination
per_page
integer
default:"50"
Entries per page (max: 200)
action
string
Filter by action: create, update, delete, login, api_access
user_id
string
Filter by the UUID of the acting user (human user only — API keys are filtered separately)
resource_type
string
Filter by resource type: contacts, companies, deals, tasks, notes, lists, campaigns, webhooks, api_keys, users
from_date
string
Only entries on or after this ISO 8601 date/timestamp
to_date
string
Only entries on or before this ISO 8601 date/timestamp

Headers

Authorization: Bearer wbk_your_admin_key_here
Audit logs are retained for 365 days and are immutable once written.

Response

data
object
meta
object
curl "https://data.leadlex.com/functions/v1/api-gateway/v1/audit-logs?action=delete&from_date=2026-04-01&per_page=100" \
  -H "Authorization: Bearer wbk_your_admin_key_here"

Example Response

{
  "data": {
    "logs": [
      {
        "id": "log_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "timestamp": "2026-04-17T14:23:05Z",
        "user": {
          "id": null,
          "email": "api-key:wbk_abc12345",
          "type": "api_key"
        },
        "action": "delete",
        "resource_type": "contacts",
        "resource_id": "123e4567-e89b-12d3-a456-426614174000",
        "details": {
          "method": "DELETE",
          "path": "/v1/contacts/123e4567-e89b-12d3-a456-426614174000",
          "request_id": "req_9f8e7d6c5b4a",
          "status_code": 200
        },
        "ip_address": "203.0.113.45",
        "user_agent": "MyApp/1.0 (python-requests/2.31)"
      }
    ]
  },
  "meta": {
    "page": 1,
    "per_page": 100,
    "total": 1247
  }
}

Errors

StatusCodeDescription
401invalid_keyInvalid or expired API key
403admin_key_requiredThis endpoint requires an admin-scoped API key
400invalid_date_rangefrom_date is after to_date
429rate_limitedRate limit exceeded