PUSH NOTIFICATIONS API
NotifyVisitors API endpoints enable you to send push notifications to the users to nudge them to perform an action on your site. You can send the notifications to all the subscribers, or a specific user, or any segment.
You can call on the below API to send push notifications to the users.
API Endpoint For IOS
- Send notifications on ios devices to the users via different API endpoints provided by NotifyVisitors.
https://push.notifyvisitors.com/api/v1/ios/
NOTE :
You can send the push notifications on all these platforms to an individual, to a particular segment, or to all the subscribers
API Endpoints For Different Segments :
To Individual User
- You can send notifications to the individual subscribers on the basis of their subscriber ID or User ID via the below API endpoint
https://push.notifyvisitors.com/api/v1/ios/send
You have to send the post parameters such as title, message, URL of the notification of an individual subscriber to an API endpoint. Read below for more information.
To All The Subscribers
- Call the below API endpoint to send notifications to all the subscribers.
https://push.notifyvisitors.com/api/v1/ios/broadcast/all
The title, message, URL of the notification, and image have to be sent as the post parameters to the API endpoint.
To A Particular Segment
- Call the below API endpoint to send notifications to subscribers of a particular
segment.
https://push.notifyvisitors.com/api/v1/ios/broadcast/segment
Title message, URL of the notification have to be sent as the post parameters to the API endpoint.
API Rate Limit
- The API rate limit is the number of time the API can be requested per minute.
- You can make up to 500 API requests per minute on an API.
- If the limit exceeds, the app will throw error in Response. All API requests are subject to rate limits.
Example
See the below example
curl --request POST \
--url https://push.notifyvisitors.com/api/v1/ios/send \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-brand-id: YOUR_BRAND_ID'\
--data '{"user_id / subscription_id":"1234",
"notification_id":3456,
"title":"RATING FEEDBACK",
"message":"TEST PUSH",
"url":"https://www.notifyvisitors.com/"
}'
Note :
- Replace YOUR_API_KEY with NotifyVisitors' API key.
- Replace YOUR_BRAND_ID with NotifyVisitors' Brand id .
- You can select parameters from the given table on the right to send user attributes in request body.
PARAMETERS | TYPE | DESCRIPTION |
---|---|---|
user_id/subscription_id | string | Unique identification ID of the user |
notification_id | int64 | Unique Id that is assigned to the users |
ios_ifv | string | user's device from where the user has subscribed |
tag | string | Tags are assigned to the users to segment them on the basis of certain factors |
time | - | Number of seconds after which you want to send the notification. |
title | string | Maximum character limit for the title must be 70 characters |
message | string | Maximum character limit for the should be 130 characters |
url | string | Call to action URL |
image_url | string | Image URL must be on HTTPs URL |
hero_image_url | string | URL needs to be on HTTPs. Works only for chrome subscribers |
button_one_title | string | Maximum length of the call-to-action button, works only for chrome subscribers |
button_two_title | string | Allowed only in chrome version and above |
button_two_url | string | Works only for chrome subscribers |
segment_id | int_64 | Unique segment ID |
schedule_date | string | Date scheduled for sending push |
Schedule_time | string | Time scheduled for sending push |
time_zone | string | Time zone (default value 0) |
hero_image_url | string | URL needs to be on HTTPs. Works only for chrome subscribers |