> ## Documentation Index
> Fetch the complete documentation index at: https://docs.traversal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Event Logs API

> List audit events for your organization, such as configuration changes, invites, and sign-ins, for compliance reviews and SIEM ingestion. Requires the Admin role.

> [!WARNING]
>
> **Beta.** The Event Logs API is available under `/v0/event-logs` while Traversal collects feedback. The endpoint may change before it stabilizes at `/v1`. Contact your Traversal point of contact before you rely on it for production workloads.

The Event Logs API lists audit events for your organization, such as integrations created, users invited, sessions started, and sign-ins and sign-outs.

All endpoints require authentication. [Create an API key](https://docs.traversal.com/api/authentication.md) first. For the base URL, error envelope, and generic status codes, see the [API overview](https://docs.traversal.com/api/overview.md). The sidebar lists every endpoint, generated from the OpenAPI spec.

## Required roles

Event Logs requires the **admin** role. A request from a key without it returns `403 Forbidden`.

## Event shape

Every event log row has the same envelope:

| Field | Description |
| - | - |
| `id` | Stable identifier for the event. |
| `time` | UTC timestamp of when the event happened. |
| `type` | Dotted `<resource>.<action>` string that identifies the event, such as `integrations.update` or `auth.login`. |
| `user_id`, `user_email` | The user who triggered the event. Both can be `null` for system-driven events or when the user no longer exists. |
| `data` | The payload. Its shape depends on `type`. See [The `data` field](#the-data-field). |

## The `type` field

`type` identifies the event and determines the shape of `data`. The API reference lists every value. In brief:

| Resource | Actions |
| - | - |
| `integrations` | `create`, `update`, `delete` |
| `api_keys` | `create`, `delete` |
| `users` | `invite_sent`, `invite_accepted`, `role_granted`, `archive` |
| `auth` | `login`, `logout` |
| `sessions` | `create`, `update`, `delete` |

New (resource, action) pairs may be added over time. Clients should handle unknown `type` values without failing.

## The `data` field

`data` carries one of two shapes depending on the action:

* Lifecycle events (everything except `.update`): `data` is a snapshot of the resource at the time of the event. The exact fields vary by `type`.
* `.update` events: `data` is a diff: a map of field names to `{ "old": <previous>, "new": <current> }`. Only fields that actually changed are present.

### Example: lifecycle event

```json theme={null}
{
  "id": 482913,
  "time": "2026-05-27T14:31:02Z",
  "type": "integrations.create",
  "user_id": "a9c2e3b0-...",
  "user_email": "alice@acme.com",
  "data": {
    "id": "int-prod-datadog",
    "name": "prod-datadog",
    "type": "datadog",
    "created_by_user_id": "a9c2e3b0-...",
    "created_by_user_email": "alice@acme.com"
  }
}
```

### Example: update event

```json theme={null}
{
  "id": 482914,
  "time": "2026-05-27T14:32:05Z",
  "type": "sessions.update",
  "user_id": "a9c2e3b0-...",
  "user_email": "alice@acme.com",
  "data": {
    "status": { "old": "idle", "new": "follow_up_running" },
    "user_message": { "old": null, "new": "why did the queue back up?" }
  }
}
```

> [!TIP]
>
> Check `type` first to know which `data` shape to expect.

## Filtering

The list endpoint supports three optional filters:

| Filter | Effect |
| - | - |
| `start_time` | Inclusive lower bound on the event timestamp (ISO-8601 UTC). |
| `end_time` | Exclusive upper bound on the event timestamp. `400` if `end_time <= start_time`. |
| `type` | Exact match on the dotted `<resource>.<action>` value. |

Combine them in one request. For example, `?type=auth.login&start_time=2026-05-01T00:00:00Z&end_time=2026-06-01T00:00:00Z` returns the logins during May 2026.

## Pagination

Pagination uses the `page` and `limit` query parameters. The response includes `count`, `prev`, `next`, and `total`. `limit` is capped at 100.

```bash theme={null}
curl -s "https://api.traversal.com/v0/event-logs?page=1&limit=50" \
  -H "Authorization: Bearer $TRAVERSAL_API_KEY"
```

If both `page` and `limit` are omitted, all matching rows are returned in a single response. Results are ordered newest-first by `id`. To ingest events into a SIEM, poll with `start_time` set to the timestamp of the most recent event you ingested.

Single-tenant SaaS and BYOC deployments use their own API URL. See the [API overview](https://docs.traversal.com/api/overview.md#base-url).

## Rate limits

The endpoint is limited to **100 requests per minute**. Hitting the limit returns `429 Too Many Requests` with a `Retry-After` header. Wait that many seconds, then retry.

## Errors

In addition to the [generic status codes](https://docs.traversal.com/api/overview.md#status-codes), the Event Logs API returns:

| Status code | Meaning | When it occurs |
| - | - | - |
| `400` | Bad Request | Invalid `type` value, or `end_time <= start_time`. |
| `403` | Forbidden | The caller does not have the admin role. |
| `429` | Too Many Requests | Per-gateway rate limit exceeded. Includes `Retry-After`. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.