Payload size limits are an essential functionality for ensuring optimal performance and reliability of the system. They safeguard system resources by preventing oversized payloads from impacting API performance and ensure efficient processing of event triggers.
Payload size limit#
All event trigger operations have a 512KB (524,288 bytes) payload size limit. This limit applies to the following endpoints:
- Trigger event - Single event triggers
- Bulk trigger event - Batch event triggers
- Broadcast event - Events sent to all subscribers
Attachments are excluded from the payload size calculation and have a separate size limit.
What counts towards the limit#
The payload size limit includes:
- Event payload data
- Custom data and properties
- All other request body content
Error messages#
When your payload exceeds the 512KB limit, you’ll receive an error response indicating the exact size and the limit exceeded.
For single event triggers (/events/trigger), the error response will be:
For bulk event triggers (/events/trigger/bulk), the error response includes the index of the event that exceeded the limit:
When using bulk trigger, each event in the array is validated individually against the 512KB limit. Ensure that every event payload stays within the limit.
For broadcast events (/events/trigger/broadcast), the error response will be:
Attachment size limit#
Email attachments have a separate size limit:
- Total attachment size: 20MB for all attachments included in an email. Attachments do not count towards the 512KB payload limit
For more information about sending email attachments, refer to the Sending Attachments documentation.
Related documentation#
- Rate Limiting - Learn about API rate limits
- Trigger Event - Single event trigger API
- Bulk Trigger Event - Batch event trigger API
- Broadcast Event - Broadcast to all subscribers