API Documentation

Complete guide to using the Pushover Notification API

← Back to Web UI

Endpoint

POST /notification

Request Body

{
  "title": "string",           // Required: Notification title
  "message": "string",         // Required: Notification message
  "priority": integer          // Optional: Pushover priority -2 to 2 (default: 0)
}

Priority Levels

-2: Lowest Priority
-1: Low Priority
0: Normal Priority
1: High Priority
2: Emergency Priority

Response

{
  "success": boolean,
  "message": "string"
}

Examples

Basic Pushover Notification

curl -X POST http://localhost:8080/notification \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Hello World",
    "message": "This is a test notification!"
  }'

High Priority Pushover Notification

curl -X POST http://localhost:8080/notification \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Urgent Alert",
    "message": "This is an important notification!",
    "priority": 2
  }'

JavaScript/Fetch Example

fetch('/notification', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'Web Notification',
    message: 'Sent from JavaScript!',
    priority: 1
  })
})
.then(response => response.json())
.then(data => console.log(data));

Status Codes

200 Success - Notification sent successfully
400 Bad Request - Invalid JSON or missing required fields
405 Method Not Allowed - Only POST requests are accepted
500 Internal Server Error - Server error occurred

Environment Configuration

For Pushover notifications, set these environment variables:

PUSHOVER_USER_KEY=your_pushover_user_key
PUSHOVER_TOKEN=your_pushover_app_token