Sending notifications

POST /v1/notify — fields, examples in four languages, idempotent retries.

POST /v1/notify publishes to your project's default topic; pass topic to target another. The Content-Type: application/json header is recommended but optional — bare curl -d works.

curl -X POST https://api.stdpush.com/v1/notify \
  -H "Authorization: Bearer $STDPUSH_API_KEY" \
  -d '{
    "title": "Deployment complete",
    "message": "API v2.4 is live in production",
    "priority": "high"
  }'

Request fields

FieldTypeNotes
titlestringrequired, ≤ 120 chars
messagestring≤ 2048 chars
topicstringlowercase letters, digits, -, _; default default
prioritystringlow · normal · high
click_urlstringpublic http(s) URL opened on tap
metadataobject≤ 2 KB of JSON, returned with the notification
ttl_secondsnumber30–86400; expires undelivered notifications

Idempotent retries

Send an Idempotency-Key header to make retries safe: the first request creates the notification (202), replays return the original (200) without sending twice. Keys are scoped per project.

curl -X POST https://api.stdpush.com/v1/notify \
  -H "Authorization: Bearer $STDPUSH_API_KEY" \
  -H "Idempotency-Key: deploy-2026-08-08-42" \
  -d '{"title": "Deploy 42 finished"}'

On this page