
# Ingest API

Every REVU SDK targets the same ingest contract. The SDK captures behavioral
events client-side, batches them, and sends them to a single endpoint; the
server validates, attributes, and stores them. The SDK only captures, never
computes metrics, so this contract is the boundary between the two.

## Endpoint

```http
POST /v1/behavior/events
```

Authenticated with your public write key (`revu_pk_...`), which resolves to your
organization and touchpoint server-side. Requests carry a batch of events in the
canonical event shape.

## The event shape

The canonical event shape is shared across every SDK and documented, with a
worked example, on the Web SDK page:

- **[The canonical event shape](/web/concepts/#the-canonical-event-shape)** -
  `event_id`, `anonymous_id`, `user_id`, `session_id`, `sequence_no`,
  `platform`, `event_type`, `screen`, `fingerprint`, `properties`,
  `device_time`.

## Transport behavior

How the web SDK batches, retries, and flushes against this endpoint (durable
offline queue, capped backoff, terminal flush on unload) is covered in:

- **[Transport and offline](/web/transport/)** - flush triggers, retry and
  backoff, and the dual-signal terminal flush.
- **[First-party ingest](/web/first-party-ingest/)** - route events through your
  own domain with reverse-proxy recipes.

## Reference and spec

- **[API reference](/api/reference/)** - the full endpoint reference (request
  body schema, every field, responses, and copy-paste examples), generated from
  the OpenAPI specification.
- **[openapi.json](/api/openapi.json)** - the machine-readable OpenAPI 3.1
  specification. Point a client generator, a mock server, or an AI agent at it.
