Issue
When testing a custom event payload using the Event Tester for an Actions destination (such as Google Ads Conversions), the test fails and returns a MESSAGE_REJECTED - messageId not present in event error. This occurs indicating that the request was blocked, even if a proprietary message ID field is present in the provided JSON payload.
Product
Segment
Environment
Segment Console
Cause
This error occurs because many Actions destinations strictly require Segment's canonical messageId field to process the event. During live data flow, Segment's ingestion pipeline automatically generates and appends this camelCase messageId to every event. However, when manually pasting a raw, pre-ingestion JSON payload into the Event Tester, this automatically generated field is missing.
When the validation framework evaluates the test payload against the destination configuration, it cannot find the required messageId field. Consequently, the request is blocked and returns the MESSAGE_REJECTED error code due to missing required fields in the payload.
Resolution
To resolve this validation error and successfully test your event, you must manually supply the missing canonical ID in your test payload:
- Navigate to your destination in the Segment Console and open the Event Tester.
- Locate the JSON text editor containing your custom test payload.
- Manually add a mock canonical messageId key-value pair to the root level of your JSON object. Ensure it uses camelCase formatting.
- Example: "messageId": "mock-segment-test-id-1234"
- Verify that your destination mapping configuration expects Segment's standard messageId Event Variable to fulfill the required destination field.
- Send the test event again.
Additional Information
If your goal is to pass a proprietary or custom message ID (e.g., message_id in snake_case) to the destination as a custom variable, ensure that the Event Variable selected in your field mapping exactly matches the spelling and casing of the key as it appears in your source payload. Mismatches between the mapping configuration and the payload keys will also result in validation errors.