---
title: "POST /projects/{project_id}/analytics/activity/run"
method: POST
path: "/projects/{project_id}/analytics/activity/run"
tags: ["Visitor Activity"]
---

# POST /projects/{project_id}/analytics/activity/run

`POST /projects/{project_id}/analytics/activity/run`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/{project_id}/analytics/activity/run`
- Auth: HTTP bearer

## Path parameters

- `project_id` integer, required

## Response `200`

- ActivityReport
  - `categories` ActivityCategory[], required
    - `description` string, required
    - `name` string, required
  - `completed_at` string, date-time, required
  - `environment_id` integer, nullable
  - `events_considered` integer, required
  - `model` string, nullable
  - `sampled` boolean, required
  - `settings_revision` integer, required
  - `skipped_low_activity` integer
  - `skipped_unchanged` integer
  - `started_at` string, date-time, required
  - `summary` string, required
  - `visitors` VisitorActivityAssessment[], required
    - `categories` string[], required
    - `evidence` ActivityEvidence[], required
      - `event` string, required
      - `path` string, required
      - `properties` ActivityProperty[], required
        - `key` string, required
        - `value` string, required
      - `reference` integer, required: Local to this report, not a database event ID.
      - `timestamp` string, date-time, required
      - `title` string, nullable
    - `explanation` string, required
    - `visitor_id` integer, required
  - `window_end` string, date-time, required
  - `window_start` string, date-time, required

## Other responses

- `400`: Setup incomplete or sharing disabled
- `401`: Authentication required
- `403`: Access denied
- `404`: Project not found
- `409`: Analysis already running, or the run was superseded
- `429`: Cooling down after spending provider tokens, or rate-limited; see `Retry-After`
- `502`: The AI provider failed the request
- `503`: AI provider not configured, or analysis capacity busy
- `504`: The AI provider timed out

## Changes

- **2026-11-22** `b701bf70926b`: 9 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
  - added the non-success response with the status `404`
  - …5 more
- **2026-09-19** `9c1c1055e436`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/analytics/activity/run/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
