Send web push notifications to your website visitors. Grow your audience, increase engagement, and boost revenue.
REST API to send push notifications, manage subscribers, and view analytics programmatically.
All API requests require an API key sent in the X-HulkPush-Key header.
curl -X POST https://hulkpush.com/api/v1/push/send \
-H "X-HulkPush-Key: hp_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"site_id": 1, "title": "Hello!", "body": "Test notification", "url": "https://example.com"}'
/api/v1/push/send
Send an instant push notification to all subscribers (or a segment) of a site.
| Name | Type | Required | Description |
|---|---|---|---|
| site_id | integer | Yes | Your site ID |
| title | string | Yes | Notification title (max 65 chars) |
| body | string | Yes | Notification body (max 120 chars) |
| url | string | Yes | Click-through URL |
| icon_url | string | No | Notification icon URL |
| image_url | string | No | Large image URL |
| segment_id | integer | No | Target a specific segment |
| ttl | integer | No | Time to live in seconds (60-86400, default: 3600) |
| actions | array | No | Up to 2 action buttons [{title, url}] |
{
"success": true,
"campaign_id": 42,
"message": "Push notification is being sent."
}
/api/v1/push/schedule
Schedule a push notification for a future date/time.
Same parameters as /push/send plus scheduled_at (required, ISO 8601 datetime in the future).
/api/v1/subscribers
List subscribers with pagination. Filter by site_id, status, country, device_type, browser.
Permission: subscribers:read
/api/v1/subscribers/count
Get total, active, and unsubscribed count. Optional: site_id, status filters.
/api/v1/subscribers/{id}
Unsubscribe a specific subscriber by ID.
Permission: subscribers:write
/api/v1/campaigns
List campaigns with pagination. Filter by site_id, status, type.
/api/v1/campaigns/{id}
Get campaign details with notification info and delivery stats (sent, delivered, clicked, CTR).
/api/v1/analytics/overview
Get analytics overview: total/active subscribers, sent, clicked, CTR, delivery rate. Optional: days param (default: 30).
/api/v1/sites
List all your sites with ID, name, domain, status, and subscriber count.
Configure webhooks in your dashboard to receive real-time event notifications via POST requests.
push.sent - When a push notification is deliveredpush.clicked - When a subscriber clicks a notificationsubscriber.new - When a new subscriber registerssubscriber.unsubscribed - When a subscriber unsubscribes$signature = hash_hmac('sha256', $requestBody, $yourSecretKey);
if (hash_equals($signature, $request->header('X-HulkPush-Signature'))) {
// Valid webhook
}
| Code | Description |
|---|---|
| 401 | Invalid or missing API key |
| 403 | Insufficient permissions |
| 404 | Resource not found |
| 422 | Validation error (check response body for details) |
| 429 | Rate limit exceeded (retry after 60 seconds) |
curl -X POST https://hulkpush.com/api/v1/push/send \
-H "X-HulkPush-Key: hp_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"site_id": 1,
"title": "New Video!",
"body": "Check out our latest upload",
"url": "https://youtube.com/watch?v=xxx",
"image_url": "https://img.youtube.com/vi/xxx/maxresdefault.jpg"
}'
$response = Http::withHeaders([
'X-HulkPush-Key' => 'hp_your_api_key',
])->post('https://hulkpush.com/api/v1/push/send', [
'site_id' => 1,
'title' => 'New Video!',
'body' => 'Check out our latest upload',
'url' => 'https://youtube.com/watch?v=xxx',
]);
$data = $response->json();
const response = await fetch('https://hulkpush.com/api/v1/push/send', {
method: 'POST',
headers: {
'X-HulkPush-Key': 'hp_your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
site_id: 1,
title: 'New Video!',
body: 'Check out our latest upload',
url: 'https://youtube.com/watch?v=xxx',
}),
});
const data = await response.json();
import requests
response = requests.post(
'https://hulkpush.com/api/v1/push/send',
headers={'X-HulkPush-Key': 'hp_your_api_key'},
json={
'site_id': 1,
'title': 'New Video!',
'body': 'Check out our latest upload',
'url': 'https://youtube.com/watch?v=xxx',
}
)
data = response.json()