# Latest Events

GET /api/v2/projects/{projectId}/analytics/latest-events

Returns the project's most recent events, newest first: the live activity feed. Each row carries the action, timestamp, page, referrer, and the visitor's device, browser, and country. Social-proof popup events are hidden unless you ask for them by `action`.

## Request

- projectId: string, path, required — ID of the project to read events from.
- action: string, query — Return only events with this action name. When omitted the feed excludes the `$notification_shown` and `$notification_clicked` social-proof events.
- distinctId: string, query — Adds the `distinctId` column to each row. This selects a column rather than filtering. Any value turns it on, and it does not narrow results to one contact.
- limit: number, query — Maximum number of events to return. Defaults to 50.
- payload: boolean, query — Adds the raw event `payload` to each row. Like `distinctId`, this is a column toggle: sending `false` still turns it on.

## Response

- 200: Successful response
  - data: object[], required
    - action: string, required
    - browser: string, required
    - device: string, required
    - href: string, required
    - id: string, required
    - location: string, required
    - referrer: string, required
    - timestamp: string, required
    - distinctId: string
    - payload: string
    - unique: boolean
  - meta: object[], required
    - name: string, required
    - type: string, required
  - rows: number, required
  - statistics: object, required
    - bytes_read: number, required
    - elapsed: number, required
    - rows_read: number, required
  - usage: object, required
    - cost: number, required
    - duration: number
    - metricCount: number
- 400: Invalid input data
- 401: Authorization not provided
- 403: Insufficient access
- 404: Not found
- 500: Internal server error
