API referenceSections

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 202

Apply or undo hardening items; with none, only check

Authentication: session cookie __Host-panel_session (contract default; see Authentication).

Parameters

NameInTypeRequiredDescription
tidpathstringrequired
idpathstringrequired
X-CSRF-Tokenheaderstringoptional

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
  • apply array<string> optional
    Allowed values: "file_edit" "admin_ssl" "uploads_php" "protect_files" "dir_browsing" "hide_version"
  • revert array<string> optional
    Allowed values: "file_edit" "admin_ssl" "uploads_php" "protect_files" "dir_browsing" "hide_version"
  • rotate_keys boolean optional
Example
{
  "apply": [
    "file_edit"
  ],
  "revert": [
    "file_edit"
  ],
  "rotate_keys": true
}

Responses

202 Queued

Content type: application/json

  • state string required
    Allowed values: "none" "checking" "ready" "failed"
  • error_code string required
  • checked_at string (date-time) | null required
  • items map<string, string> | null required
  • table_prefix string required
  • default_prefix boolean required
  • keys_rotated boolean optional
  • applied integer required
  • total integer 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

  • code string required
  • message string required
  • details_redacted boolean required
  • correlation_id string required
  • retryable boolean required