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

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

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

## 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/goals`
- Auth: HTTP bearer

## Path parameters

- `project_id` integer, required

## Request body

- ActivityGoalsRequest
  - `environment_id` integer, nullable
  - `share_with_ai` boolean, required
  - `url` string, required

## Response `200`

- ActivityGoals
  - `goals` ActivityGoal[], required
    - `goal` string, required
    - `missing_signals` string, required
    - `rationale` string, required
    - `title` string, required
  - `model` string, required
  - `pages_read` string[], required

## Other responses

- `400`: Invalid public URL or consent missing
- `401`: Authentication required
- `403`: Access denied
- `404`: Project not found
- `409`: An analysis is already running for this project
- `422`: The public website could not be read
- `429`: Cooling down after spending provider tokens, or rate-limited; see `Retry-After`
- `502`: The AI provider failed or returned unusable output
- `503`: AI provider not configured, or analysis capacity busy
- `504`: The AI provider timed out

## Changes

- **2026-11-22** `b701bf70926b`: 9 info
  - added the media type `application/json` for the response with the status `400`
  - added the media type `application/json` for the response with the status `409`
  - added the media type `application/json` for the response with the status `502`
  - added the media type `application/json` for the response with the status `503`
  - …5 more
- **2026-09-19** `9c1c1055e436`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/analytics/activity/goals/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)
