Amplitude · Schema
Event
Event schema from Amplitude HTTP V2 API
A/B TestingAnalyticsExperimentationFeature FlagsProduct AnalyticsUser Behavior
Properties
| Name | Type | Description |
|---|---|---|
| user_id | string | A readable ID specified by you. Must have a minimum length of 5 characters unless overridden. Required unless device_id is present. |
| device_id | string | A device-specific identifier. Required unless user_id is present. |
| event_type | string | The name of the event being tracked. |
| time | integer | The timestamp of the event in milliseconds since epoch. If not provided, Amplitude uses the upload time. |
| event_properties | object | A dictionary of key-value pairs representing properties of the event. |
| user_properties | object | A dictionary of key-value pairs representing properties of the user. Supports set, setOnce, add, append, prepend, unset, and remove operations. |
| groups | object | A dictionary of group type to group name mappings for this event. |
| group_properties | object | A dictionary of key-value pairs representing properties of the group. |
| app_version | string | The version of the application sending the event. |
| platform | string | The platform of the device sending the event. |
| os_name | string | The name of the operating system of the device. |
| os_version | string | The version of the operating system of the device. |
| device_brand | string | The brand of the device. |
| device_manufacturer | string | The manufacturer of the device. |
| device_model | string | The model of the device. |
| carrier | string | The carrier of the device. |
| country | string | The country of the user. |
| region | string | The region or state of the user. |
| city | string | The city of the user. |
| dma | string | The designated market area of the user. |
| language | string | The language setting of the user. |
| price | number | The price of the item purchased in a revenue event. |
| quantity | integer | The quantity of the item purchased in a revenue event. |
| revenue | number | The revenue generated by the event. Use negative values for refunds. |
| productId | string | The identifier for the product in a revenue event. |
| revenueType | string | The type of revenue for the event, such as purchase or refund. |
| location_lat | number | The latitude of the user's location. |
| location_lng | number | The longitude of the user's location. |
| ip | string | The IP address of the user. Use $remote to use the IP address from the upload request. |
| idfa | string | The Identifier for Advertiser (iOS). |
| idfv | string | The Identifier for Vendor (iOS). |
| adid | string | The Google Play Services advertising ID (Android). |
| android_id | string | The Android ID (Android). |
| event_id | integer | An incrementing counter to distinguish events with identical user_id and timestamps. |
| session_id | integer | The start time of the session in milliseconds since epoch. Use -1 for events outside a session. |
| insert_id | string | A unique identifier for the event used for deduplication. Amplitude deduplicates subsequent events sent with the same insert_id and device_id or user_id within the past 7 days. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/amplitude/refs/heads/main/json-schema/http-v2-api-event-schema.json",
"title": "Event",
"description": "Event schema from Amplitude HTTP V2 API",
"type": "object",
"properties": {
"user_id": {
"type": "string",
"description": "A readable ID specified by you. Must have a minimum length of 5 characters unless overridden. Required unless device_id is present."
},
"device_id": {
"type": "string",
"description": "A device-specific identifier. Required unless user_id is present."
},
"event_type": {
"type": "string",
"description": "The name of the event being tracked."
},
"time": {
"type": "integer",
"format": "int64",
"description": "The timestamp of the event in milliseconds since epoch. If not provided, Amplitude uses the upload time."
},
"event_properties": {
"type": "object",
"description": "A dictionary of key-value pairs representing properties of the event.",
"additionalProperties": true
},
"user_properties": {
"type": "object",
"description": "A dictionary of key-value pairs representing properties of the user. Supports set, setOnce, add, append, prepend, unset, and remove operations.",
"additionalProperties": true
},
"groups": {
"type": "object",
"description": "A dictionary of group type to group name mappings for this event.",
"additionalProperties": true
},
"group_properties": {
"type": "object",
"description": "A dictionary of key-value pairs representing properties of the group.",
"additionalProperties": true
},
"app_version": {
"type": "string",
"description": "The version of the application sending the event."
},
"platform": {
"type": "string",
"description": "The platform of the device sending the event."
},
"os_name": {
"type": "string",
"description": "The name of the operating system of the device."
},
"os_version": {
"type": "string",
"description": "The version of the operating system of the device."
},
"device_brand": {
"type": "string",
"description": "The brand of the device."
},
"device_manufacturer": {
"type": "string",
"description": "The manufacturer of the device."
},
"device_model": {
"type": "string",
"description": "The model of the device."
},
"carrier": {
"type": "string",
"description": "The carrier of the device."
},
"country": {
"type": "string",
"description": "The country of the user."
},
"region": {
"type": "string",
"description": "The region or state of the user."
},
"city": {
"type": "string",
"description": "The city of the user."
},
"dma": {
"type": "string",
"description": "The designated market area of the user."
},
"language": {
"type": "string",
"description": "The language setting of the user."
},
"price": {
"type": "number",
"description": "The price of the item purchased in a revenue event."
},
"quantity": {
"type": "integer",
"description": "The quantity of the item purchased in a revenue event."
},
"revenue": {
"type": "number",
"description": "The revenue generated by the event. Use negative values for refunds."
},
"productId": {
"type": "string",
"description": "The identifier for the product in a revenue event."
},
"revenueType": {
"type": "string",
"description": "The type of revenue for the event, such as purchase or refund."
},
"location_lat": {
"type": "number",
"format": "double",
"description": "The latitude of the user's location."
},
"location_lng": {
"type": "number",
"format": "double",
"description": "The longitude of the user's location."
},
"ip": {
"type": "string",
"description": "The IP address of the user. Use $remote to use the IP address from the upload request."
},
"idfa": {
"type": "string",
"description": "The Identifier for Advertiser (iOS)."
},
"idfv": {
"type": "string",
"description": "The Identifier for Vendor (iOS)."
},
"adid": {
"type": "string",
"description": "The Google Play Services advertising ID (Android)."
},
"android_id": {
"type": "string",
"description": "The Android ID (Android)."
},
"event_id": {
"type": "integer",
"description": "An incrementing counter to distinguish events with identical user_id and timestamps."
},
"session_id": {
"type": "integer",
"format": "int64",
"description": "The start time of the session in milliseconds since epoch. Use -1 for events outside a session."
},
"insert_id": {
"type": "string",
"description": "A unique identifier for the event used for deduplication. Amplitude deduplicates subsequent events sent with the same insert_id and device_id or user_id within the past 7 days."
}
},
"required": [
"event_type"
]
}