---
title: "Import Events"
method: POST
path: "/import"
tags: ["Events"]
---

# Import Events

`POST /import`

## Query parameters

- `strict` '0' | '1', required
- `project_id` string, required

## Headers

- `Content-Type` 'application/json' | 'application/x-ndjson'
- `Content-Encoding` 'gzip'

## Request body

- object[]
  - `event` string, required — The name of the event.
  - `properties` object, required — A JSON object containing properties of the event.
    - `time` integer, required — The time at which the event occurred, in seconds or milliseconds since UTC epoch. If the time value is set in the future, it will be overwritten with the current present time at ingestion.
    - `distinct_id` string, required — The unique identifier of the user who performed the event.
    - `$insert_id` string, required — A unique identifier for the event, used for deduplication. Events with identical values for (event, time, distinct_id, $insert_id) are considered duplicates; only the latest ingested one will be considered in queries.

## Response `200`

A 200 response indicates all records were successfully ingested.

- object
  - `code` integer
  - `num_records_imported` integer
  - `status` string

## Other responses

- `400` — A 400 response indicates that some records failed validation.
- `401` — A 401 response indicates invalid credentials.
- `413` — A 413 response indicates that the payload is too large.
- `429` — A 429 response indicates rate limits have been exceeded.

---

[API](https://skmtc.net/mixpanel/apis/query-api.md) · [All operations](https://skmtc.net/mixpanel/apis/query-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mixpanel/query-api/revisions/f442da95252a/schema)
