API referenceSections

Apply the previewed plan (409 PRESET_STALE if the site changed since)

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}/permissions/apply

Apply the previewed plan (409 PRESET_STALE if the site changed since)

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
  • preset string required
    Allowed values: "wordpress" "laravel" "readonly" "default"
  • plan_hash string required
Example
{
  "preset": "wordpress",
  "plan_hash": "string"
}

Responses

200 OK

Content type: application/json

  • id string required
  • preset string required
  • changes array<PermissionChange> required
    • path string required
    • target string required
      Allowed values: "dir" "file"
    • from string required
    • to string required
      Allowed values: "read" "write" "blocked"
    • reason string required
    • result string optional

      ok, kept, or an error code (applied records only)

    • kept boolean optional
  • harden array<string> required
  • hidden array<string> required
  • created_at string (date-time) required
  • reverted_at string (date-time) | null optional
Example
{
  "id": "string",
  "preset": "string",
  "changes": [
    {
      "path": "string",
      "target": "dir",
      "from": "string",
      "to": "read",
      "reason": "string",
      "result": "string",
      "kept": true
    }
  ],
  "harden": [
    "string"
  ],
  "hidden": [
    "string"
  ],
  "created_at": "2026-01-01T00:00:00Z",
  "reverted_at": "2026-01-01T00:00:00Z"
}

default Error

Content type: application/json

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