SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Resolving "MESSAGE_REJECTED: Missing messageId" Errors in the Event Tester

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:

  1. Navigate to your destination in the Segment Console and open the Event Tester.
  2. Locate the JSON text editor containing your custom test payload.
  3. Manually add a mock canonical messageId key-value pair to the root level of your JSON object. Ensure it uses camelCase formatting.
  4. Example: "messageId": "mock-segment-test-id-1234"
  5. Verify that your destination mapping configuration expects Segment's standard messageId Event Variable to fulfill the required destination field.
  6. 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.

Have more questions? Submit a request
Powered by Zendesk