Instant sending
Version date: 20 December 2024
To authorize, you need to add the header
"Authorization: Bearer ..."
(get your API KEY in your personal account on "Personal" tab).
Endpoints
Send Push Instantly
POST https://core.push.express/api/b/v2/send/instant
Description: This endpoint allows user to send push right now to devices chosen by filters. It creates new one-time sending with due moment 2 minutes after request, creates and attaches new push with translations to this newly created one-time sending in future.
Request
Body params:
name
, required, string. Name of scheduler.filters
, required, object. Filters to choose devices. More on filters see inone-time sending in future API reference
.push
, required, object. Push with translations to send. More on push parameters see inpushes API reference
.
Response:
201: New one-time sending in future created
sched_id
, int. ID of newly created one-time sending.push_id
, int. ID of newly created push.translations
, object. Info about newly created translations for push.
If 201 got there is no way to cancel sending via API. Use web personal account to do it if needed.
Error handling
All HTTP response codes 2xx SHOULD be considered as success. Requested action was executed successfully.
All HTTP response codes above 400 MUST be considered as error. Requested action failed. Retries policy should be hold according to HTTP specification.
Common API errors:
400 - request error. Request has invalid data. Check you request (url, headers, payload)
401 is returned when provided API token is invalid. Check your authentification data.
403 is returned when access to resource for current user is denied.
404 is returned when resource doesn't exist. Check your request data.
Example: PUT
https://core.push.express/api/b/v2/sched/:sched_type/:sched_id/pushes
returns 404 when providedsched_id
doesn't existAll HTTP response codes 5xx - other errors from proxy servers, load balancers, etc. There may or may not have some explanation in response body. These errors always require retries.
API errors have content-type: application/json
header and json response body
Example: {"error": "validation error: ...", "req_id":"<string>"}
Response parameters:
req_id
string is a request ID. It is used by support for problem solving, please, provide it to support if problem emerged.error
object, describing errors.
Non-API errors like 502, 504, etc., may or may not include a description.
Last updated