Skip to content

API Reference

WordPress API

Copy page

List, inspect, install, update, plugins, login links, error logs, users, staging, address changes and wp-cron for the WordPress sites on your own hosting

All endpoints live on https://api.hostino.ai and use an OAuth (Bearer) token. Ownership comes only from the token: a service or site that isn’t the token owner’s answers like a missing one (404). The MCP equivalents are in WordPress with AI.

EndpointScopeWhat it does
GET /v1/wordpress/siteswordpress:readWordPress sites on your hosting
GET /v1/wordpress/site?service_id=&site=wordpress:readOne site’s details
POST /v1/wordpress/login-linkhosting:loginOne-time wp-admin login link
POST /v1/wordpress/updatewordpress:writeUpdate core, plugins or theme
POST /v1/wordpress/pluginswordpress:writeInstall and activate a plugin
POST /v1/wordpress/installwordpress:writeInstall a fresh WordPress (asynchronous, 202)
GET /v1/wordpress/install-status?service_id=&install_id=wordpress:readInstallation progress
GET /v1/wordpress/plugins · themes · settings · admins · maintenance · security-scan (?service_id=&site=)wordpress:readPlugins, themes, settings, administrators, maintenance state, checksum scan
POST /v1/wordpress/plugin-statewordpress:writeslug + state (active, inactive, deleted)
POST /v1/wordpress/themeswordpress:writeslug, install (default true), activate
POST /v1/wordpress/settingswordpress:writeAny of title, tagline, search_engines (allowed/discouraged), timezone, permalinks (post_name, day_and_name, month_and_name, category, numeric)
POST /v1/wordpress/maintenancewordpress:writeenabled: true (on) / false (off)
POST /v1/wordpress/cache/flushwordpress:writeFlush object, transient and page caches
POST /v1/wordpress/optimize · GET /v1/wordpress/optimizationswordpress:write / wordpress:readStart the optimizer (types: ALL, PHP, DATABASE, JS, CSS, IMAGES); recent jobs
GET /v1/wordpress/backup · POST /v1/wordpress/backup · POST /v1/wordpress/backup/restorewordpress:read / wordpress:writeLatest backup, new backup, restore the latest backup
GET /v1/wordpress/jobs/:id?kind=optimize|backupwordpress:readProgress of an optimize or backup job
GET /v1/wordpress/debug-log?service_id=&site=&lines=wordpress:readLatest lines of debug.log and the PHP error_log (1–300) and the debug state
POST /v1/wordpress/debugwordpress:writeenabled: true/false — log errors to debug.log (never shown to visitors)
GET /v1/wordpress/users?service_id=&site=wordpress:readUsers with roles
POST /v1/wordpress/userswordpress:writeaction: create (user, user_email, role; administrators need confirm_role: "administrator"), reset_password (optional send_email) or delete (confirm = login, reassign)
POST /v1/wordpress/search-replacewordpress:writefrom, to; dry run by default (dry_run: true); apply with dry_run: false and confirm_from = from
GET /v1/wordpress/directory?service_id=&type=&query=wordpress:readSearch wordpress.org plugins (plugin) or themes (theme)
GET /v1/wordpress/cron · POST /v1/wordpress/cronwordpress:read / wordpress:writewp-cron mode; mode: server (hosting cron every 15 minutes) or wordpress
GET /v1/wordpress/staging?service_id=&job_id=wordpress:readSites including staging copies, or a job’s status
POST /v1/wordpress/stagingwordpress:writeaction: create (site), push (staging_site, confirm = the live site URL; a restore point is created first) or delete (staging_site, confirm = the staging URL)

site is the site URL as returned by /v1/wordpress/sites (e.g. https://blog.example.com). If empty, the account’s main site is used.

Website tools for your own domains and services: GET /v1/sites/seo-check?url= (SEO check), POST /v1/sites/audit ({"url","device"}, Lighthouse) and GET /v1/services/:id/health (hosting health), all with scope services:read. See SEO and site health with AI.

List sites

Terminal window
curl -s https://api.hostino.ai/v1/wordpress/sites -H "Authorization: Bearer $TOKEN"
{
"services": [
{
"service_id": "150", "product": "WP-Plus-IR", "domain": "example.com",
"sites": [
{ "site": "https://example.com", "name": "My shop", "path": "", "version": "7.1.3", "latest_version": "7.1.3",
"outdated": false, "healthy": true, "main_site": true, "login_page": "https://example.com/wp-login.php" }
]
}
]
}

Update

Terminal window
curl -s -X POST https://api.hostino.ai/v1/wordpress/update -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"service_id":"150","target":"plugins","plugins":["contact-form-7","elementor"]}'
  • target: core, plugins or theme.
  • plugins: plugin slugs; omit to update all plugins.
  • Every operation works on any WordPress site of the account (main, folder or subdomain).

Install a fresh WordPress

Terminal window
curl -s -X POST https://api.hostino.ai/v1/wordpress/install -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"service_id":"392","domain":"example.com","site_title":"My site","language":"en_US"}'

The response is 202 with an install_id. Follow install-status until done. The admin password is random and not returned; sign in with login-link.

Dry run of an address change

Terminal window
curl -s -X POST https://api.hostino.ai/v1/wordpress/search-replace -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"service_id":"150","from":"http://example.com","to":"https://example.com"}'

Without dry_run: false nothing changes; the answer only shows the number of replacements. Back up the site before applying (POST /v1/wordpress/backup). A staging copy is created at staging.<domain> with the same path; the full flow is in WordPress with AI.

Errors

site_not_found, invalid_plugin, domain_not_on_service, wordpress_already_installed, wordpress_operation_failed, service_not_found, service_not_active, and for the newer endpoints confirmation_required, confirmation_mismatch, last_administrator, user_not_found, invalid_reassign, staging_exists, staging_not_found, already_staging, hosting_tools_not_available. Each is explained in WordPress with AI.