Skip to content

REST API

Ai assistant: 9 routes.

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

  • GET4
  • POST5

/ai-assistant/ask

POSTAccess check: check_access

Answer a question.

Handler: ask()

No parameters declared in the route registration.

curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/ai-assistant/ask"

src/domains/ai-assistant/routes.php:107

/ai-assistant/ask/stream

POSTAccess check: check_access

Stream an answer over Server-Sent Events (text/event-stream).

Handler: ask_stream()

No parameters declared in the route registration.

curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/ai-assistant/ask/stream"

src/domains/ai-assistant/routes.php:118

/ai-assistant/config

GETPublic

What the front end needs to know before showing the assistant.

Handler: get_config()

No parameters declared in the route registration.

curl
curl "https://example.com/wp-json/davo/v1/ai-assistant/config"

src/domains/ai-assistant/routes.php:152

/ai-assistant/feedback

POSTAccess check: check_access

Rate an answer.

Handler: submit_feedback()

Parameters of POST /ai-assistant/feedback
ParameterTypeRequiredDefault or allowed values
idintegerYes—
helpfulbooleanYes—
curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/ai-assistant/feedback" \
  -H "Content-Type: application/json" \
  -d '{"id": 1, "helpful": true}'

src/domains/ai-assistant/routes.php:129

/ai-assistant/gaps

GETAccess check: require_manager

Content gaps: questions the help center did not answer or answered badly, grouped by meaning.

Handler: get_gaps()

Parameters of GET /ai-assistant/gaps
ParameterTypeRequiredDefault or allowed values
dayssee source——
limitinteger—50
curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/ai-assistant/gaps"

src/domains/ai-assistant/routes.php:229

/ai-assistant/stats

GETAccess check: require_manager

Totals for the last N days.

Handler: get_stats()

Parameters of GET /ai-assistant/stats
ParameterTypeRequiredDefault or allowed values
dayssee source——
curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/ai-assistant/stats"

src/domains/ai-assistant/routes.php:197

/ai-assistant/summarize-article

POSTAccess check: check_access

Summarize one help-center article as a concise TL;DR.

Handler: summarize_article()

Parameters of POST /ai-assistant/summarize-article
ParameterTypeRequiredDefault or allowed values
article_idintegerYes—
curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/ai-assistant/summarize-article" \
  -H "Content-Type: application/json" \
  -d '{"article_id": 1}'

src/domains/ai-assistant/routes.php:162

/ai-assistant/synonyms

POSTAccess check: require_manager

Append one synonym pair from the admin gap report.

Handler: add_synonym()

Parameters of POST /ai-assistant/synonyms
ParameterTypeRequiredDefault or allowed values
termstringYes—
aliasstringYes—
curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/ai-assistant/synonyms" \
  -H "Content-Type: application/json" \
  -d '{"term": "…", "alias": "…"}'

src/domains/ai-assistant/routes.php:250

/ai-assistant/unanswered

GETAccess check: require_manager

The questions the help center could not answer.

Handler: get_unanswered()

Parameters of GET /ai-assistant/unanswered
ParameterTypeRequiredDefault or allowed values
dayssee source——
limitinteger—50
curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/ai-assistant/unanswered"

src/domains/ai-assistant/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