> ## Documentation Index
> Fetch the complete documentation index at: https://mixpanel-edb78807-copilot-tof-446-create-per-error-troubles.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 400 Bad Request

> Why Mixpanel's /import endpoint rejects events with a 400, how to read the failed_records response, and how to correct each validation error

`/import` returns a 400 when one or more events in the batch fail validation. Mixpanel still ingests the events that passed, so a 400 is a partial success rather than a total rejection.

## What the Response Looks Like

With `strict=1` (recommended), the response body names every event that failed and why.

```json theme={"system"}
{
  "code": 400,
  "error": "some data points in the request failed validation",
  "status": "Bad Request",
  "num_records_imported": 999,
  "failed_records": [
    {
      "index": 0,
      "insert_id": "13c0b661-f48b-51cd-ba54-97c5999169c0",
      "field": "properties.time",
      "message": "'properties.time' is invalid: must be specified as seconds since epoch"
    }
  ]
}
```

`num_records_imported` tells you how many events landed. `failed_records` carries the `insert_id` of each rejected event, which is what you use to find and correct it.

## Common Causes

### Invalid `distinct_id`

`distinct_id` identifies the user who performed the event. If an event is not associated with any user, set it to the empty string — those events are accepted, but they are excluded from all behavioral analysis.

Mixpanel rejects a list of placeholder values that usually indicate an implementation mistake, including `anon`, `anonymous`, `nil`, `none`, `null`, `n/a`, and `00000000-0000-0000-0000-000000000000`. See [Import Events](/reference/import-events) for the full list.

### Missing or Malformed `$insert_id`

`$insert_id` is required on every event. It is what makes retrying an `/import` request safe, because Mixpanel uses it to deduplicate. If your events have no natural unique ID, hash a set of properties that make the event semantically unique — such as `distinct_id` plus timestamp — and use the first 36 characters.

### Invalid `time`

`time` is required, in seconds or milliseconds since epoch. Mixpanel rejects events dated before 1971-01-01 or more than one hour in the future, measured on Mixpanel's servers.

If you are backfilling history through `/track` rather than `/import`, note that `/track` accepts events from the **last 5 days only**. `/import` accepts anything after 1971-01-01. Sending older events to `/track` is a common reason backfilled data never appears.

### Event Too Large

Each event must be under 1MB of uncompressed JSON. Strings longer than 255 characters are truncated rather than rejected, so a long URL or free-text field will not cause a 400 on its own.

## How to Fix It

**Read `failed_records`** and correct the events it names. Each entry gives you the `field` and a `message` describing the problem.

**Do not blindly retry a 400.** Validation errors fail consistently and still count against your rate limit. Fix the payload first.

**Resend the corrected events.** Because `$insert_id` deduplicates, resending events that already landed is safe.

## Related

* [400 on a batch you thought was fine? Check the payload size](/troubleshooting/errors/413-payload-too-large)
* [Import Events API reference](/reference/import-events)
* [Debugging your implementation](/docs/tracking-best-practices/debugging)
