POST
/
events.json
curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: 519c40c31072fe5dcbe0c24651c7489fab012bba" \
-d '{  
  "event":{  
    "notification_type":"push",
    "environment":"production",
    "user":{  
      "ids":"96831397"
    },
    "message":"payload=eyJhcHMiOnsiYWxlcnQiOiJIZWxsbywgV29ybGQhIiwiYmFkZ2UiOjc3Nywic291bmQiOiJkZWZhdWx0In19",
    "push_type":"apns"
  }
}' \
https://api.quickblox.com/events.json
{
  "event": {
    "id": 30961913,
    "event_type": "one_shot",
    "message": "payload=eyJhcHMiOnsiYWxlcnQiOiJIZWxsbywgV29ybGQhIiwiYmFkZ2UiOjc3Nywic291bmQiOiJkZWZhdWx0In19",
    "date": null,
    "period": null,
    "name": null,
    "occured_count": 0,
    "created_at": "2019-11-09T19:40:25Z",
    "updated_at": "2019-11-09T19:40:25Z",
    "end_date": null,
    "active": true,
    "application_id": 76730,
    "user_id": 91142495,
    "kind": "API",
    "environment": "production",
    "tag_query": null,
    "notification_channel": {
      "name": "apns"
    }
  }
}

Recipe

Only one of (Optional) parameters is required.

Body Parameters

notification_type
string
required

Type of notification. Possible values are: push and email.

push_type
string

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.

environment
string
required

An environment of the notification. Possible values are: development and production.

event_type
string

Event type. Possible values are:

  • one_shot - a one-time event caused by an external object (valid only if the date is not specified).
  • fixed_date - a one-time event that occurs at a specified date (valid only if the date is specified).
  • period_date - is a reusable event that occurs within a given period from the initial date (valid only if the period is specified).
    Default:
  • one_shot - if date is not specified.
  • period_date - if period is specified.
  • fixed_date - if date is specified.
message
string
required

Encoded message payload. Possible values are: Base64 encoded plain text or push notification payload (Push notifications formats).

user
object
external_user
object
date
date-time

The date of the event to send on. If the event_type=fixed_date, the date can not be in the past.

end_date
date-time

The date when the event is completed. Must be not less than the date.

period
date-time
The period of the event in seconds.
name
string

The name of the event. Service information. Only for your own usage.

Headers

QB-Token
string
required
A user or application session token. See our Authentication page to learn more about session tokens. Must be used either QB-Token or Authorization.

Responses

curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: 519c40c31072fe5dcbe0c24651c7489fab012bba" \
-d '{  
  "event":{  
    "notification_type":"push",
    "environment":"production",
    "user":{  
      "ids":"96831397"
    },
    "message":"payload=eyJhcHMiOnsiYWxlcnQiOiJIZWxsbywgV29ybGQhIiwiYmFkZ2UiOjc3Nywic291bmQiOiJkZWZhdWx0In19",
    "push_type":"apns"
  }
}' \
https://api.quickblox.com/events.json
{
  "event": {
    "id": 30961913,
    "event_type": "one_shot",
    "message": "payload=eyJhcHMiOnsiYWxlcnQiOiJIZWxsbywgV29ybGQhIiwiYmFkZ2UiOjc3Nywic291bmQiOiJkZWZhdWx0In19",
    "date": null,
    "period": null,
    "name": null,
    "occured_count": 0,
    "created_at": "2019-11-09T19:40:25Z",
    "updated_at": "2019-11-09T19:40:25Z",
    "end_date": null,
    "active": true,
    "application_id": 76730,
    "user_id": 91142495,
    "kind": "API",
    "environment": "production",
    "tag_query": null,
    "notification_channel": {
      "name": "apns"
    }
  }
}