# 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 `GET /api/audit-logs` Lists the audit log entries of the token's location, newest first. All filters are optional and additive. **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. - `subject_id` (integer) — Audited record ID. - `user_id` (integer) — Filter by actor. - `action` (string) — One of `created`, `updated`, `deleted`, `bulk_deleted`, `owner_changed`. - `from` (string) — date Lower bound on `created_at` (inclusive, ISO-8601). - `to` (string) — date Upper bound on `created_at` (inclusive, ISO-8601). - `per_page` (integer) — Rows per page. Default 50, maximum 200. See [Lists, paging and filters](#lists-paging-and-filters). ### Body parameters - `subject_type` (string) — Must not be greater than 255 characters. - `subject_id` (integer) - `user_id` (integer) - `action` (string) — Must not be greater than 50 characters. - `from` (string) — Must be a valid date. - `to` (string) — Must be a valid date. - `per_page` (integer) — Must be at least 1. Must not be greater than 200. ### Example request ```bash 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 }" ``` ### Response `200` ```json { "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 } } ``` ### Response `403` — A token with no location resolved ```json { "message": "This action is unauthorized." } ``` ### Response `422` — A page size above the ceiling ```json { "message": "Per page no puede ser mayor que 200.", "errors": { "per_page": [ "Per page no puede ser mayor que 200." ] } } ```