Skip to content
Klozzo API
OpenAPI Postman

Reference

Audit Log

Read-only timeline of mutations across the workspace. Every create/update/ delete on auditable models (contacts, tags, smart-lists, etc.) appends one row containing the actor (user_id), action verb, subject reference, and a diff of old/new values.

List audit log entries

Lists the audit log entries of the token's location, newest first. All filters are optional and additive.

GET /api/audit-logs

Scoped to the location the token belongs to. Entries from another location are never returned, and there is no parameter that widens it.

Everybody in the location can read it, on purpose — including viewer. The log exists to settle an argument between two people, and a record only one of them can open settles nothing.

Query parameters

  • subject_type string

    Eloquent class FQN of the audited model.

    Example: App\Models\Contact

  • subject_id integer

    Audited record ID.

    Example: 42

  • user_id integer

    Filter by actor.

    Example: 7

  • action string

    One of created, updated, deleted, bulk_deleted, owner_changed.

    Example: updated

  • from string

    date Lower bound on created_at (inclusive, ISO-8601).

    Example: 2026-06-01

  • to string

    date Upper bound on created_at (inclusive, ISO-8601).

    Example: 2026-06-05

  • per_page integer

    Rows per page. Default 50, maximum 200. See Lists, paging and filters.

    Example: 50

Body parameters

  • subject_type string

    Must not be greater than 255 characters.

    Example: b

  • subject_id integer

    Example: 16

  • user_id integer

    Example: 16

  • action string

    Must not be greater than 50 characters.

    Example: n

  • from string

    Must be a valid date.

    Example: 2026-08-26T02:19:50

  • to string

    Must be a valid date.

    Example: 2026-08-26T02:19:50

  • per_page integer

    Must be at least 1. Must not be greater than 200.

    Example: 7

curl --request GET \
    --get "https://klozzo.com/api/audit-logs?subject_type=App%5CModels%5CContact&subject_id=42&user_id=7&action=updated&from=2026-06-01&to=2026-06-05&per_page=50" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"subject_type\": \"b\",
    \"subject_id\": 16,
    \"user_id\": 16,
    \"action\": \"n\",
    \"from\": \"2026-08-26T02:19:50\",
    \"to\": \"2026-08-26T02:19:50\",
    \"per_page\": 7
}"
{
    "data": [
        {
            "id": null,
            "user_id": 3783,
            "location_id": null,
            "action": "deleted",
            "subject_type": "App\\Models\\Contact",
            "subject_id": 23891,
            "old_values": null,
            "new_values": {
                "first_name": "Rowan"
            },
            "ip_address": "197.119.215.250",
            "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/5340 (KHTML, like Gecko) Chrome/40.0.882.0 Mobile Safari/5340",
            "created_at": null
        },
        {
            "id": null,
            "user_id": 3785,
            "location_id": null,
            "action": "created",
            "subject_type": "App\\Models\\Contact",
            "subject_id": 23892,
            "old_values": null,
            "new_values": {
                "first_name": "Nelson"
            },
            "ip_address": "109.9.175.184",
            "user_agent": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_7_5 rv:4.0; en-US) AppleWebKit/535.23.7 (KHTML, like Gecko) Version/5.0 Safari/535.23.7",
            "created_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 50,
        "to": 2,
        "total": 2
    }
}
  • data object[]

    • id string

    • user_id integer

    • location_id string

    • action string

    • subject_type string

    • subject_id integer

    • old_values string

    • new_values object

      • first_name string

    • ip_address string

    • user_agent string

    • created_at string

  • links object

    • first string

    • last string

    • prev string

    • next string

  • meta object

    • current_page integer

    • from integer

    • last_page integer

    • links object[]

      • url string

      • label string

      • page string

      • active boolean

    • path string

    • per_page integer

    • to integer

    • total integer