Create Event
Create notification event.
Recipe
Create event
Create event
1. Use an `event` parameter to set data associated with the event
2. Set a notification type
Use a notication_type
parameter to set the type of notification.
3. Set a push notification environment
Use an environment
parameter to set the notification environment.
Here, the production environment is set which means the pushes will work for a production environment only.
4. Use a `user` parameter to set the ID of push notification recipient.
5. Set the ID of push notification recipient
You can specify as many IDs as you need via comma.
6. Set a push message
A push message text should be Base64-encoded.
Here, the iOS push message is set. For iOS push, you should add a payload before a message.
7. Set a push notification platform
Use a push_type
parameter to set the push notification platform.
Here, the push_type
is set to apns
. This means that the push will be delivered to iOS devices.
8. As a result, the API returns a newly created event.
Create event with period date
Create event with period date
1. Use an `event` parameter to set data associated with the event
2. Set a notification type
Use a notication_type
parameter to set the type of notification.
3. Set a push notification environment
Use an environment
parameter to set the notification environment.
Here, the production environment is set which means the pushes will work for a production environment only.
4. Set an event type
Use an event_type
method to set the event type.
Here, the period_date
event type is set. This event occurs within a given period from the initial date. Valid only if the period
is specified.
5. Set a date of the event
Use a date
parameter to set the date for the event to be sent on.
6. Set a period of the event
Use a period
parameter to set the period of the event.
7. Set an end date of the event
Use an end_date
parameter to set the date for the event to end.
8. Set a push message
A push message text should be Base64-encoded.
Here, the iOS push message is set. For iOS push, you should add a payload before a message.
9. Set a push notification platform
Use a push_type
parameter to set the push notification platform.
Here, the push_type
is set to apns
. This means that the push will be delivered to iOS devices.
10. As a result, the API returns a newly created event.
Create event for users with tags
Create event for users with tags
Only one of (Optional) parameters is required.
Body Parameters
Type of notification. Possible values are: push
and email.
Used only if notification_type=push
, otherwise ignored. If not set, the notification will be delivered to all possible devices for specified users. Possible values are: apns
, apns_voip
, gcm
.
An environment of the notification. Possible values are: development
and production
.
Event type. Possible values are:
one_shot
- a one-time event caused by an external object (valid only if thedate
is not specified).fixed_date
- a one-time event that occurs at a specified date (valid only if thedate
is specified).period_date
- is a reusable event that occurs within a given period from the initial date (valid only if theperiod
is specified).
Default:one_shot
- ifdate
is not specified.period_date
- ifperiod
is specified.fixed_date
- ifdate
is specified.
Encoded message payload. Possible values are: Base64 encoded plain text or push notification payload (Push notifications formats).
The date of the event to send on. If the event_type=fixed_date
, the date
can not be in the past.
The date when the event is completed. Must be not less than the date
.
The name of the event. Service information. Only for your own usage.
Headers
Responses
201
201
A successful response.