Optimizely batches keep native event types and revenue bounds.
The Event API receives JSON batches at logx.optimizely.com/v1/events. Published field types apply to each visitor, decision snapshot and event. Revenue is an integer in currency hundredths.
Personalization decisions can carry explicit null experiment and variation IDs. Product-specific requirements, account ownership and delivery need external context.
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 |
|---|---|---|---|---|
root |
required | Native type from the published Event API schema. Presence diagnostic severity: error. Native JSON type: object. | vendor.optimizely-events.body.root.missingvendor.optimizely-events.body.root.invalid |
docs |
account_id |
required | Native type from the published Event API schema. Presence diagnostic severity: error. Native JSON type: string. | vendor.optimizely-events.body.account_id.missingvendor.optimizely-events.body.account_id.invalid |
docs |
visitors |
required | Native type from the published Event API schema. Presence diagnostic severity: error. Native JSON type: array. | vendor.optimizely-events.body.visitors.missingvendor.optimizely-events.body.visitors.invalid |
docs |
anonymize_ip |
optional | Native type from the published Event API schema. Presence diagnostic severity: error. Native JSON type: boolean. | vendor.optimizely-events.body.anonymize_ip.invalid |
docs |
enrich_decisions |
optional | Native type from the published Event API schema. Presence diagnostic severity: error. Native JSON type: boolean. | vendor.optimizely-events.body.enrich_decisions.invalid |
docs |
client_name |
optional | Native type from the published Event API schema. Presence diagnostic severity: error. Native JSON type: string. | vendor.optimizely-events.body.client_name.invalid |
docs |
client_version |
optional | Native type from the published Event API schema. Presence diagnostic severity: error. Native JSON type: string. | vendor.optimizely-events.body.client_version.invalid |
docs |
project_id |
optional | Native type from the published Event API schema. Presence diagnostic severity: error. Native JSON type: string. | vendor.optimizely-events.body.project_id.invalid |
docs |
root |
optional | Native type from the published Event API schema. Body scope: visitors[]. Presence diagnostic severity: error. Native JSON type: object. | vendor.optimizely-events.body.root.invalid |
docs |
visitor_id |
required | Native type from the published Event API schema. Body scope: visitors[]. Presence diagnostic severity: error. Native JSON type: string. | vendor.optimizely-events.body.visitor_id.missingvendor.optimizely-events.body.visitor_id.invalid |
docs |
snapshots |
required | Native type from the published Event API schema. Body scope: visitors[]. Presence diagnostic severity: error. Native JSON type: array. | vendor.optimizely-events.body.snapshots.missingvendor.optimizely-events.body.snapshots.invalid |
docs |
attributes |
optional | Native type from the published Event API schema. Body scope: visitors[]. Presence diagnostic severity: error. Native JSON type: array. | vendor.optimizely-events.body.attributes.invalid |
docs |
session_id |
optional | Native type from the published Event API schema. Body scope: visitors[]. Presence diagnostic severity: error. Native JSON type: string. | vendor.optimizely-events.body.session_id.invalid |
docs |
root |
optional | Native type from the published Event API schema. Body scope: visitors[].attributes[]. Presence diagnostic severity: error. Native JSON type: object. | vendor.optimizely-events.body.root.invalid |
docs |
type |
required | Native type from the published Event API schema. Body scope: visitors[].attributes[]. Presence diagnostic severity: error. Native JSON type: string. | vendor.optimizely-events.body.type.missingvendor.optimizely-events.body.type.invalid |
docs |
value |
required | Native type from the published Event API schema. Body scope: visitors[].attributes[]. Presence diagnostic severity: error. Native JSON type: string or number or boolean. | vendor.optimizely-events.body.value.missingvendor.optimizely-events.body.value.invalid |
docs |
entity_id |
optional | Native type from the published Event API schema. Body scope: visitors[].attributes[]. Presence diagnostic severity: error. Native JSON type: string. | vendor.optimizely-events.body.entity_id.invalid |
docs |
key |
optional | Native type from the published Event API schema. Body scope: visitors[].attributes[]. Presence diagnostic severity: error. Native JSON type: string. | vendor.optimizely-events.body.key.invalid |
docs |
custom_attribute_identity |
required | Custom attributes require their entity_id and key. Body scope: visitors[].attributes[]. | vendor.optimizely-events.custom_attribute_identity |
docs |
noncustom_attribute_entity |
required | Only custom attributes may carry entity_id. Body scope: visitors[].attributes[]. | vendor.optimizely-events.noncustom_attribute_entity |
docs |
root |
optional | Native type from the published Event API schema. Body scope: visitors[].snapshots[]. Presence diagnostic severity: error. Native JSON type: object. | vendor.optimizely-events.body.root.invalid |
docs |
events |
required | Native type from the published Event API schema. Body scope: visitors[].snapshots[]. Presence diagnostic severity: error. Native JSON type: array. | vendor.optimizely-events.body.events.missingvendor.optimizely-events.body.events.invalid |
docs |
decisions |
optional | Native type from the published Event API schema. Body scope: visitors[].snapshots[]. Presence diagnostic severity: error. Native JSON type: array. | vendor.optimizely-events.body.decisions.invalid |
docs |
root |
optional | Native type from the published Event API schema. Body scope: visitors[].snapshots[].decisions[]. Presence diagnostic severity: error. Native JSON type: object. | vendor.optimizely-events.body.root.invalid |
docs |
campaign_id |
required | Native type from the published Event API schema. Body scope: visitors[].snapshots[].decisions[]. Presence diagnostic severity: error. Native JSON type: string. | vendor.optimizely-events.body.campaign_id.missingvendor.optimizely-events.body.campaign_id.invalid |
docs |
experiment_id |
required | Native type from the published Event API schema. Body scope: visitors[].snapshots[].decisions[]. Presence diagnostic severity: error. Native JSON type: string or null. | vendor.optimizely-events.body.experiment_id.missingvendor.optimizely-events.body.experiment_id.invalid |
docs |
variation_id |
required | Native type from the published Event API schema. Body scope: visitors[].snapshots[].decisions[]. Presence diagnostic severity: error. Native JSON type: string or null. | vendor.optimizely-events.body.variation_id.missingvendor.optimizely-events.body.variation_id.invalid |
docs |
is_campaign_holdback |
optional | Native type from the published Event API schema. Body scope: visitors[].snapshots[].decisions[]. Presence diagnostic severity: error. Native JSON type: boolean. | vendor.optimizely-events.body.is_campaign_holdback.invalid |
docs |
root |
optional | Native type from the published Event API schema. Body scope: visitors[].snapshots[].events[]. Presence diagnostic severity: error. Native JSON type: object. | vendor.optimizely-events.body.root.invalid |
docs |
timestamp |
required | Native type from the published Event API schema. Body scope: visitors[].snapshots[].events[]. Presence diagnostic severity: error. Native JSON type: integer. | vendor.optimizely-events.body.timestamp.missingvendor.optimizely-events.body.timestamp.invalid |
docs |
uuid |
required | Native type from the published Event API schema. Body scope: visitors[].snapshots[].events[]. Presence diagnostic severity: error. Native JSON type: string. | vendor.optimizely-events.body.uuid.missingvendor.optimizely-events.body.uuid.invalid |
docs |
entity_id |
optional | Native type from the published Event API schema. Body scope: visitors[].snapshots[].events[]. Presence diagnostic severity: error. Native JSON type: string. | vendor.optimizely-events.body.entity_id.invalid |
docs |
key |
optional | Native type from the published Event API schema. Body scope: visitors[].snapshots[].events[]. Presence diagnostic severity: error. Native JSON type: string. | vendor.optimizely-events.body.key.invalid |
docs |
type |
optional | Native type from the published Event API schema. Body scope: visitors[].snapshots[].events[]. Presence diagnostic severity: error. Native JSON type: string. | vendor.optimizely-events.body.type.invalid |
docs |
quantity |
optional | Native type from the published Event API schema. Body scope: visitors[].snapshots[].events[]. Presence diagnostic severity: error. Native JSON type: integer. | vendor.optimizely-events.body.quantity.invalid |
docs |
revenue |
optional | Native type from the published Event API schema. Body scope: visitors[].snapshots[].events[]. Presence diagnostic severity: error. Native JSON type: integer. Minimum numeric value: -9223372036854776000. Maximum numeric value: 9223372036854776000. | vendor.optimizely-events.body.revenue.invalid |
docs |
value |
optional | Native type from the published Event API schema. Body scope: visitors[].snapshots[].events[]. Presence diagnostic severity: error. Native JSON type: number. | vendor.optimizely-events.body.value.invalid |
docs |
tags |
optional | Native type from the published Event API schema. Body scope: visitors[].snapshots[].events[]. Presence diagnostic severity: error. Native JSON type: object. | vendor.optimizely-events.body.tags.invalid |
docs |
tag_values… |
optional | Native type from the published Event API schema. Body scope: visitors[].snapshots[].events[].tags. Presence diagnostic severity: error. Native JSON type: string or number or boolean. | vendor.optimizely-events.body.tag_values.invalid |
docs |
method |
required | The source uses these transport methods. Complete HTTP capture contract. Presence diagnostic severity: error. | vendor.optimizely-events.http.method.missingvendor.optimizely-events.http.method.emptyvendor.optimizely-events.http.method.invalid |
docs |
body |
required | A complete capture needs the JSON request body. Complete HTTP capture contract. Applies when {"kind":"value_in","param":"method","values":["POST"]}. Presence diagnostic severity: error. Native JSON type: object. | vendor.optimizely-events.http.body.missingvendor.optimizely-events.http.body.invalid |
docs |
content_type |
recommended | The documented request is JSON. Complete HTTP capture contract. Presence diagnostic severity: warning. | vendor.optimizely-events.http.content_type.missingvendor.optimizely-events.http.content_type.emptyvendor.optimizely-events.http.content_type.invalid |
docs |
headers.x-optimizely-strict |
optional | The optional strict-mode header is a boolean token. Complete HTTP capture contract. Presence diagnostic severity: error. | vendor.optimizely-events.http.headers.x-optimizely-strict.emptyvendor.optimizely-events.http.headers.x-optimizely-strict.invalid |
docs |
Validate a payload
pixellint validate request @request.json --rulepack vendor/optimizely-events
Try this failing payload in the playground. An Optimizely event with a string timestamp.
{"url": "https://logx.optimizely.com/v1/events", "method": "POST", "headers": {"Content-Type": "application/json"}, "body": "{\"account_id\": \"synthetic\", \"visitors\": [{\"visitor_id\": \"visitor\", \"snapshots\": [{\"events\": [{\"uuid\": \"opaque-event\", \"timestamp\": \"1792560000000\"}]}]}]}"}
cargo install pixellint
·
npm install pixellint