# EVENT_SCHEMA_MISMATCH

- Surface: API
- HTTP status: 400
- Details: `{ eventName: string, eventDefinitionVersionId: string, issues: Array<{ path: string[], message: string }> }`

## Cause

The Metric Event did not match the published Event Definition Version: a field or Dimension was unknown, missing, or the wrong type, or a JSON value violated its declared schema.

## Fix

Send the declared fields and Dimensions with their published types and constraints. If the Metric Event shape has changed, publish a new Event Definition Version before sending that shape.

## Related

- [ENTITY_TYPE_MISMATCH](https://splitch.dev/docs/error/ENTITY_TYPE_MISMATCH)
- [EVENT_DEFINITION_UNPUBLISHED](https://splitch.dev/docs/error/EVENT_DEFINITION_UNPUBLISHED)
- [VALIDATION_ERROR](https://splitch.dev/docs/error/VALIDATION_ERROR)

Source: https://splitch.dev/docs/error/EVENT_SCHEMA_MISMATCH