> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.jelliu.co/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.jelliu.co/_mcp/server.

# List audit log entries

GET https://api.jelliu.co/api/audit

Returns the workspace's audit trail, newest first. Filter by resource type, resource id or user
id; the filters combine with AND. Each row says who (`user_id`) did what (`action`) to which
resource, from which IP and client, and when. Rejected attempts appear with a `FAILED_MUTATION:`
or `FAILED_READ:` prefix on `action`.

List rows leave out the request body (`changes`) and the integrity fields; fetch
`GET /api/audit/{id}` for those. To check that the log was not tampered with, use
`GET /api/audit/verify-chain`.

Uses offset pagination with `limit` and `offset`. The response has no total and no cursor: keep
requesting pages until one comes back with fewer than `limit` rows. See [Pagination](/pagination).
For a full copy, an `audit_log` export (`POST /api/exports`) is cheaper than paging.

**Idempotency.** A read with no side effects, and not itself written to the audit log. Safe to retry.

**Access**

* **Required scope:** `full`. Human users need the **owner** role; admins are refused.
* **Rate limit:** Audit — 20 requests/min per workspace, shared with the other audit routes, plus the general API limit (120–600/min by plan). The audit limiter counts a request even when the role check then refuses it. See [Rate limits](/rate-limits).
* **Plan:** Available on every plan.

Reference: https://developer.jelliu.co/api-reference/audit/get-audit

## Authentication

- `Authorization` header (bearer token, required) — Workspace API key: `jl_` followed by 64 lowercase hex characters, created by the workspace owner in the dashboard (**Settings → API Keys**) and sent as `Authorization: Bearer jl_...`. The plaintext is shown once, at creation; Jelliu stores only a SHA-256 hash. A workspace can hold up to 25 active keys. | Scope | GET / HEAD | POST / PUT / PATCH / DELETE | Admin-only routes | | --- | --- | --- | --- | | `read` | Yes | No | No | | `write` | Yes | Yes | No | | `full` | Yes | Yes | Yes | Operations restricted to admins or owners reject keys without the `full` scope with `403`, and say so in their description. No key, whatever its scope, can mint or revoke API keys or rotate a webhook secret — that requires a signed-in owner session. A revoked key stops authenticating within about 10 seconds. See [Authentication](/authentication).

## Request

### Query parameters

- `resourceType` (string, optional) — Exact match on `resource_type`, for example `agent`, `campaign`, `outbound_webhook`, `export`, `report`, `integration` or `contact`. Longer than 100 characters answers `400`.
- `resourceId` (string, optional) — Exact match on `resource_id`. Must be a UUID or the request fails with `400`. Resources with non-UUID ids have no `resource_id`; their id is kept in `changes._resource_ref`.
- `userId` (string, optional) — Exact match on `user_id`. A dashboard user id (`user_…`), or `apikey:<keyId>` for requests made with an API key. Up to 200 characters.
- `limit` (integer, optional, default: 50) — Page size, 1 to 100. Out-of-range or non-numeric values silently fall back to 50 (not to the nearest bound).
- `offset` (integer, optional, default: 0) — Rows to skip. Negative or non-numeric values silently fall back to 0.

## Response

### 200

Audit entries, newest first.

- `data` (list of object, required) — Rows ordered by `created_at` descending.
  - `id` (string, optional) — Audit entry id. Pass it to `GET /api/audit/{id}`.
  - `tenant_id` (string, optional) — Workspace id.
  - `user_id` (string, optional) — Dashboard user id, or `apikey:<keyId>` for API-key requests.
  - `action` (string, optional) — What was done, e.g. `create`, `update`, `webhook.rotate_secret`, `export.create`. Prefixed with `FAILED_MUTATION:` or `FAILED_READ:` when the request was refused with a 4xx/5xx.
  - `resource_type` (string, optional) — Kind of resource acted on.
  - `resource_id` (string, optional, nullable) — UUID of the resource, or null when the route has no id or the id is not a UUID.
  - `ip_address` (string, optional, nullable) — Client IP. Cleared after 90 days by the retention sweep.
  - `user_agent` (object, optional, nullable) — Coarse client summary (the raw User-Agent is not stored). Cleared after 90 days.
    - `browser` (string, optional)
    - `os` (string, optional)
    - `device` (string, optional)
  - `created_at` (datetime, optional) — When the request finished. Strictly increasing per workspace.

## Errors

### 400 Bad Request Error

`resourceId` is not a UUID, or `resourceType` / `userId` is too long.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 401 Unauthorized Error

