Replace PHP ini configuration
Sets the sandbox’s PHP ini values (async apply_php_config job). Every field below is required on every call — the server validates and rewrites the complete configuration object each time; a request missing any field is rejected with 400 invalid_php_config naming the missing/invalid field. (The dashboard’s own hand-written API guide describes this endpoint as accepting a partial update where “only the ones you send change” — that is not what the deployed handler does; treat this schema, not that prose, as authoritative and always send the full object, e.g. seeded from a prior GET.) The sandbox must be ready. memoryLimitMb’s effective maximum is dynamic — see limits.memoryLimitMaxMb on the GET response for this sandbox — and uploadMaxFilesizeMb must not exceed postMaxSizeMb.
Authorizations
Personal API token, sent as Authorization: Bearer <SANDYWP_API_KEY>. Obtain one from the dashboard account menu (API keys), sandywp auth login, or POST /api/account/tokens. A missing or invalid token returns 401 auth_required. Scoped OAuth tokens are limited to the Imports family and GET /api/account/me; see the top-level conventions.
Headers
Selects which of the caller's workspaces to act in, for accounts belonging to more than one (legacy alias: X-SandyWP-Organization). Defaults to the caller's own personal workspace when omitted. Every id in this API (sandboxes, Templates, repositories) is scoped to a single workspace, so this header changes which set of resources is visible.
Path Parameters
The sandbox id.
Body
A sandbox's PHP ini overrides. All fields are required both when read back from GET .../php-config and when written via PUT .../php-config (the PUT endpoint replaces the whole object — see that operation's description for why this differs from what the hand-written API guide says).
Seconds. max_execution_time.
10 <= x <= 300Seconds. max_input_time.
10 <= x <= 300max_input_vars.
100 <= x <= 10000MB. memory_limit. The static maximum is 512, but the effective ceiling for a given sandbox is usually lower — see limits.memoryLimitMaxMb on the GET response.
64 <= x <= 512allow_url_fopen.
MB. post_max_size.
8 <= x <= 5120MB. upload_max_filesize. Must not exceed postMaxSizeMb.
2 <= x <= 5120Seconds. session.gc_maxlifetime.
300 <= x <= 86400Bytes (0 disables). output_buffering.
0 <= x <= 65536Response
The applied PHP configuration and, if a change was queued, its job id.
A sandbox's PHP ini overrides. All fields are required both when read back from GET .../php-config and when written via PUT .../php-config (the PUT endpoint replaces the whole object — see that operation's description for why this differs from what the hand-written API guide says).
The queued apply_php_config job id, or null if the request was a no-op.

