---
title: "Record an analytics event via the console API with explicit project ID."
method: POST
path: "/projects/{project_id}/events/ingest"
tags: ["Events"]
---

# Record an analytics event via the console API with explicit project ID.

`POST /projects/{project_id}/events/ingest`

## 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}/events/ingest`
- Auth: HTTP bearer

The app backend forwards the user's encrypted Temps cookies, so visitor/session
identity is resolved automatically by middleware. No geolocation or user-agent
enrichment is performed — this is a lightweight server-side ingestion path.

## Path parameters

- `project_id` integer, required

## Request body

- ConsoleEventPayload: Payload for server-side event ingestion via the console API. The app backend reads the encrypted `_temps_visitor_id` and `_temps_sid` cookie values from the user's request and forwards them here. Temps decrypts them server-side to resolve visitor/session identity.
  - `deployment_id` integer, required: Deployment ID to attribute the event to
  - `environment_id` integer, required: Environment ID to attribute the event to
  - `event_data` unknown
  - `event_name` string, required: Event name (e.g. "purchase", "signup", custom event names)
  - `request_path` string: Page path context (defaults to "/")
  - `request_query` string: Query string context
  - `session_id` string, nullable: Encrypted `_temps_sid` cookie value from the user's browser
  - `visitor_id` string, nullable: Encrypted `_temps_visitor_id` cookie value from the user's browser

## Response `200`

Event recorded successfully

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Insufficient permissions
- `500`: Internal server error

## Changes

- **2026-04-25** `774be20905f2`: 1 info
  - endpoint added

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