Notifications
1 API call in this section.
Internal Background Worker Wake
/notificationsInternal request created by PostgreSQL pg_net after a queue transaction reserves a worker slot. Accepted worker_key values are notification_normal and notification_priority. The database validates the Vault-backed secret, slot number, and one-time wake token before granting a lease. A valid wake returns immediately and the Edge runtime drains work in the background. Duplicate or stale wakes are idempotently accepted with accepted:false and perform no work. This endpoint is not a frontend integration contract. Business clients enqueue only through their owning backend operation.
Headers
| Parameter | Type | Description |
|---|---|---|
Content-Type | string | Example: |
X-Background-Worker-Secret | string | Vault-backed internal secret. Never expose this value to frontend or mobile clients. Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
request_type | string | — |
worker_key | string | — |
slot_number | number | — |
wake_token | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/notifications" \2 --header "Content-Type: application/json" \3 --header "X-Background-Worker-Secret: ${BACKGROUND_WORKER_WAKE_SECRET}" \4 --data-raw '{5 "request_type": "background_worker_wake",6 "worker_key": "notification_normal",7 "slot_number": 1,8 "wake_token": "{{notification_worker_wake_token}}"9}'Replace {{placeholders}} with your own values before sending.
Internal backend endpoint. Run from a trusted server; keep backend secret keys out of the browser.
Response examples
1{2 "success": true,3 "accepted": true4}