Skip to content

Endpoints

This will eventually document the OpenPush API endpoints. A public demo service is available.

/v1/notify/:device-token(s)

Send notifications to device(s).

/v1/webhooks/:slug/:device-token(s)

Inbound webhook endpoint.

v0.0.0-beta.1

OpenPush Demo

Servers

https://sync-demo.openpu.shSync API
https://demo.openpu.shCloudflare Pages API
https://demo-worker.openpu.shCloudflare Workers API

Default


Get service health

GET
/v1/health

Responses

JSON object containing service status
application/json
JSON
{
"success": true,
"error": "string"
}

Samples

cURL
curl -X GET \
'https://sync-demo.openpu.sh/v1/health' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://sync-demo.openpu.sh/v1/health', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://sync-demo.openpu.sh/v1/health';
$method = 'GET';
$headers = [
    'Content-Type' => 'application/json',
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://sync-demo.openpu.sh/v1/health'

headers = {
    'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)
print(response.json())

Powered by VitePress OpenAPI