# POST /plugins/{name}/key

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

UrbeStack release 0.2.35 API operation in the plugins group.

Rotate the plugin daemon's API key

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

UrbeStack revokes the previous key immediately. The new key is available only in /etc/urbestack/plugins/NAME/key, which the daemon rereads.

The API returns 400 if 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.

## As a command

- [urbestack-plugin-key](https://urbestack.com/docs/commands/urbestack-plugin-key.md): Rotates the plugin daemon's API key and revokes the previous key immediately.

## Parameters

- `name` (path, PluginName, 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 POST "$API/plugins/alice/key" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "key_file": "text",
  "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"
  },
  "replaced": 1
}
```

## Errors

- 400: --name is required
- 401: Authentication required
