Amplitude time is milliseconds. Seconds land in 1970.
Date.now() is the correct unit here. Meta's event_time is the inverse. A 10-digit Unix timestamp is seconds, and as milliseconds it is January 1970.
user_id and device_id shorter than 5 characters are silently dropped unless min_id_length is set. One of the two is required on every event. Names that start with [Amplitude] are reserved; $identify is allowed. ip may be $remote. Identify is vendor/amplitude-identify. Group identify is vendor/amplitude-group-identify.
time is 13 digits
Milliseconds since epoch. A JavaScript Date.now() is already in the right unit. Do not divide by 1000 because Meta told you to.
Ids shorter than 5 characters are dropped
Amplitude documents this. The pack flags user_id and device_id that fail the length check, and flags an event with neither identifier.
What this pack matches
Rules
Codes are stable. A finding in CI, MCP, or the playground lands on the same id.
| Field | Required | What it checks | Rule ids | Source |
|---|---|---|---|---|
api_key |
required | It is the project API key the upload is attributed to. Native JSON type: string. Fix: Send the API key of the Amplitude project, and keep it server-side. | vendor.amplitude.body.api_key.missingvendor.amplitude.body.api_key.emptyvendor.amplitude.body.api_key.invalid |
docs |
events |
required | Amplitude reads the events to ingest from this array. Native JSON type: array. Minimum array items: 1. Maximum array items: 1999. Fix: Send an `events` array holding at least one event. | vendor.amplitude.body.events.missingvendor.amplitude.body.events.invalid |
docs |
options |
optional | The vendor documents `options` in the request contract. Native JSON type: object. | vendor.amplitude.body.options.invalid |
docs |
options.min_id_length |
optional | The vendor documents `options.min_id_length` in the request contract. Native JSON type: integer. Minimum numeric value: 1. | vendor.amplitude.body.options.min_id_length.invalid |
docs |
root |
optional | The vendor documents `` in the request contract. Native JSON type: object. | vendor.amplitude.body.root.invalid |
docs |
events[].user_id |
optional | The vendor documents `events[].user_id` in the request contract. | docs | |
events[].device_id |
optional | The vendor documents `events[].device_id` in the request contract. | docs | |
body.identifier_minimum_length |
required | The request does not satisfy the documented identifier minimum length requirement. | vendor.amplitude.body.identifier_minimum_length |
docs |
event_type |
required | Amplitude documents the event type as required on every event. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. Fix: Name the event, such as `Purchase Completed`. | vendor.amplitude.body.event_type.missingvendor.amplitude.body.event_type.emptyvendor.amplitude.body.event_type.invalid |
docs |
user_id |
optional | Amplitude documents user IDs as strings of 5 characters or more, and silently drops shorter ones unless `min_id_length` is set. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. Fix: Use an identifier of at least 5 characters, or set the `min_id_length` option. | vendor.amplitude.body.user_id.emptyvendor.amplitude.body.user_id.invalid |
docs |
device_id |
optional | Amplitude documents device IDs as strings of 5 characters or more, and silently drops shorter ones unless `min_id_length` is set. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. Fix: Use an identifier of at least 5 characters, or set the `min_id_length` option. | vendor.amplitude.body.device_id.emptyvendor.amplitude.body.device_id.invalid |
docs |
time |
optional | Amplitude documents this as milliseconds since epoch. A 10-digit value is seconds and lands in 1970. Body scope: events[]. Native JSON type: integer. Minimum numeric value: 0. Fix: Send milliseconds: a JavaScript `Date.now()` is already in the right unit. | vendor.amplitude.body.time.emptyvendor.amplitude.body.time.invalid |
docs |
insert_id |
optional | Amplitude uses it to drop duplicate events on retry. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. Fix: Send a stable id per event so a retried upload is not counted twice. | vendor.amplitude.body.insert_id.emptyvendor.amplitude.body.insert_id.invalid |
docs |
ip |
optional | It is the user IP, sent unhashed, or `$remote` to use the request address. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. Fix: Send the raw IP, or `$remote`. | vendor.amplitude.body.ip.emptyvendor.amplitude.body.ip.invalid |
docs |
user_agent |
optional | Send the original, unparsed and untruncated user agent as documented. Body scope: events[]. Native JSON type: string. | vendor.amplitude.body.user_agent.emptyvendor.amplitude.body.user_agent.invalid |
docs |
revenue |
optional | It is the event revenue. Amplitude documents a float and accepts negatives for refunds. Body scope: events[]. Native JSON type: number. Fix: Send a number such as `129.99`, with no currency symbol. | vendor.amplitude.body.revenue.emptyvendor.amplitude.body.revenue.invalid |
docs |
currency |
optional | It is the 3-character uppercase ISO 4217 currency of the purchase. Body scope: events[]. Native JSON type: string. Fix: Use an uppercase code such as `USD`. | vendor.amplitude.body.currency.emptyvendor.amplitude.body.currency.invalid |
docs |
session_id |
optional | It is the session start time in milliseconds since epoch. Amplitude documents `-1` as the same as omitting it. Body scope: events[]. Native JSON type: integer. Minimum numeric value: -1. | vendor.amplitude.body.session_id.emptyvendor.amplitude.body.session_id.invalid |
docs |
price |
optional | It is the price of the item purchased. Amplitude documents a float and accepts negatives for refunds. Body scope: events[]. Native JSON type: number. Fix: Send a number such as `4.99`, with no currency symbol. | vendor.amplitude.body.price.emptyvendor.amplitude.body.price.invalid |
docs |
quantity |
optional | It is the quantity of the item purchased. Amplitude documents an integer and defaults to 1 when omitted. Body scope: events[]. Native JSON type: integer. Fix: Send a whole number such as `3`. | vendor.amplitude.body.quantity.emptyvendor.amplitude.body.quantity.invalid |
docs |
productId |
optional | It identifies the item purchased. Amplitude documents sending price and quantity, or revenue, with this field. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.productId.emptyvendor.amplitude.body.productId.invalid |
docs |
revenueType |
optional | It is the type of revenue for the item purchased, such as `Refund`. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.revenueType.emptyvendor.amplitude.body.revenueType.invalid |
docs |
location_lat |
optional | It is the current latitude of the user. Amplitude documents a float. Body scope: events[]. Native JSON type: number. Minimum numeric value: -90. Maximum numeric value: 90. Fix: Send a number such as `37.77`. | vendor.amplitude.body.location_lat.emptyvendor.amplitude.body.location_lat.invalid |
docs |
location_lng |
optional | It is the current longitude of the user. Amplitude documents a float. Body scope: events[]. Native JSON type: number. Minimum numeric value: -180. Maximum numeric value: 180. Fix: Send a number such as `-122.39`. | vendor.amplitude.body.location_lng.emptyvendor.amplitude.body.location_lng.invalid |
docs |
event_id |
optional | It is an incrementing counter Amplitude documents to distinguish events that share a `user_id` and timestamp. Body scope: events[]. Native JSON type: integer. Fix: Send a whole number such as `23`. | vendor.amplitude.body.event_id.emptyvendor.amplitude.body.event_id.invalid |
docs |
app_version |
optional | It is the current version of the application. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.app_version.emptyvendor.amplitude.body.app_version.invalid |
docs |
platform |
optional | It is the platform of the device, such as `iOS`. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.platform.emptyvendor.amplitude.body.platform.invalid |
docs |
country |
optional | It is the current country of the user. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.country.emptyvendor.amplitude.body.country.invalid |
docs |
language |
optional | It is the language set by the user. Amplitude stores a language name; a tag such as `en-US` is accepted and rewritten. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.language.emptyvendor.amplitude.body.language.invalid |
docs |
idfa |
optional | It is the iOS Identifier for Advertiser. Amplitude's HTTP V2 samples send a UUID, and all-zero IDFAs are dropped. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. Fix: Send `idfa` as a UUID, or omit the field. | vendor.amplitude.body.idfa.emptyvendor.amplitude.body.idfa.invalid |
docs |
idfv |
optional | It is the iOS Identifier for Vendor. Amplitude's HTTP V2 samples send a UUID. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. Fix: Send `idfv` as a UUID, or omit the field. | vendor.amplitude.body.idfv.emptyvendor.amplitude.body.idfv.invalid |
docs |
adid |
optional | It is the Google Play Services advertising ID. Amplitude's HTTP V2 samples send a UUID. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. Fix: Send `adid` as a UUID, or omit the field. | vendor.amplitude.body.adid.emptyvendor.amplitude.body.adid.invalid |
docs |
os_name |
optional | The vendor documents `os_name` in the request contract. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.os_name.invalid |
docs |
os_version |
optional | The vendor documents `os_version` in the request contract. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.os_version.invalid |
docs |
device_brand |
optional | The vendor documents `device_brand` in the request contract. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.device_brand.invalid |
docs |
device_manufacturer |
optional | The vendor documents `device_manufacturer` in the request contract. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.device_manufacturer.invalid |
docs |
device_model |
optional | The vendor documents `device_model` in the request contract. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.device_model.invalid |
docs |
carrier |
optional | The vendor documents `carrier` in the request contract. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.carrier.invalid |
docs |
region |
optional | The vendor documents `region` in the request contract. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.region.invalid |
docs |
city |
optional | The vendor documents `city` in the request contract. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.city.invalid |
docs |
dma |
optional | The vendor documents `dma` in the request contract. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.dma.invalid |
docs |
android_app_set_id |
optional | The vendor documents `android_app_set_id` in the request contract. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.android_app_set_id.invalid |
docs |
android_id |
optional | The vendor documents `android_id` in the request contract. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.android_id.invalid |
docs |
plan.branch |
optional | The vendor documents `plan.branch` in the request contract. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.plan.branch.invalid |
docs |
plan.source |
optional | The vendor documents `plan.source` in the request contract. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.plan.source.invalid |
docs |
plan.version |
optional | The vendor documents `plan.version` in the request contract. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.plan.version.invalid |
docs |
plan_unknown_fields… |
forbidden | Amplitude documents only branch, source, and version on the plan object. Other keys are not part of that contract. Body scope: events[]. Presence diagnostic severity: warning. Fix: Keep `plan` to `branch`, `source`, and `version`. | vendor.amplitude.body.plan_unknown_fields.forbidden |
docs |
event_properties |
optional | The vendor documents `event_properties` in the request contract. Body scope: events[]. Native JSON type: object. Maximum container depth: 40. | vendor.amplitude.body.event_properties.invalid |
docs |
user_properties |
optional | The vendor documents `user_properties` in the request contract. Body scope: events[]. Native JSON type: object. Maximum container depth: 40. | vendor.amplitude.body.user_properties.invalid |
docs |
groups |
optional | Amplitude accepts at most five group types and ten total scalar or array group memberships. Body scope: events[]. Native JSON type: object. Maximum object properties: 5. Maximum member values: 10. | vendor.amplitude.body.groups.invalid |
docs |
group_properties |
optional | The vendor documents `group_properties` in the request contract. Body scope: events[]. Native JSON type: object. | vendor.amplitude.body.group_properties.invalid |
docs |
plan |
optional | Amplitude documents plan.branch, plan.source, and plan.version. Other keys on plan warn. Body scope: events[]. Native JSON type: object. | vendor.amplitude.body.plan.invalid |
docs |
$skip_user_properties_sync |
optional | The vendor documents `$skip_user_properties_sync` in the request contract. Body scope: events[]. Native JSON type: boolean. | vendor.amplitude.body.$skip_user_properties_sync.invalid |
docs |
groups.* |
optional | A group name is a string or an array of strings. Body scope: events[]. Native JSON type: string or array. Maximum decoded characters: 1024. | vendor.amplitude.body.groups.*.invalid |
docs |
groups.*[] |
optional | Every array-valued group name is a string. Body scope: events[]. Native JSON type: string. Maximum decoded characters: 1024. | vendor.amplitude.body.groups.*[].invalid |
docs |
body.event_needs_an_identifier |
required | The event carries neither `user_id` nor `device_id`. Amplitude documents one of the two as required, and rejects the event without them. Body scope: events[]. Fix: Send `user_id` for a known user, or `device_id` for an anonymous one. | vendor.amplitude.body.event_needs_an_identifier |
docs |
body.reserved_event_type |
required | The event type is one of the six event names that Amplitude reserves for internal use. Body scope: events[]. Fix: Use an event name outside the six published reserved names. | vendor.amplitude.body.reserved_event_type |
docs |
body.hashed_plaintext_field |
required | This IP value looks like a SHA-256 digest. Amplitude accepts a raw IP address or $remote. Body scope: events[]. Fix: Send the raw IP address, or $remote to use the upload request address. | vendor.amplitude.body.hashed_plaintext_field |
docs |
body.placeholder_identifier |
required | This identifier is on Amplitude's list of values that return 400, such as `anonymous` or an all-zero UUID. Body scope: events[]. Fix: Send a real `user_id` or `device_id` of at least 5 characters. | vendor.amplitude.body.placeholder_identifier |
docs |
body.revenue_identifier_needs_amount |
required | The request does not satisfy the documented revenue identifier needs amount requirement. Body scope: events[]. | vendor.amplitude.body.revenue_identifier_needs_amount |
docs |
root |
optional | Every descendant string property value has the documented 1024 character limit. Other JSON types remain supported. Body scope: events[].event_properties.**. Native JSON type: string or number or boolean or object or array or null. Maximum decoded characters: 1024. | vendor.amplitude.body.root.invalid |
docs |
root |
optional | Every descendant string property value has the documented 1024 character limit. Other JSON types remain supported. Body scope: events[].user_properties.**. Native JSON type: string or number or boolean or object or array or null. Maximum decoded characters: 1024. | vendor.amplitude.body.root.invalid |
docs |
root |
optional | Every descendant string property value has the documented 1024 character limit. Other JSON types remain supported. Body scope: events[].group_properties.**. Native JSON type: string or number or boolean or object or array or null. Maximum decoded characters: 1024. | vendor.amplitude.body.root.invalid |
docs |
method |
required | This published ingestion operation uses HTTP POST. Complete HTTP capture contract. Native JSON type: string. | vendor.amplitude.http.method.missingvendor.amplitude.http.method.emptyvendor.amplitude.http.method.invalid |
docs |
content_type |
required | Use a published request media type. Complete HTTP capture contract. Native JSON type: string. | vendor.amplitude.http.content_type.missingvendor.amplitude.http.content_type.emptyvendor.amplitude.http.content_type.invalid |
docs |
body |
required | The request body is a JSON object. Complete HTTP capture contract. Native JSON type: object. | vendor.amplitude.http.body.missingvendor.amplitude.http.body.invalid |
docs |
Validate a payload
pixellint validate json @payload.json --rulepack vendor/amplitude
Try this failing payload in the playground. Amplitude reserved [Amplitude] event name.
{"api_key":"amp-key-abc123","events":[{"user_id":"user-10024","event_type":"[Amplitude] Start Session","time":1770000000000,"insert_id":"evt-9931"}]}
cargo install pixellint
·
npm install pixellint