API Payload Limits
Learn about payload limits when working with Novu's API.
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.
Single event trigger
For single event triggers (/events/trigger), the error response will be:
Bulk trigger event
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.
Broadcast event
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
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
Idempotency
Learn how to use idempotency keys to safely retry API requests without causing duplicate operations
Trigger event POST
Trigger event is the main (and only) way to send notifications to subscribers. The trigger identifier is used to match the particular workflow associated with it. Maximum number of recipients can be 100. Additional information can be passed according the body interface below. To prevent duplicate triggers, you can optionally pass a **transactionId** in the request body. If the same **transactionId** is used again, the trigger will be ignored. The retention period depends on your billing tier.