> For the complete documentation index, see [llms.txt](https://sandgarden.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandgarden.gitbook.io/docs/reference/audit-log-api.md).

# Audit Log API

This page covers direct integration with Doc Holiday's API.

### List audit logs

`GET /api/v1/audit_logs`

Returns audit logs for the current organization.

| Parameter  | Type   | Behavior                                                                                                                                                  |
| ---------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`     | query  | Matches one exact `AuditLogType` value. Omit it to exclude `assessment-*` logs.                                                                           |
| `summary`  | query  | Matches text case-insensitively. Use `%` wildcards for partial matches.                                                                                   |
| pagination | shared | Uses the list pagination contract from [API Overview](/docs/reference/api-overview.md). If `pageSize` is omitted, Doc Holiday uses the default page size. |

```bash
curl -H "Authorization: Bearer $TOKEN" \
  "https://api.doc.holiday/api/v1/audit_logs?summary=%release%"
```

```json
{
  "auditLogs": [
    {
      "id": "adl-00000000000000af",
      "orgId": "org-0000000000000001",
      "requestId": "req-0000000000000002",
      "userName": null,
      "type": "action-update",
      "summary": "A publication called \"Docs\" was updated",
      "delta": "setting title to \"Docs\"",
      "config": {},
      "adminUserName": null,
      "createdAt": "2026-07-21T12:00:00Z",
      "updatedAt": "2026-07-21T12:00:00Z"
    }
  ],
  "nextPageToken": "2026-07-21T12:00:00.000000Z"
}
```

Notes:

* Authentication follows the standard flow in [API Overview](/docs/reference/api-overview.md).
* When list permission is missing, Doc Holiday limits results to permitted audit-log IDs.
* The get endpoint performs a per-ID permission check.

### Get an audit log

`GET /api/v1/audit_logs/{id}`

Returns one audit log by ID.

| Parameter | Type | Behavior                                         |
| --------- | ---- | ------------------------------------------------ |
| `id`      | path | Use an `adl-` ID such as `adl-00000000000000af`. |

```bash
curl -H "Authorization: Bearer $TOKEN" \
  "https://api.doc.holiday/api/v1/audit_logs/adl-00000000000000af"
```

```json
{
  "id": "adl-00000000000000af",
  "orgId": "org-0000000000000001",
  "requestId": "req-0000000000000002",
  "userName": null,
  "type": "action-create",
  "summary": "A new publication called \"Docs\" was created",
  "delta": "with no public fields",
  "config": {},
  "adminUserName": null,
  "createdAt": "2026-07-21T12:00:00Z",
  "updatedAt": "2026-07-21T12:00:00Z"
}
```

Response body:

| Field           | Type           | Notes                           |
| --------------- | -------------- | ------------------------------- |
| `id`            | string         | Audit log ID.                   |
| `orgId`         | string         | Organization ID.                |
| `requestId`     | string         | Request ID.                     |
| `userName`      | string or null | User name, when present.        |
| `type`          | string         | One `AuditLogType` value.       |
| `summary`       | string         | Short description of the event. |
| `delta`         | string         | Change summary.                 |
| `config`        | object         | Type-specific details.          |
| `adminUserName` | string or null | Admin user name, when present.  |
| `createdAt`     | string         | Creation timestamp.             |
| `updatedAt`     | string         | UTC timestamp.                  |

Notes:

* Authentication follows the standard flow in [API Overview](/docs/reference/api-overview.md).
* Malformed IDs fail with a 4xx response.

### Audit log types

* `error`: general error event.
* `assessment-pending`: assessment queued for review.
* `assessment-generate-release-notes`: assessment for release note generation.
* `assessment-edit-documentation`: assessment for documentation edits.
* `assessment-create-documentation`: assessment for new documentation.
* `assessment-general-updates`: assessment for general updates.
* `assessment-combine-pr`: assessment for combining a pull request.
* `assessment-github-operations`: assessment for GitHub operations.
* `action-create`: create action.
* `action-delete`: delete action.
* `action-update`: update action.
* `connection-sync`: connection sync event.
* `connection-health-check`: connection health check event.
* `publication-health-check`: Publication health check event.
