# Activity log

What changed in the organization, and who changed it

Endpoint: `https://api.bookingmood.com/v1/activity_log`, supporting `GET`. Authenticate with the header `Authorization: Bearer YOUR_API_KEY` (see [authentication](https://www.bookingmood.com/tr-TR/api-reference/authentication.md)).

## The activity log object

| Attribute | Type | Description |
| --- | --- | --- |
| `id` | `uuid \| null` | Unique identifier. |
| `actor_id` | `uuid \| null` | Identifier of the user or API key that made the change. |
| `booking_id` | `uuid \| null` | Identifier of the related booking. |
| `calendar_event_id` | `uuid \| null` | Identifier of the related calendar event. |
| `organization_id` | `uuid \| null` | Identifier of the related organization. |
| `request_id` | `uuid \| null` | Identifier of the API request that made the change. |
| `row_id` | `text \| null` | Identifier of the row that changed. |
| `created_at` | `timestamp with time zone \| null` | Time of the change. The same for all changes in one transaction. Read-only: set by the database. |
| `actor_source` | `text \| null` | What made the change, for webhooks and jobs. |
| `actor_type` | `AuditLogActorType \| null` | Kind of actor that made the change. |
| `changed_columns` | `text[] \| null` | Columns that changed, also the ones whose values are not stored. |
| `changes` | `Record<string, [unknown, unknown]> \| null` | Old and new value per column. Only for columns that hold no personal data. |
| `context` | `jsonb \| null` | Labels that help to read the change, without personal data. |
| `op` | `AuditLogOp \| null` | Type of change. |
| `table_name` | `text \| null` | Table that changed. |
| `txid` | `int64 \| null` | Transaction of the change, which groups the rows of one action. |

```json
{
  "id": "00000000-0000-0000-0000-000000000000",
  "actor_id": "00000000-0000-0000-0000-000000000000",
  "booking_id": "00000000-0000-0000-0000-000000000000",
  "calendar_event_id": "00000000-0000-0000-0000-000000000000",
  "organization_id": "00000000-0000-0000-0000-000000000000",
  "request_id": "00000000-0000-0000-0000-000000000000",
  "row_id": "",
  "created_at": "2026-11-22T23:07:33.302Z",
  "actor_source": "",
  "actor_type": "api_key",
  "changed_columns": [
    ""
  ],
  "changes": {},
  "context": {},
  "op": "insert",
  "table_name": "Summer cottage",
  "txid": 0
}
```

### Types

```typescript
type AuditLogActorType = 
  | "api_key"
  | "guest"
  | "job"
  | "legacy"
  | "masquerade"
  | "migration"
  | "oauth_grant"
  | "staff"
  | "system"
  | "user"
  | "webhook";

type AuditLogOp = "insert" | "update" | "delete";
```

## List activity log

`GET /v1/activity_log` · requires the `organization:read` scope

Filter on any attribute with `column=operator.value` (see [filtering](https://www.bookingmood.com/tr-TR/api-reference/filtering.md)). Choose columns and embed related resources with `select` (see [selecting](https://www.bookingmood.com/tr-TR/api-reference/selecting.md)), and sort and paginate with `order`, `limit` and `offset` (see [sorting and pagination](https://www.bookingmood.com/tr-TR/api-reference/sorting-pagination.md)).

```bash
curl "https://api.bookingmood.com/v1/activity_log?select=*&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Responses:

- `200`: A list of activity log with the selected columns. `206` when the list is a partial range.
- `400`: The request is malformed, for example an unknown column or an invalid filter.
- `401`: The API key is missing or invalid.
- `403`: The API key or access token doesn't have the scope this request needs.
- `429`: The API key made more requests per minute than its rate limit allows. Retry after the number of seconds in the `Retry-After` header.

Errors have a JSON body with a `code`, `message`, `details` and `hint`. See the [introduction](https://www.bookingmood.com/tr-TR/api-reference.md) for more on errors. The full API is described by the OpenAPI spec at https://api.bookingmood.com/v1/openapi.json.
