---
title: "Record one event"
method: POST
path: "/api/collect"
tags: ["ingest"]
---

# Record one event

`POST /api/collect`

## Request

- Base URL: `https://app.vitrus.dev/app`
- URL: `https://app.vitrus.dev/app/api/collect`
- Auth: one of:
  - API key in cookie `vitrus_session`
  - HTTP bearer

Called by the tracker at /api/d (this path is the same endpoint under its original name). Returns 204 on success, 404 for an unknown site and 429 when the workspace is past its quota grace band — rejected events are counted and shown to the customer.

## Request body

- object
  - `site` string, required
  - `type` 'pageview' | 'event', required
  - `name` string: Event name. Required when type is event.
  - `url` string
  - `referrer` string
  - `props` object: Event properties. Never contains a form field's VALUE.

## Response `204`

Recorded.

## Other responses

- `404`: Unknown site.
- `429`: Quota exceeded; the event was rejected and counted as rejected.

---

[API](https://skmtc.dev/vitrus/apis/vitrus-api.md) · [All operations](https://skmtc.dev/vitrus/apis/vitrus-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vitrus/apis/vitrus-api/revisions/a7d8c6e18f7c?raw)
