Send Notification API

Send push notifications to users or groups via Push Bunny, powered by Firebase Cloud Messaging. Ensure your service account is configured securely on the server.

Endpoint

POST https://push-bunny.com/api

Request Headers

Body Parameters

Field Type Required Description
titlestringYesNotification title
bodystringYesNotification message content
recipient_typestringNouser_id or group (default: user_id)
id_fieldstringYesUser ID or topic name
imagestringNoURL for notification image
linkstringNoURL to open on click

Response

Success
{
  "success": true,
  "message": "Notification sent successfully to user '12345'"
}
Error
{
  "error": "Title and body are required"
}

Examples

cURL
curl -X POST https://push-bunny.com/api \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Hello!",
    "body": "This is a test notification.",
    "recipient_type": "user_id",
    "id_field": "12345",
    "image": "https://example.com/image.png",
    "link": "https://example.com"
  }'
PHP (cURL)
$payload = [
  'title' => 'Hello!',
  'body' => 'Test notification',
  'recipient_type' => 'user_id',
  'id_field' => '12345',
  'image' => 'https://example.com/image.png',
  'link' => 'https://example.com'
];

$ch = curl_init('https://push-bunny.com/api');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));

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

Download the App

Get the Push Bunny mobile app for instant notifications

Download on the App Store Get it on Google Play