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

# Track actions with the activity log

> Review a chronological record of account events — screen pairings, team invitations, and other actions — to audit changes and understand what happened.

The activity log gives you a chronological record of significant actions taken in your Piksel account. Use it to audit changes, investigate unexpected behavior, or review a history of events like screen pairings and team member invitations.

## What the activity log records

Each entry in the activity log captures the following fields:

| Field         | Description                                                                         |
| ------------- | ----------------------------------------------------------------------------------- |
| `action`      | The type of event that occurred (e.g., `screen_paired`, `team_invite`).             |
| `entity_type` | The kind of object the action affected (e.g., `team_member`, `display`).            |
| `entity_id`   | The unique ID of the affected object.                                               |
| `details`     | Additional context about the event, such as the email address of an invited member. |
| `created_at`  | The timestamp when the action was recorded.                                         |

Tracked actions include:

* `screen_paired` — a new screen was linked to your account using a pairing code.
* `team_invite` — a team member invitation was sent.

<Info>
  The activity log records actions automatically. You cannot create, edit, or delete log entries manually.
</Info>

## View recent activity from the dashboard

<Steps>
  <Step title="Open the Activity log">
    From the dashboard sidebar, click **Activity**. The log displays your most recent account actions in reverse chronological order.
  </Step>

  <Step title="Review the entries">
    Each row shows the action type, the affected item, and when it occurred. Click an entry to see the full details if available.
  </Step>
</Steps>

## Fetch the activity log via API

You can retrieve the activity log programmatically to integrate it with your own monitoring or auditing tools.

```bash theme={null}
GET /api/activity?limit=30
```

The `limit` parameter controls how many entries are returned. The default is 30 and the maximum is 100.

Example response:

```json theme={null}
[
  {
    "action": "team_invite",
    "entity_type": "team_member",
    "entity_id": "a1b2c3d4-...",
    "details": {
      "email": "colleague@example.com",
      "role": "viewer"
    },
    "created_at": "2025-04-28T10:32:00Z"
  },
  {
    "action": "screen_paired",
    "entity_type": "display",
    "entity_id": "e5f6g7h8-...",
    "details": {},
    "created_at": "2025-04-27T14:15:00Z"
  }
]
```

<Tip>
  Use `limit=100` to pull the full recent history in a single request. Results are always sorted with the newest entries first.
</Tip>

## API reference

<AccordionGroup>
  <Accordion title="Get activity log — GET /api/activity">
    Returns recent activity log entries for your account, sorted by most recent first.

    ```bash theme={null}
    GET /api/activity?limit=30
    ```

    **Query parameters:**

    | Parameter | Type    | Default | Maximum | Description                  |
    | --------- | ------- | ------- | ------- | ---------------------------- |
    | `limit`   | integer | 30      | 100     | Number of entries to return. |
  </Accordion>
</AccordionGroup>
