Skip to content

REST API

Users: 9 routes.

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

  • GET6
  • POST4

/profile-completion

GETAccess check: require_login

What the current user still has to fill in.

Handler: get_completion()

No parameters declared in the route registration.

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

POSTAccess check: require_login

Save the current user's answers.

Handler: save_completion()

Parameters of POST /profile-completion
ParameterTypeRequiredDefault or allowed values
custom_fieldsobjectYes—
curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/profile-completion" \
  -H "Content-Type: application/json" \
  -d '{"custom_fields": …}'

src/domains/users/completion-routes.php:47

/users-admin/bulk

POSTAccess check: inline check

Run one action across many users.

Handler: bulk()

Parameters of POST /users-admin/bulk
ParameterTypeRequiredDefault or allowed values
actionstringYes—
idsarrayYes—
reasonstring——
duration_daysinteger—0
rolestring——
curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/users-admin/bulk" \
  -H "Content-Type: application/json" \
  -d '{"action": "…", "ids": []}'

src/domains/users/routes.php:170

/users-admin/dashboard

GETAccess check: inline check

Every dashboard figure for a range, in one request.

Handler: get_dashboard()

Parameters of GET /users-admin/dashboard
ParameterTypeRequiredDefault or allowed values
daysinteger—30
curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/users-admin/dashboard"

src/domains/users/routes.php:70

/users-admin/meta

GETAccess check: inline check

Page bootstrap data.

Handler: get_meta()

No parameters declared in the route registration.

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

src/domains/users/routes.php:60

/users-admin/users

GETAccess check: inline check

Paginated user list.

Handler: list_users()

No parameters declared in the route registration.

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

src/domains/users/routes.php:88

/users-admin/users/{id}

GETAccess check: inline check

One user's detail.

Handler: get_user()

No parameters declared in the route registration.

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

src/domains/users/routes.php:99

/users-admin/users/{id}/activity

GETAccess check: inline check

A user's activity timeline.

Handler: get_activity()

No parameters declared in the route registration.

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

src/domains/users/routes.php:143

/users-admin/users/{id}/custom-fields

POSTAccess check: inline check

Save a user's custom profile fields.

Handler: update_custom_fields()

No parameters declared in the route registration.

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

src/domains/users/routes.php:110

/users-admin/users/{id}/role

POSTAccess check: inline check

Change a user's role.

Handler: set_role()

No parameters declared in the route registration.

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

src/domains/users/routes.php:126

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