`/wp/v2/plugins`

Namespace: wp/v2
Route: /wp/v2/plugins

Routes

  • Collection: /wp/v2/plugins
  • Single: /wp/v2/plugins/{plugin}

HTTP Methods

Collection methods: GET, POST

Single methods: GET, POST, PUT, PATCH, DELETE

Request Parameters

Collection GET

ParameterTypeRequiredDefaultDescription
contextstringfalseviewScope under which the request is made; determines fields present in response.
searchstringfalseLimit results to those matching a string.
statusarrayfalseLimits results to plugins with the given status.

Collection POST

ParameterTypeRequiredDefaultDescription
slugstringtrueWordPress.org plugin directory slug.
statusstringfalseinactiveThe plugin activation status.

Single GET

ParameterTypeRequiredDefaultDescription
contextstringfalseviewScope under which the request is made; determines fields present in response.
pluginstringfalse

Single POST, PUT, PATCH

ParameterTypeRequiredDefaultDescription
contextstringfalseviewScope under which the request is made; determines fields present in response.
pluginstringfalse
statusstringfalseThe plugin activation status.

Single DELETE

ParameterTypeRequiredDefaultDescription
contextstringfalseviewScope under which the request is made; determines fields present in response.
pluginstringfalse

Response Schema (Item)

FieldTypeDescription
pluginstringThe plugin file. (read-only)
statusstringThe plugin activation status.
namestringThe plugin name. (read-only)
plugin_uristringThe plugin’s website address. (read-only)
authorstringThe plugin author. (read-only)
author_uristringPlugin author’s website address. (read-only)
descriptionobjectThe plugin description. (read-only)
versionstringThe plugin version number. (read-only)
network_onlybooleanWhether the plugin can only be activated network-wide. (read-only)
requires_wpstringMinimum required version of WordPress. (read-only)
requires_phpstringMinimum required version of PHP. (read-only)
textdomainstringThe plugin’s text domain. (read-only)

Authentication

  • Read: activate_plugins.
  • Write: install_plugins (install), activate_plugins (activate/deactivate), delete_plugins (delete).

Example Requests

bash
curl -X GET "https://wordpress.org/news/wp-json/wp/v2/plugins"
bash
curl -X POST "https://wordpress.org/news/wp-json/wp/v2/plugins" 
  -H 'Authorization: Basic <app-password>' 
  -H 'Content-Type: application/json' 
  -d '{"title":"Example"}'
bash
curl -X GET "https://wordpress.org/news/wp-json/wp/v2/plugins/akismet/akismet"

Example Response (trimmed)

json
{
  "id": 1,
  "_links": {
    "self": [{ "href": "/wp/v2/plugins/1" }]
  }
}