Apply or undo hardening items; with none, only check
Generated from the OpenAPI contract. Sessions send the CSRF header on writes; API keys use a Bearer token. Authentication
POST
/api/v1/tenants/{tid}/sites/{id}/wordpress/hardening may answer 202Apply or undo hardening items; with none, only check
Authentication: session cookie __Host-panel_session (contract default; see Authentication).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tid | path | string | required | |
id | path | string | required | |
X-CSRF-Token | header | string | optional | Required on unsafe requests authenticated by session cookie; API keys do not use it. |
Request body
required
Content type: application/json
object
- no other properties
applyarray<string> optionalAllowed values:"file_edit""admin_ssl""uploads_php""protect_files""dir_browsing""hide_version"revertarray<string> optionalAllowed values:"file_edit""admin_ssl""uploads_php""protect_files""dir_browsing""hide_version"rotate_keysboolean optional
Example
{
"apply": [
"file_edit"
],
"revert": [
"file_edit"
],
"rotate_keys": true
}Responses
202 Queued
Content type: application/json
statestring requiredAllowed values:"none""checking""ready""failed"error_codestring requiredchecked_atstring (date-time) | null requireditemsmap<string, string> | null requiredtable_prefixstring requireddefault_prefixboolean requiredkeys_rotatedboolean optionalappliedinteger requiredtotalinteger required
Example
{
"state": "none",
"error_code": "string",
"checked_at": "2026-01-01T00:00:00Z",
"items": {
"key": "on"
},
"table_prefix": "string",
"default_prefix": true,
"keys_rotated": true,
"applied": 0,
"total": 0
}default Error
Content type: application/json
codestring requiredmessagestring requireddetails_redactedboolean requiredcorrelation_idstring requiredretryableboolean required