This endpoint is deprecated.

Send single Push notification

Use this method to send a single Push notification to one or multiple recipients.

Please log in to see full path URL. Learn why.
post
/push/2/message/single
Request Body schema:
application/json
collapse all -
from
required
string [ 1 .. 80 ] characters

PUSH Application Code you are using to send messages. Application Code is the application identifier which links your mobile application to the application profile created in Infobip Platform. It is required to insert the Application Code in Mobile Messaging SDK configuration once you implement it in your mobile application.

to
required
object

Recipient destination address. Check examples how to work with recipients

property name*
object

Recipient destination address. Check examples how to work with recipients

text
required
string [ 1 .. 4000 ] characters

Text of the message that will be sent.

validityPeriod
integer <int64> >= 0

The message validity period. Unless specified differently in validityPeriodTimeUnit, it is expressed in hours. Once the period expires, messages that haven't left the Infobip platform or the Cloud (APNS or FCM) will be canceled and won't get delivered. Default value is 48h. Minimum value is 30 sec. Maximum value is 72h.

validityPeriodTimeUnit
string
Enum: "SECONDS" "MINUTES" "HOURS"

Time unit for validity period. Defaults to hours.

sendAt
string <date-time>

Used for scheduled Push notifications. Message will be sent at scheduled time. Date and time when the message is to be sent. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ, and can only be scheduled for no later than 180 days in advance.

customPayload
object

Additional data that can be delivered with the Push message. customPayload must be formatted as JSON object.

property name*
object

Additional data that can be delivered with the Push message. customPayload must be formatted as JSON object.

notificationOptions
object

JSON object that contains notification options.

title
string [ 0 .. 45 ] characters

Notification title displayed within the notification. Requires iOS 10+ or Android 4.1+ (may depend on Android custom firmware)

soundEnabled
boolean

Sound when a notification arrives on a device.

soundName
string

Name of the custom sound played when a notification arrives on a device. The audio file should be located in the app with max 30 seconds length. File extension is required for iOS and optional for Android. (Example: notification_sound.wav). Check Android and iOS usage details. To play a custom sound, soundEnabled must be set to true.

vibrationEnabled
boolean

Notification vibration (Android only).

isSilent
boolean

Set to true to send silent push message. Such messages aren’t displayed on device lock screen and in the notification center. Silent messages can be used to deliver custom data to your mobile application or to trigger an in-app notification.

badge
integer <int32>

Badge counter (iOS only).

contentUrl
string

URL of the image displayed in the notification. Rich push notifications are available on devices with iOS 10 and Android 4.1.+. Supported on iOS since MM SDK version 2.5.8. Supported on Android since MM SDK version 1.6.4.

category
string

Category id for actionable notification. Supported on Android since MM SDK version 1.6.16. Supported on iOS since MM SDK version 2.6.9. Predefined category ids: mm_accept_decline - Accept & Decline button actions.

showInApp
boolean

Show notification in application.

inAppStyle
string
Enum: "MODAL" "BANNER"

Set to MODAL to use in app dialog for actionable message or BANNER to show a standard banner view. MODAL is supported on iOS from 3.6.0, on Android from 1.13.0 and on Cordova from 0.7.0. BANNER is supported from iOS 5.0.0, Android 2.0.0 and Cordova 1.0.0

inAppExpirationPeriod
integer <int64> >= 0

Sets validity period for in-app notification. Users will only see in-app if they received it to their device within validity period, which starts from sending time. Time unit for this parameter is set by property of inAppExpirationTimeUnit. Default value is 48h. Supported on Android since version 3.4.0, on iOS since version 8.2.1

inAppExpirationTimeUnit
string
Enum: "MINUTES" "HOURS"

Time unit for in-app expiration.

inAppDismissTitle
string

Specifies custom title for Dismiss button. Supported on Android since version 3.4.0, on iOS since version 8.2.1.

inAppOpenTitle
string

Specifies custom title for Open button. Supported on Android since version 3.4.0, on iOS since version 8.2.1.

primaryButtonAction
object

Defines which action to perform on notification tap or on in-app notification primary button tap. More information for Android, iOS, Cordova, React Native.

resource
string

Defines which URL or path should be opened.

type
string
Enum: "WEB_VIEW_URL" "DEEP_LINK" "OPEN_URL_IN_BROWSER"

WEB_VIEW_URL - opening of the external web content in webView, OPEN_URL_IN_BROWSER - opening of the external web content in device browser, DEEP_LINK - opening of particular mobile app screen over deep link.

inboxTopic
string

A case sensitive topic name to save a message to an inbox. If the topic name does not exist for a specified account, message sending will be rejected.

notifyUrl
string

The URL on your call back server on to which a delivery report will be sent. The retry cycle for when your URL becomes unavailable uses the following formula: 1min + (1min * retryNumber * retryNumber).

notifyContentType
string

Preferred Delivery report content type. Supported content types: application/json, application/xml.

callbackData
string

Additional client's data that will be sent onto notifyUrl. The maximum value is 200 characters.

targetOnlyPrimaryDevices
boolean

Set to true to only send messages to push devices which are marked as primary devices. By default, messages will be sent to all targeted devices, including both primary and non-primary.

Responses

200

OK

400

Bad request

401

Unauthorized

403

Forbidden

500

Internal Server Error

Request samples

Content type
application/json
Copy
Collapse all
{
  • "from": "d417d38814740a23f50b5c876e226445-0f700564-abbf-4b5b-beae-86a4ef410904",
  • "to":
    {
    • "externalUserId": "customer_21234"
    },
  • "text": "This Message was sent by targeting exact externalUserId.",
  • "validityPeriod": 30,
  • "validityPeriodTimeUnit": "MINUTES",
  • "customPayload":
    {
    • "someData": "someData",
    • "targetUrl": "www.someDomain.com"
    },
  • "notificationOptions":
    {
    • "soundEnabled": false,
    • "badge": 1,
    • "category": "mm_accept_decline",
    • "showInApp": true,
    • "inAppExpirationPeriod": 6,
    • "inAppExpirationTimeUnit": "MINUTES",
    • "inAppDismissTitle": "Close",
    • "inAppOpenTitle": "Show",
    • "primaryButtonAction":
      {},
    • "inboxTopic": "Promotion"
    },
  • "notifyUrl": "https://example.com",
  • "notifyContentType": "application/json",
  • "callbackData": "DLR callback data"
}

Response samples

Content type
application/json
Copy
Collapse all
{
  • "bulks":
    [
    • {
      • "to":
        {
        • "externalUserId": "customer_21234"
        },
      • "status":
        {
        • "groupId": 1,
        • "groupName": "PENDING",
        • "id": 26,
        • "name": "PENDING_ACCEPTED",
        • "description": "Message accepted, pending for delivery"
        },
      • "messageCount": 1,
      • "bulkId": "oungulj9xm9b3hixkupu"
      },
    • {
      • "to":
        {
        • "externalUserId": "customer_113456"
        },
      • "status":
        {
        • "groupId": 1,
        • "groupName": "PENDING",
        • "id": 26,
        • "name": "PENDING_ACCEPTED",
        • "description": "Message accepted, pending for delivery"
        },
      • "messageCount": 1,
      • "bulkId": "gby7cz3x6m244n2e4vzb"
      }
    ]
}

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products
Learn more
Service status

Copyright @ 2006-2025 Infobip ltd.