---
title: "Receive tracking event"
method: POST
path: "/api/events"
tags: ["Events"]
---

# Receive tracking event

`POST /api/events`

## Request

- Base URL: `https://dregs.com`
- URL: `https://dregs.com/api/events`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Receive a tracking event. Authenticate with a secret key (sk_) for server-side calls or a public key (pk_) for the browser tracker. Include an id to make the write idempotent.

## Request body

- V1TrackRequest
  - `type` string, required
  - `data` object, required
  - `identity` V1TrackRequestIdentity
    - `id` string
    - `data` object
  - `groups` V1TrackRequestGroup[]
    - `type` string
    - `id` string
    - `data` object
  - `device` V1TrackRequestDevice
    - `signature` string
    - `data` object
  - `key` string
  - `timestamp` string, date-time
  - `source` string
  - `id` string: Optional client-supplied event ID for idempotent ingestion. When provided, repeated posts with the same ID are silently deduplicated against the previous event for the customer. Must not start with "dregs-" and must be at most 64 characters. When omitted, the server generates a dregs-{UUID} identifier.

## Response `200`

Event received successfully

## Other responses

- `400`: Invalid event data
- `401`: Authentication required
- `402`: Monthly event limit exceeded
- `429`: Per-credential ingestion rate limit exceeded
- `500`: Internal server error

---

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