# PATCH /plugins/{name}

First published 29 Oct 2026 (release 0.2.19) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the plugins group.

Enable or disable a registered plugin

- Who may call it: administrator
- Token scope, any of: settings, all
- Answers: 200 OK

Disabling the plugin revokes all its API tokens, including the daemon's key and viewer tickets. UrbeStack removes its pages from the web interface navigation and nginx and stops running its hooks. Enabling the plugin restores its pages and hooks and writes a new daemon API key to its key file.

The API returns 400 if enabled is missing or name is invalid. A valid name is 2 to 32 characters long, starts with a lowercase ASCII letter, and contains only lowercase ASCII letters, digits, or hyphens. UrbeStack refuses requests for the plugin's current state.

Enabling requires the manifest at its registered path. If it is missing, run the vendor's installer again or remove the registration with urbestack-plugin-del --name NAME. If enabling the plugin would serve the first active plugin pages and the port is unavailable, set plugins.port to a free port in Settings or run urbestack-setting-set --key plugins.port --value N.

## As a command

- [urbestack-plugin-set](https://urbestack.com/docs/commands/urbestack-plugin-set.md): Enables or disables a registered plugin.

## Parameters

- `name` (path, PluginName, required)

## Request body

JSON.

- `enabled` (boolean, required)

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X PATCH "$API/plugins/alice" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true
  }'
```

Response, 200 OK:

```
{
  "applied": {},
  "key_file": "text",
  "key_made": true,
  "plugin": {
    "disabled_at": "text",
    "disabled_by": "text",
    "enabled": true,
    "files_present": true,
    "health": "text",
    "health_check": {
      "answering": true,
      "error": "Domain 'example.com' already exists",
      "status": 1
    },
    "hook_files": [
      "text"
    ],
    "hook_timeout": 1,
    "hooks": true,
    "hooks_dir": "text",
    "key_file": "text",
    "key_made_at": "text",
    "last_failure": "text",
    "last_failure_at": "text",
    "last_failure_op": "text",
    "listen": "text",
    "manifest_path": "text",
    "name": "alice",
    "packages_on": 1,
    "packages_total": 1,
    "pages": [
      {
        "icon": "text",
        "panel": "admin",
        "path": "public_html/index.php"
      }
    ],
    "panels": [
      "text"
    ],
    "registered_at": "text",
    "requires": "text",
    "scopes": [
      "*"
    ],
    "scopes_added": [
      "text"
    ],
    "title": {},
    "updated_at": "text",
    "upgraded_at": "text",
    "upgraded_from": "text",
    "user": "alice",
    "vendor": "text",
    "version": "0.0.1"
  },
  "revoked": 1
}
```

## Errors

- 400: --name is required
- 400: Invalid boolean
- 400: Nothing to change: enabled true or false
- 401: Authentication required
