Trigger Notification

Send a test notification to any subscriber

A

Trigger a notification

cURL equivalent

curl -X POST http://localhost:3000/v1/events/trigger \
  -H "Authorization: ApiKey YOUR_NOVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "order-update",
    "to": { "subscriberId": "USER_ID" },
    "payload": {
      "message": "Your order is ready",
      "orderId": "12345"
    }
  }'

Register device token

curl -X PUT http://localhost:3000/v1/subscribers/USER_ID/credentials \
  -H "Authorization: ApiKey YOUR_NOVU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "providerId": "fcm",
    "deviceTokens": ["DEVICE_TOKEN"]
  }'