Skip to content

REST API

Notifications: 12 routes.

All under /wp-json/davo/v1. 10 of them have a description in the source.

  • GET5
  • POST7
  • DELETE2

/notifications

GETAccess check: require_login

Returns a paginated list of notifications for the current user.

Handler: get_notifications()

No parameters declared in the route registration.

curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/notifications"

src/domains/notifications/routes.php:107

/notifications/{id}

DELETEAccess check: require_login_with_nonce

Deletes a single notification owned by the current user.

Handler: delete_notification()

Parameters of DELETE /notifications/{id}
ParameterTypeRequiredDefault or allowed values
idintegerYes—
curl
curl -X DELETE -u "user:application-password" "https://example.com/wp-json/davo/v1/notifications/{id}"

src/domains/notifications/routes.php:155

/notifications/bell-opened

POSTAccess check: require_login_with_nonce

Records that the user opened the bell panel and resets their badge count. Returns the current new_since_opened count (always 0 after this call) and the server time so the JS can update its poll cursor if needed.

Handler: bell_opened()

No parameters declared in the route registration.

curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/notifications/bell-opened"

src/domains/notifications/routes.php:226

/notifications/live

GETAccess check: require_login

Returns notifications created after the supplied ?since= datetime. Per-user rate limited via a separate transient key from the Heartbeat.

Handler: get_live()

Parameters of GET /notifications/live
ParameterTypeRequiredDefault or allowed values
sincestringYes—
curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/notifications/live?since=…"

src/domains/notifications/routes.php:174

/notifications/preferences

GETAccess check: require_login

Returns all saved notification preferences for the current user.

Handler: get_preferences()

No parameters declared in the route registration.

curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/notifications/preferences"

POSTAccess check: require_login_with_nonce

Saves a mute/unmute preference for the current user, per channel. email_enabled is optional — when omitted, the repository mirrors it from is_muted so callers that only know about a single toggle (the notification item's "Turn off these notifications" action) continue to turn both channels off/on together with zero changes on their end. has_param() is used rather than get_param() ?? null so an explicit false is not confused with "not provided".

Handler: save_preference()

No parameters declared in the route registration.

curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/notifications/preferences"

src/domains/notifications/routes.php:207

/notifications/presence

POSTAccess check: require_login_with_nonce

Tracks whether a browser tab is actively visible. Push delivery uses this foreground state to avoid native push duplicates while the user is actively viewing Davo.

Handler: update_presence()

Parameters of POST /notifications/presence
ParameterTypeRequiredDefault or allowed values
tab_idstringYes—
statusstringYes—
curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/notifications/presence" \
  -H "Content-Type: application/json" \
  -d '{"tab_id": "…", "status": "…"}'

src/domains/notifications/routes.php:256

/notifications/read

POSTAccess check: require_login_with_nonce

Marks specific notification IDs as read for the current user.

Handler: mark_read()

No parameters declared in the route registration.

curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/notifications/read"

src/domains/notifications/routes.php:119

/notifications/read-all

POSTAccess check: require_login_with_nonce

Marks every unread notification as read for the current user.

Handler: mark_all_read()

No parameters declared in the route registration.

curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/notifications/read-all"

src/domains/notifications/routes.php:144

/notifications/stream

GETAccess check: require_login

The source has no description for this route.

Parameters of GET /notifications/stream
ParameterTypeRequiredDefault or allowed values
sincestringNo—
curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/notifications/stream"

src/domains/notifications/routes.php:238

/notifications/types

GETAccess check: require_login

Returns the full registry of notification types in the flat shape used by the notification preferences UI: { id, group, label, channels }. This is the single place the frontend fetches the type list from — previously the Profile domain bridged this via a davo_notification_preference_types filter; that bridge is now retired in favor of the Notifications domain serving its own registry directly.

Handler: get_types()

No parameters declared in the route registration.

curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/notifications/types"

src/domains/notifications/routes.php:196

/notifications/unread

POSTAccess check: require_login_with_nonce

Marks specific notification IDs as unread for the current user — the explicit "Mark as unread" toggle (Facebook-style), as opposed to the previous auto-read-on-view behavior.

Handler: mark_unread()

No parameters declared in the route registration.

curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/notifications/unread"

src/domains/notifications/routes.php:131

/push/subscribe

POSTAccess check: require_login_with_nonce

The source has no description for this route.

Parameters of POST /push/subscribe
ParameterTypeRequiredDefault or allowed values
endpointstringYes—
p256dhstringYes—
authstringYes—
curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/push/subscribe" \
  -H "Content-Type: application/json" \
  -d '{"endpoint": "…", "p256dh": "…", "auth": "…"}'

DELETEAccess check: require_login_with_nonce

The source has no description for this route.

Parameters of DELETE /push/subscribe
ParameterTypeRequiredDefault or allowed values
endpointstringYes—
curl
curl -X DELETE -u "user:application-password" "https://example.com/wp-json/davo/v1/push/subscribe"

src/domains/notifications/routes.php:283

Note. Generated from the plugin source. Parameters are the ones declared when the route is registered; a parameter marked “see source” uses a shared definition. Responses are not documented here. Authenticate as for any WordPress REST route, for example with an application password over HTTPS; the example paths use https://example.com.

See it on your own site.

Davo is a WordPress theme and plugin by Exorex.

  • Runs on your own WordPress
  • Guided setup wizard
  • AI is off until you switch it on
  • Read the licence on the marketplace first