Skip to content

REST API

AI: 7 routes.

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

  • GET4
  • POST2
  • DELETE1

/ai/config

GETAccess check: require_login

What the current user's editors need: usable surfaces with their endpoints, the limits and a fresh REST nonce. No credentials.

Handler: get_config()

No parameters declared in the route registration.

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

src/domains/ai/routes.php:73

/ai/connections

GETAccess check: require_manage_options

The source has no description for this route.

No parameters declared in the route registration.

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

src/domains/ai/routes.php:90

/ai/connections/{provider}/key

DELETEAccess check: require_manage_options

Remove a saved key.

Handler: clear_key()

Parameters of DELETE /ai/connections/{provider}/key
ParameterTypeRequiredDefault or allowed values
providerstringYes—
curl
curl -X DELETE -u "user:application-password" "https://example.com/wp-json/davo/v1/ai/connections/{provider}/key"

src/domains/ai/routes.php:117

/ai/connections/{provider}/test

POSTAccess check: require_manage_options

Test a provider connection.

Handler: test_connection()

Parameters of POST /ai/connections/{provider}/test
ParameterTypeRequiredDefault or allowed values
providerstringYes—
curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/ai/connections/{provider}/test"

src/domains/ai/routes.php:100

/ai/editor

POSTAccess check: require_login

Handle an editor AI request, answering in the shape the editor's transport reads.

Handler: handle_editor()

Parameters of POST /ai/editor
ParameterTypeRequiredDefault or allowed values
surfacestring—admin
curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/ai/editor"

src/domains/ai/routes.php:56

/ai/log

GETAccess check: require_manage_options

One page of the usage log, with pagination headers.

Handler: list_log()

Parameters of GET /ai/log
ParameterTypeRequiredDefault or allowed values
pageinteger—1
per_pageinteger—25
featurestring—(empty)
curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/ai/log"

src/domains/ai/routes.php:151

/ai/usage

GETAccess check: require_manage_options

The source has no description for this route.

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

src/domains/ai/routes.php:134

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