Data Field Guidelines and Best Practices
Data Field Guidelines
All values in the
dataobject must be strings.Non-string values will be automatically converted to strings.
The
datafield is optional but useful for passing custom information to your app.Data is delivered to the app even when it is in the background.
Best Practices
Keep titles concise: notification titles should be short and descriptive.
Use data for context: include relevant IDs and metadata in the
datafield.Topic naming: use descriptive topic names that match your app's notification categories.
Token management: keep device tokens up-to-date and remove invalid tokens.
Batch requests: when sending to multiple devices, use the
tokensarray for better performance.
03 May 2026