No usable credential. Either the `Authorization` header is missing or is not a well-formed `Bearer jl_…` key, or the key is unknown, revoked or expired. Do not retry with the same key. See [Authentication](/authentication#401-unauthorized).

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 403 Forbidden Error

The caller is not the workspace owner, or the API key lacks the `full` scope.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 429 Too Many Requests Error

Audit rate limit (20/min) or general API limit exceeded.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "5b0f3c1e-8d2a-4b7e-9f61-2c4d8a9e7b10",
      "tenant_id": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
      "user_id": "user_2kLmNoPqRsTuVwXyZ",
      "action": "webhook.update",
      "resource_type": "outbound_webhook",
      "resource_id": "5d2f8a4c-1b3e-4f6a-9c7d-8e0f1a2b3c4d",
      "ip_address": "181.49.12.7",
      "user_agent": {
        "browser": "Chrome",
        "os": "Windows",
        "device": "desktop"
      },
      "created_at": "2026-09-14T13:22:05.114Z"
    },
    {
      "id": "2e7a9c4b-1d3f-4a6e-8b0c-5f7d9e1a3c6b",
      "tenant_id": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
      "user_id": "apikey:4f1e2d3c-5b6a-4978-8a9b-0c1d2e3f4a5b",
      "action": "FAILED_MUTATION:webhook.create",
      "resource_type": "outbound_webhook",
      "resource_id": null,
      "ip_address": "34.82.101.16",
      "user_agent": {
        "browser": "Unknown",
        "os": "Unknown",
        "device": "bot"
      },
      "created_at": "2026-09-14T12:58:41.702Z"
    }
  ]
}
```

**SDK Code**

```python Audit_getAudit_example
import requests

url = "https://api.jelliu.co/api/audit"

querystring = {"limit":"100","offset":"100","resourceId":"5d2f8a4c-1b3e-4f6a-9c7d-8e0f1a2b3c4d","resourceType":"outbound_webhook","userId":"apikey:4f1e2d3c-5b6a-4978-8a9b-0c1d2e3f4a5b"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Audit_getAudit_example
const url = 'https://api.jelliu.co/api/audit?limit=100&offset=100&resourceId=5d2f8a4c-1b3e-4f6a-9c7d-8e0f1a2b3c4d&resourceType=outbound_webhook&userId=apikey%3A4f1e2d3c-5b6a-4978-8a9b-0c1d2e3f4a5b';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Audit_getAudit_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.jelliu.co/api/audit?limit=100&offset=100&resourceId=5d2f8a4c-1b3e-4f6a-9c7d-8e0f1a2b3c4d&resourceType=outbound_webhook&userId=apikey%3A4f1e2d3c-5b6a-4978-8a9b-0c1d2e3f4a5b"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Audit_getAudit_example
require 'uri'
require 'net/http'

url = URI("https://api.jelliu.co/api/audit?limit=100&offset=100&resourceId=5d2f8a4c-1b3e-4f6a-9c7d-8e0f1a2b3c4d&resourceType=outbound_webhook&userId=apikey%3A4f1e2d3c-5b6a-4978-8a9b-0c1d2e3f4a5b")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Audit_getAudit_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.jelliu.co/api/audit?limit=100&offset=100&resourceId=5d2f8a4c-1b3e-4f6a-9c7d-8e0f1a2b3c4d&resourceType=outbound_webhook&userId=apikey%3A4f1e2d3c-5b6a-4978-8a9b-0c1d2e3f4a5b")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Audit_getAudit_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.jelliu.co/api/audit?limit=100&offset=100&resourceId=5d2f8a4c-1b3e-4f6a-9c7d-8e0f1a2b3c4d&resourceType=outbound_webhook&userId=apikey%3A4f1e2d3c-5b6a-4978-8a9b-0c1d2e3f4a5b', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Audit_getAudit_example
using RestSharp;

var client = new RestClient("https://api.jelliu.co/api/audit?limit=100&offset=100&resourceId=5d2f8a4c-1b3e-4f6a-9c7d-8e0f1a2b3c4d&resourceType=outbound_webhook&userId=apikey%3A4f1e2d3c-5b6a-4978-8a9b-0c1d2e3f4a5b");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Audit_getAudit_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.jelliu.co/api/audit?limit=100&offset=100&resourceId=5d2f8a4c-1b3e-4f6a-9c7d-8e0f1a2b3c4d&resourceType=outbound_webhook&userId=apikey%3A4f1e2d3c-5b6a-4978-8a9b-0c1d2e3f4a5b")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```