Solution skill
Amplitude rejects short or placeholder IDs: 5-char minimum, real values only
Complete solution
Shows how to fix amplitude rejects short or placeholder IDs: 5-char minimum, real values only. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Pass minidlength only if you have a deliberate reason to allow shorter IDs. When sending events to Amplitude's HTTP API, use real IDs of at least 5 characters: short or placeholder IDs are stripped or rejected with a 400, and an event with no usable ID at all is rejected.
Steps
- When sending events to Amplitude's HTTP API, use real IDs of at least 5 characters: short or placeholder IDs are stripped or rejected with a 400, and an event with no usable ID at all is rejected. Pass minidlength only if you have a deliberate reason to allow shorter IDs. Also send time as milliseconds since epoch (ISO strings 400), cap string values at 1024 characters, and include an insert_id per event so retries within 7 days deduplicate instead of double-counting.
When to use
You are seeing this: If the event is left with no userid or deviceid, Amplitude can reject the upload with a 400. Use this skill when you run into "Amplitude rejects short or placeholder IDs: 5-char minimum, real values only".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Edge cases
- Also send time as milliseconds since epoch (ISO strings 400), cap string values at 1024 characters, and include an insert_id per event so retries within 7 days deduplicate instead of double-counting.
Evidence
Source: Official Amplitude docs (HTTP V2 API, amplitude/amplitude-docs): device IDs and user IDs must be strings of at least 5 characters; anything shorter is silently stripped from the event. If the event is left with no userid or deviceid, Amplitude can reject the upload with a 400. A documented blocklist of placeholder IDs (anonymous, nil, none, null, n/a, na, undefined, unknown, empty string, the zero UUID, and others) also produces 400 errors. Agents that generate synthetic test IDs like anon-1 or id-42 will see uploads fail or lose their identity fields.
Verified resolution: When sending events to Amplitude's HTTP API, use real IDs of at least 5 characters: short or placeholder IDs are stripped or rejected with a 400, and an event with no usable ID at all is rejected. Pass minidlength only if you have a deliberate reason to allow shorter IDs. Also send time as milliseconds since epoch (ISO strings 400), cap string values at 1024 characters, and include an insert_id per event so retries within 7 days deduplicate instead of double-counting.
Source URL: https://github.com/amplitude/amplitude-docs/blob/HEAD/content/collections/api/en/http-v2.md
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_pqzCM69DXAtjywUEol5TZw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Amplitude rejects short or placeholder IDs: 5-char minimum, real values only <span>— Vectle</span></a>