Pushnews API API Reference

Pushnews API documentation

API Endpoint
https://api.pushnews.eu/v2
Contact: support@pushnews.eu
Schemes: https
Version: 2.0.0

Authentication

ApiKeyAuth

in
header
name
X-Auth-Token

Paths

Send a Push Notification

POST /push/{siteId}

Notification object

siteId

Site ID

type
string
in
path
Request Content-Types: application/json
Request Example
{
  "subscriberId": "0d224a02-690f-4ef1-bb47-07da9bac326c_49c1ea36-dadc-4d4b-8955-529776f68bae",
  "message": {
    "title": "Hello!",
    "body": "Welcome to Pushnews :)",
    "url": "https://www.google.com/?utm_source=pushnews",
    "icon": "https://ilabs-static.s3.amazonaws.com/push/icon128_pushnews.jpg"
  }
}
200 OK

Push Notification was sent successfully

400 Bad Request

Missing required data

402 Payment Required

Forbidden Operation

404 Not Found

Site not found

Response Content-Types: application/json
Response Example (200 OK)
{
  "success": true,
  "message": "Notification was sent",
  "data": {
    "notificationId": "11111111-2222-3333-4444-555555555555"
  }
}

Schema Definitions

Notification: object

subscriberId: string
message: Message
Example
{
  "subscriberId": "0d224a02-690f-4ef1-bb47-07da9bac326c_49c1ea36-dadc-4d4b-8955-529776f68bae",
  "message": {
    "title": "Hello!",
    "body": "Welcome to Pushnews :)",
    "url": "https://www.google.com/?utm_source=pushnews",
    "icon": "https://ilabs-static.s3.amazonaws.com/push/icon128_pushnews.jpg"
  }
}

Message: object

title: string
body: string
url: string
icon: string
Example
{
  "title": "Hello!",
  "body": "Welcome to Pushnews :)",
  "url": "https://www.google.com/?utm_source=pushnews",
  "icon": "https://ilabs-static.s3.amazonaws.com/push/icon128_pushnews.jpg"
}

ApiResponse: object

success: boolean
message: string
data: object
Example
{
  "success": true,
  "message": "Notification was sent",
  "data": {
    "notificationId": "11111111-2222-3333-4444-555555555555"
  }
}