# Quickstart

> Step-by-step guide to your first Ours Privacy Ingest API requests, with curl examples for tracking events, identifying visitors, and backfilling data.

Source: https://docs.oursprivacy.com/docs/reference/quickstart

Make your first Ingest API calls. You'll need a source API key. See [Authentication](https://docs.oursprivacy.com/docs/reference/authentication) if you haven't created one yet.

All examples use `curl`. Replace `YOUR_API_KEY` with your actual key, and include at least one of `userId`, `externalId`, or `email` to identify the visitor.

> **Prefer an SDK?** See [SDKs](https://docs.oursprivacy.com/docs/reference/sdks). The Ingest API is wrapped for Node.js, Python, Go, Ruby, PHP, C#, and Kotlin. Everything below maps one-to-one to an SDK method.

***

## Track an Event

Send a single event with `POST /track`:

```bash
curl -X POST https://api.oursprivacy.com/api/v1/track \
  -H "Content-Type: application/json" \
  -d '{
    "event": "Purchase",
    "userId": "user123",
    "token": "YOUR_API_KEY",
    "properties": {
      "amount": 99.99,
      "product": "Premium Plan"
    }
  }'
```

***

## Identify a Visitor

Set or update visitor properties without firing an event with `POST /identify`:

```bash
curl -X POST https://api.oursprivacy.com/api/v1/identify \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "user123",
    "token": "YOUR_API_KEY",
    "userProperties": {
      "email": "user@example.com",
      "firstName": "John",
      "lastName": "Doe",
      "plan": "premium"
    }
  }'
```

To both identify a visitor and record an event in one call, use `/track` and include the visitor properties there.

***

## Backfill a Past Event

Set the `time` field (milliseconds since the UTC epoch) to record an event with its original timestamp. You can send events up to one year old.

```bash
curl -X POST https://api.oursprivacy.com/api/v1/track \
  -H "Content-Type: application/json" \
  -d '{
    "event": "Purchase",
    "userId": "user123",
    "token": "YOUR_API_KEY",
    "time": 1754874909594
  }'
```

Backfilled events appear in [Recent Events](https://docs.oursprivacy.com/docs/tracking-and-debugging-events) ordered by their `time` value, not when they were sent.

***

## Send Many Events at Once

For replay, backfill, or high-volume sends, `POST /batch` accepts one top-level `token` plus an `events[]` array of `/track`-shaped rows. Review the response `results` array row by row and retry only the rows that failed. See the [Batch Events reference](https://docs.oursprivacy.com/docs/reference/batch) for the full response format.

***

## Verify in the Dashboard

Confirm events are arriving in [Recent Events](https://docs.oursprivacy.com/docs/tracking-and-debugging-events). Use your [Test Mode key](https://docs.oursprivacy.com/docs/reference/authentication#test-mode) first to validate the integration without dispatching to destinations.

***

## Error Handling

| Status | Meaning                                                                                       |
| ------ | --------------------------------------------------------------------------------------------- |
| `200`  | Event accepted                                                                                |
| `400`  | Missing required fields or malformed JSON                                                     |
| `401`  | Missing or invalid API key                                                                    |
| `413`  | Event is larger than 1 MiB; shrink it before resending                                        |
| `500`  | Event not accepted; retry with backoff (the Node, Python, Go and Kotlin SDKs do this for you) |

***

## OpenAPI Specification

The full OpenAPI spec is available at:

```
GET https://api.oursprivacy.com/api/v1/openapi
```

Use it to generate clients, explore the schema, or import into tools like Postman. See [OpenAPI Schema](https://docs.oursprivacy.com/docs/reference/openapi) for the rendered reference.

***

## Next Steps

* **[Authentication](https://docs.oursprivacy.com/docs/reference/authentication):** source keys, Test Mode, and rotation.
* **[SDKs](https://docs.oursprivacy.com/docs/reference/sdks):** language wrappers around this API.
* **[Track Events API reference](https://docs.oursprivacy.com/docs/reference/track):** the full request and response schema.
