---
title: "Audit Logs API — Sealmetrics Docs"
description: "Query the audit trail of mutating actions across your organization, filterable by action type, resource, author, and date range"
canonical_url: "https://sealmetrics.com/docs/api/audit/"
lang: "en"
date_modified: 2026-06-22
content_type: "api-reference"
owner: "engineering"
llm_priority: "critical"
last_verified: "2026-06-22"
source: https://sealmetrics.com/docs/api/audit/
publisher: Sealmetrics
---

# Audit Logs API

Query the audit trail of mutating actions across your organization, filterable by action type, resource, author, and date range

Query the audit trail of mutating actions across your organization. Superadmins see every entry; regular users see only entries authored by members of organizations they belong to.

**Base path:** `/audit`

Required scope: `read`.

## List Audit Logs

```http
GET /audit/logs
```

**Query Parameters:**

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `action` | string | - | Filter by action type (e.g. `segment.create`, `user.deactivate`) |
| `resource_type` | string | - | Filter by resource type (e.g. `segment`, `user`, `site`) |
| `user_id` | integer | - | Filter by author |
| `from_date` | datetime | - | Lower bound (ISO 8601) |
| `to_date` | datetime | - | Upper bound (ISO 8601) |
| `page` | integer | `1` | Page number |
| `page_size` | integer | `50` | Items per page (1-100) |

**Response:**

```json
{
  "success": true,
  "data": {
    "logs": [
      {
        "id": 12041,
        "user_id": 7,
        "user_email": "alice@acme.com",
        "user_name": "Alice",
        "action": "segment.create",
        "resource_type": "segment",
        "resource_id": "seg_abc123",
        "account_id": "acme",
        "details": {
          "segment_name": "paid-spain",
          "filter_count": 2
        },
        "ip_address": "203.0.113.42",
        "created_at": "2025-01-08T14:23:00Z"
      }
    ],
    "total": 1248,
    "page": 1,
    "page_size": 50,
    "total_pages": 25
  }
}
```

`details` is a free-form object whose shape depends on the action type — treat it as opaque JSON when consuming.
