Skip to content

REST API

Auth: 17 routes.

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

  • GET4
  • POST12
  • DELETE1

/auth/forgot-password

POSTPublic

Starts a password reset by emailing a reset link.

Handler: handle_forgot_password()

No parameters declared in the route registration.

curl
curl -X POST "https://example.com/wp-json/davo/v1/auth/forgot-password"

src/domains/auth/routes.php:82

/auth/initial-state

GETPublic

Returns the initial auth state the front end needs to render sign-in and sign-up.

Handler: handle_initial_state()

No parameters declared in the route registration.

curl
curl "https://example.com/wp-json/davo/v1/auth/initial-state"

src/domains/auth/routes.php:147

/auth/login

POSTAccess check: guest_only

Signs a user in with a login and password, with an optional remember flag.

Handler: handle_login()

No parameters declared in the route registration.

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

src/domains/auth/routes.php:56

/auth/logout

POSTAccess check: require_login

Signs out the current session.

Handler: handle_logout()

No parameters declared in the route registration.

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

src/domains/auth/routes.php:159

/auth/logout-all

POSTAccess check: require_login

Signs the user out of every session.

Handler: handle_logout_all()

No parameters declared in the route registration.

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

src/domains/auth/routes.php:171

/auth/magic-link

POSTPublic

Emails a one-time sign-in link.

Handler: handle_request_magic_link()

No parameters declared in the route registration.

curl
curl -X POST "https://example.com/wp-json/davo/v1/auth/magic-link"

src/domains/auth/routes.php:121

/auth/magic-login

POSTPublic

Signs a user in by consuming a magic-link token.

Handler: handle_consume_magic_link()

No parameters declared in the route registration.

curl
curl -X POST "https://example.com/wp-json/davo/v1/auth/magic-login"

src/domains/auth/routes.php:134

/auth/me

GETAccess check: require_login

Returns the signed-in user and the current session.

Handler: handle_me()

No parameters declared in the route registration.

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

src/domains/auth/routes.php:183

/auth/register

POSTAccess check: guest_only

Registers a new account from an email, password, optional username and display name, and any custom fields.

Handler: handle_register()

No parameters declared in the route registration.

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

src/domains/auth/routes.php:69

/auth/resend-verification

POSTPublic

Sends the verification email again. Signed-in users get it for their own account; otherwise the response is the same whether or not the email exists.

Handler: handle_resend_verification()

Parameters of POST /auth/resend-verification
ParameterTypeRequiredDefault or allowed values
emailstringNo—
curl
curl -X POST "https://example.com/wp-json/davo/v1/auth/resend-verification"

src/domains/auth/routes.php:263

/auth/reset-password

POSTPublic

Sets a new password using a reset token.

Handler: handle_reset_password()

No parameters declared in the route registration.

curl
curl -X POST "https://example.com/wp-json/davo/v1/auth/reset-password"

src/domains/auth/routes.php:95

/auth/sessions

GETAccess check: require_login

Lists the signed-in user's active sessions.

Handler: handle_sessions()

No parameters declared in the route registration.

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

src/domains/auth/routes.php:220

/auth/sessions/{id}

DELETEAccess check: require_login

Ends one of the signed-in user's sessions.

Handler: handle_revoke_session()

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

src/domains/auth/routes.php:244

/auth/sessions/logout-others

POSTAccess check: require_login

Signs the current user out of every other device while keeping this session alive. Requires the caller to be authenticated.

Handler: handle_logout_others_sessions()

No parameters declared in the route registration.

curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/auth/sessions/logout-others"

src/domains/auth/routes.php:232

/auth/verify-email

POSTPublic

Verifies an email address with the emailed token.

Handler: handle_verify_email()

No parameters declared in the route registration.

curl
curl -X POST "https://example.com/wp-json/davo/v1/auth/verify-email"

src/domains/auth/routes.php:108

/auth/verify-email/email

POSTAccess check: require_login

Updates the email address for a logged-in unverified account and sends a new verification email.

Handler: handle_update_unverified_email()

No parameters declared in the route registration.

curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/auth/verify-email/email"

src/domains/auth/routes.php:195

/auth/verify-email/status

GETAccess check: require_login

Returns the current authenticated user's email verification status and cooldown.

Handler: handle_verification_status()

No parameters declared in the route registration.

curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/auth/verify-email/status"

src/domains/auth/routes.php:208

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