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.

Why Custom Fields Drop in Segment HTTP API Events

Question

Why are my custom fields missing or dropped when sending events to Segment via the HTTP API? I see the fields in the debugger, but they do not appear in my schema or reach my destinations.

 

Product

Twilio Segment 

 

Environment

Segment Console

 

Answer

Segment enforces a strict event payload structure based on the Segment Spec. Only recognized top-level fields are processed and ingested—such as userId, anonymousId, context, integrations, timestamp, messageId, sentAt, receivedAt, type, version, and:
  • For Track calls: event and properties
  • For Page and Screen calls: name and properties
  • For Identify calls: traits
  • For Group calls: groupId and traits
  • For Alias calls: previousId

Any custom fields placed at the root level (for example, a data object) are automatically ignored or stripped out by the ingestion API to ensure compatibility with downstream destinations.

While the full payload is visible in the Source Debugger’s Raw view, only fields matching the Segment Spec are ingested and routed to destinations. To ensure your custom data is processed, nest it inside the properties, traits, or context objects.

 

Additional Information 

If you are integrating with a third-party source that cannot modify the payload structure, you can use a Segment Source Function to transform incoming events and move custom fields into the correct location before ingestion.

 

Have more questions? Submit a request
Powered by Zendesk