Skip to main content

GET /themes

Returns all installed themes. The active theme is listed first; remaining themes are sorted alphabetically.
curl -X GET https://example.com/wp-json/wp-manager-pro/v1/themes \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

themes
array
Array of theme objects.
total
integer
Total number of installed themes.

POST /themes/activate

Activates an installed theme.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/themes/activate \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"slug": "twentytwentyfour"}'

Parameters

slug
string
required
The theme directory slug.

Response

success
boolean
Always true on success.
message
string
Human-readable confirmation message.

DELETE /themes/delete

Permanently deletes a theme. The currently active theme cannot be deleted.
curl -X DELETE https://example.com/wp-json/wp-manager-pro/v1/themes/delete \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"slug": "twentytwentythree"}'

Parameters

slug
string
required
The theme directory slug.

POST /themes/install

Installs a theme from the WordPress.org repository by slug.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/themes/install \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"slug": "astra"}'

Parameters

slug
string
required
WordPress.org theme slug.

GET /themes/search

Searches the WordPress.org theme repository.
curl -X GET "https://example.com/wp-json/wp-manager-pro/v1/themes/search?q=astra&page=1" \
  -H "X-WP-Nonce: YOUR_NONCE"

Parameters

q
string
required
Search query string.
page
integer
Page number. Defaults to 1. Returns 12 results per page.

Response

themes
array
Array of matching theme objects from WordPress.org.
total
integer
Total number of matching results.

POST /themes/upload

Installs a theme from an uploaded ZIP file.
This endpoint requires multipart/form-data encoding. The file field must be named file and contain a valid .zip archive.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/themes/upload \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -F "file=@/path/to/my-theme.zip" \
  -F "overwrite=1"

Parameters

file
file
required
The theme ZIP file to upload. Must have a .zip extension.
overwrite
boolean
If true, overwrites an existing theme with the same slug. Defaults to false.

POST /themes/export

Creates a ZIP archive of an installed theme and returns a time-limited download URL. The URL expires after 5 minutes.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/themes/export \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"slug": "my-child-theme"}'

Parameters

slug
string
required
The theme directory slug.

Response

success
boolean
Always true on success.
download_url
string
Time-limited URL to download the ZIP file. Valid for 5 minutes.
filename
string
Suggested filename for the download.

GET /themes/download

Streams a previously exported theme ZIP file. Use the download_url returned by POST /themes/export.

Parameters

key
string
required
The one-time download key returned from POST /themes/export.

POST /themes/update

Updates an installed theme to its latest available version from WordPress.org. Returns a 400 error if no update is available.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/themes/update \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"slug": "astra"}'

Parameters

slug
string
required
The theme directory slug.

POST /themes/install-version

Installs a specific version of a WordPress.org theme, overwriting any currently installed version.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/themes/install-version \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"slug": "astra", "version": "4.3.0"}'

Parameters

slug
string
required
WordPress.org theme slug.
version
string
required
The exact version to install (e.g. 4.3.0).

Build docs developers (and LLMs) love