Notifications
SendNotification
Create notification
post/notification/send
Request body
channelIdstring required
<p>The channel ID.</p>
titlestring
<p>The notification title (subject for email channels).</p>
textstring
<p>The notification text (HTML body for email channels). For custom HTML newsletters, embed AD SLOT placeholders as merge tags: <code>{{adSlot_<slotId>}}</code> where <code>slotId</code> is the EmailAdSlots document ID (e.g. <code>{{adSlot_xYz123AbC}}</code>). Placeholders are resolved with configured ad campaign content at send time.</p>
urlstring
<p>The notification URL.</p>
iconUrlstring
<p>The notification's icon.</p>
mediaUrlstring
<p>The notification's large media/image.</p>
fetchMediaUrlboolean
<p>Fetches a mediaUrl from the provided url if no mediaUrl is provided.</p>
scheduledAtnumber
<p>A unix timestamp for scheduling notifications (must be in the future).</p>
expiresAtHoursnumber
<p>Hours after the notification will expire.</p>
expiresAtMinutesnumber
<p>Alternatively: Minutes after the notification will expire.</p>
balancedDeliveryTypestring
<p>Evenly distribute delivery type, can be 'balancedDeliveryMinutes' or 'balancedDeliverySendings'</p>
balancedDeliveryMinutesnumber
<p>Evenly distribute delivery in these minutes instead of sending to all subscriptions instantly.</p>
balancedDeliverySendingsnumber
<p>Distribute delivery in specified number per minute instead of sending to all subscriptions instantly.</p>
customDataobject
<p>Custom data payload which will be sent to the devices.</p>
subscriptionIdstring
<p>The subscription ID(s) (string or alternatively an array of strings). Will broadcast to all subscriptions if not given. If an array is provided, the maximum amount of items in this array is 50000.</p>
testSubscriptionsboolean
<p>If true, will ignore other targeting settings and only send to defined test subscriptions.</p>
customAttributesobject
<p>Targeting: An object of custom attributes to filter subscriptions (e.g.: { user_id: 123 } OR { user_id: [123, 124] }). Will broadcast to all subscriptions if not given.</p>
tagsstring[]
<p>Targeting: array of tag IDs.</p>
tagsLogicstring
<p>One of: 'and', 'or', default: 'or'</p>
excludeTagsstring[]
<p>Targeting: array of tag IDs.</p>
externalTagsstring[]
<p>Targeting: array of tag IDs.</p>
excludeExternalTagsstring[]
<p>Targeting: array of tag IDs.</p>
topicsstring[]
<p>Targeting: array of topic IDs.</p>
topicsLogicstring
<p>One of: 'and', 'or', default: 'or'</p>
excludeTopicsstring[]
<p>Targeting: array of topic IDs.</p>
excludeTopicsLogicstring
<p>One of: 'and', 'or', default: 'or'</p>
segmentsstring[]
<p>Targeting: array of segment IDs.</p>
segmentsLogicstring
<p>One of: 'and', 'or', default: 'or'</p>
excludeSegmentsstring[]
<p>Targeting: array of segment IDs.</p>
excludeSegmentsLogicstring
<p>One of: 'and', 'or', default: 'or'</p>
platformstring[]
<p>Targeting: array of platform names (case-sensitive, e.g. "Android", "Mac OS", ..).</p>
platformLogicstring
<p>One of: 'include', 'exclude', default: 'include'</p>
browserstring[]
<p>Targeting: array of browser names (case-sensitive, e.g. "Chrome", "Firefox", ..).</p>
browserLogicstring
<p>One of: 'include', 'exclude', default: 'include'</p>
countrystring[]
<p>Targeting: array of country IDs (e.g. "US", "DE", ..).</p>
countryLogicstring
<p>One of: 'include', 'exclude', default: 'include'</p>
languagestring[]
<p>Targeting: array of language IDs (e.g. "en", "de", ..).</p>
languageLogicstring
<p>One of: 'include', 'exclude', default: 'include'</p>
actionsstring[]
<p>Array of action objects: { title, url, [icon] }.</p>
groupsstring[]
<p>Array of notification group ids. Used for e.g. tracking similar notifications.</p>
clickAssignTagsstring[]
<p>Array of notification tag ids, which are automatically assigned to subscriptions when the notification has been clicked.</p>
clickAssignTopicsstring[]
<p>Array of notification topic ids, which are automatically assigned to subscriptions when the notification has been clicked.</p>
socialSharingActionsboolean
<p>Use pre-defined social sharing actions. Hint: 'actions' will be ignored if 'socialSharingActions' is given.</p>
autoHideboolean
<p>Automatically hide notification after approx. 20 seconds (only available for Web Push)</p>
bounceUrlstring
<p>Set a bounce URL for this notification</p>
campaignIdstring
<p>Campaign id for later analysis</p>
externalCampaignIdstring
<p>External campaign id. If provided, will find or create a NotificationCampaign by externalId and channel. If campaign exists, its _id will be used as campaignId. If not, a new campaign will be created with the provided campaignName (or externalCampaignId as fallback).</p>
campaignNamestring
<p>Campaign name for later analysis</p>
categorystring
<p>Android Notification Category ID</p>
transactionalboolean
<p>Tags the notification as transactional message, just used for filtering in the backoffice</p>
breakingNewsboolean
<p>Marks the notification as breaking news (bypasses daily/hourly per-subscription push limits, higher queue priority on Enterprise). Requires a plan with breaking news enabled. Ignored otherwise.</p>
translationsEnabledboolean
<p>Enable per-language notification content. With A/B testing, translations belong on each variant (Notification → A/B variant → translations).</p>
abTestingboolean
<p>Optionally enable A/B testing</p>
abTestingAutoCompareboolean
<p>Optionally compares the best notification after 30 minutes and sends the best result to the rest</p>
abTestingPercentnumber
<p>A/B test percentage (0 to 100)</p>
machineLearningboolean
<p>Optionally enable machine learning (available for Enterprise plans).</p>
machineLearningMinimumPercentagenumber
<p>Minimum percentage of total subscriptions to send to if the ML algorithm does not find enough subscriptions (rest of the subscriptions are filled up).</p>
walletPassstring
<p>Optionally set Wallet Pass ID</p>
silentboolean
<p>Set this to true if you want to send a silent notification (only available for App Push)</p>
soundFilenamestring
<p>Optionally set iOS sound filename</p>
soundVolumenumber
<p>Optionally set iOS sound volume (0.0 to 1.0)</p>
soundCriticalboolean
<p>Optionally set iOS sound critical (warning: only for pre-approved apps, see: https://developer.apple.com/contact/request/notifications-critical-alerts-entitlement/)</p>
bestDeliveryTimeboolean
<p>Enables the optimal delivery time for this message (will deliver 7 days by default, set bestDeliveryTime24Hours: true to send for 24 hours only)</p>
bestDeliveryTime24Hoursboolean
<p>Enables the optimal delivery time for 24 hours (bestDeliveryTime needs to be true for this to work)</p>
prioritystring
<p>Optionally set priority. Possible values: "high" or "normal". Defaults to "high".</p>
templateIdstring
<p>Set the Notification / Email Template ID instead of using "text" for specifiy the content</p>
additionalAttributesobject
<p>Provide additional attributes for each subscription, that will be replaced as placeholders automatically (e.g. { "XXXXXXX1": { "first_name": "John" }, "XXXXXXX2": { "first_name": "Sam" } }). The keys of this object represent the Subscription ID's by default. You can also use an indexed custom attribute for this (e.g. "user_id"), by specifying the parameter "additionalAttributesKey". Only available for transactional notifications. Max. subscriptions per request: 5000.</p>
additionalAttributesKeystring
<p>When using "additionalAttributes", the keys of this object represent the Subscription ID's by default. You can specify a indexed custom attribute for this here (e.g. "user_id"). Only available for transactional notifications.</p>
emailNewsletterboolean
<p>Optionally set this to true to send email newsletters. Use "title" for the email subject and "text" for the HTML content.</p>
emailContentTypestring
<p>Email content type for custom HTML newsletters. Use <code>"html"</code> when sending custom HTML via <code>text</code>.</p>
emailAccountstring
<p>Set the Email Account ID</p>
emailSenderNamestring
<p>Set the Email Sender Name</p>
emailRecipientstring
<p>Transactional Emails: Specify the recipient's email address(es) (string or alternatively an array of strings) instead of using a subscriptionId</p>
smsProviderstring
<p>Set the SMS Provider ID</p>
phoneNumberstring
<p>Transactional SMS: Specify the recipient's phone number(s) (string or alternatively an array of strings) in E.164 format instead of using a subscriptionId</p>
subscriptionAttributesobject
<p>Transactional Emails/SMS: When using Emails with templateId: Specify the subscription's custom attributes which will be replaced as variables in the template fields.</p>
collapseKeystring
<p>Multiple notifications with the same collapse key will be automatically replaced.</p>
threadIdstring
<p>Multiple notifications with the same thread ID will be automatically grouped together. (Supported only for iOS right now)</p>
interruptionLevelstring
<p>Interruption levels indicate the priority and delivery timing of a notification, to 'interrupt' the user. Up until iOS 15, Apple primarily focused on Critical notifications. Now they have expanded this to include the following four levels: ['active', 'passive', 'time-sensitive', 'critical'].</p>
relevanceScorestring
<p>A Relevance Score is a score to be set per notification to indicate how it should be displayed when grouped. The system uses the relevance score, a value between 0 and 1, to sort the notifications from your app. The highest score gets featured in the notification summary. This was introduced in iOS15+. Expected values [0, 0.75, 0.5, 0.25, 1]</p>
whatsappTemplateNamestring
<p>Name of the WhatsApp Template (required when channel type is Whatsapp)</p>
externalIdstring
<p>Used for checking for API notification duplicates internally when the corresponding setting is enabled in the channel settings.</p>
iosCategoryobject
<p>iOS notification category, which is available as categoryIdentifier in the app. It will not work together with the <code>actions</code> field, as the SDK will then dynamically generate a fitting category to display the notification buttons.</p>
iosLiveActivityContentStateobject
<p>iOS Live Activity Content state</p>
iosLiveActivityEventstring
<p>iOS Live Activity Event ("update", "end")</p>
typestring
<p>Notification type ("iosLiveActivity")</p>
iosLiveActivityDismissalDatestring
<p>ios Live Activity Dismissal Date (Use Epoch Timestamp in string)</p>
appBannerIdstring
<p>App Banner ID If silent:true and the appBannerId is provided, then after the subscriber receives the notification and opens the app, it will show the appbanner</p>
autoHandleDeepLinkboolean
<p>Used for automatic handling of Deep Links (only available for App Push)</p>
chatNotificationboolean
<p>Used for defining notifications as "Chat notification" which will be shown in the ChatView, if used (only available for Web / App Push)</p>
chatMessagestring
<p>Used for defining the message to be shown in the ChatView, if used (only available for Web / App Push)</p>
testSubscriptionsConsiderTargetingboolean
<p>Test subscriptions will be considered</p>
Response
Error-Response:
errorstring
successboolean required
notificationIdstring required
Changes
No recorded changes to this endpoint across all 1 revision of this API.