Skip to content

REST API

Moderation: 5 routes.

All under /wp-json/davo/v1. Every route has a description in the source.

  • GET2
  • POST3

/moderation/me

GETAccess check: require_login

Return the current user's own suspension status.

Handler: get_my_status()

No parameters declared in the route registration.

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

src/domains/moderation/routes.php:56

/moderation/users/{id}

GETAccess check: require_admin

Return a user's full moderation status/history (admin).

Handler: get_user_status()

No parameters declared in the route registration.

curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/moderation/users/{id}"

src/domains/moderation/routes.php:68

/moderation/users/{id}/suspend

POSTAccess check: require_admin

Suspend a user directly (not tied to a report).

Handler: suspend_user()

No parameters declared in the route registration.

curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/moderation/users/{id}/suspend"

src/domains/moderation/routes.php:81

/moderation/users/{id}/unsuspend

POSTAccess check: require_admin

Lift a user's active suspension.

Handler: unsuspend_user()

No parameters declared in the route registration.

curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/moderation/users/{id}/unsuspend"

src/domains/moderation/routes.php:94

/moderation/users/{id}/warn

POSTAccess check: require_admin

Warn a user directly (not tied to a report).

Handler: warn_user()

No parameters declared in the route registration.

curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/moderation/users/{id}/warn"

src/domains/moderation/routes.php:107

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