What to check before a repair
If WordPress says “Updating failed. The response is not a valid JSON response”, open Site Health and check the REST API. In browser developer tools, inspect the failed request status and response. An HTML login page, firewall challenge or PHP warning is not valid JSON. For rest_cookie_invalid_nonce, sign in again and exclude authenticated REST requests from page caching. Do not disable security globally.
Related help: WordPress Bug Fixing Service
Since the block editor arrived, the REST API stopped being a developer feature and became WordPress's own nervous system: every post you save travels through /wp-json/. Mobile apps, WooCommerce integrations, page builders, headless frontends — all of it rides the same rails. So when the API breaks, the damage shows up everywhere at once, wearing a dozen different error messages.
Quick answer: REST API failures cluster into four causes — the endpoint being blocked (security plugins, firewalls, or hosts disabling wp-json), authentication failing (the famous rest_cookie_invalid_nonce, application password issues), the response being corrupted (PHP warnings or plugin output injected before the JSON, producing "the response is not a valid JSON response" in the editor), and rewrite problems making /wp-json/ itself 404. Each is testable directly, which makes this unusually fast to diagnose. Repairs start at $150 USD.
The Errors and What They Mean
- "Updating failed. The response is not a valid JSON response." The block editor's cry for help: it asked the API for JSON and got something else — an HTML error page, a PHP warning printed before the JSON, or a security block. The actual response body (which we inspect) names the culprit.
- 401 / 403 on wp-json routes. Authentication or authorization failing: expired cookie nonces, security plugins requiring login for all API access (breaking legitimate public routes), server rules blocking the path, or application passwords disabled.
- rest_cookie_invalid_nonce. The session security token doesn't match — classically caused by caching serving stale nonces, mismatched site URLs (www vs non-www, http vs https), or aggressive page caching applied to logged-in users.
- /wp-json/ returns 404 entirely. Rewrite rules broken (permalinks need re-saving), or the API deliberately disabled by a plugin or code snippet someone added years ago "for security" — a fix that now breaks the editor itself.
- Integrations failing silently. The app, the sync, the headless frontend that just stopped: usually one of the above, discovered late because nothing was monitoring the endpoint. We fix the cause and can add monitoring so the next failure announces itself.
Fixing the API Without Exposing It
Half of all REST API breakage is self-inflicted security: the API exposes information (like user listings) that people rightly want controlled, so plugins and snippets lock it down — and take the block editor down with it. The correct posture isn't "API off" or "API open"; it's granular: sensitive routes restricted, functional routes working, authenticated access intact. We repair broken APIs to that standard — your editor and integrations work, and the routes that should be private stay private.
Pricing: From $150
REST API repairs start at $150 USD — diagnosis across all four layers, the fix, and verification of the routes your site actually depends on (editor, WooCommerce, your integrations). Headless setups and custom-endpoint debugging are quoted after a free look at the failing requests. If the API breakage is one symptom of a larger error condition, our HTTP error service and this one are quoted as a single job.
REST API FAQs
The block editor says 'the response is not a valid JSON response' when I save. What's wrong?
The editor sent your post to the REST API and got back something that isn't JSON — an error page, a security block, or JSON with PHP warnings printed in front of it. We inspect the actual response body, which reveals the culprit directly: it's usually a security plugin rule, a server block on wp-json, or a plugin leaking output. Once attributed, the fix is quick.
Is it safe to have /wp-json/ publicly accessible?
Mostly yes — the API is core WordPress and the block editor requires it. The legitimate concern is specific routes (like user enumeration) exposing information. The right answer is granular restriction of sensitive routes, not disabling the API wholesale, which breaks the editor. We configure exactly that balance.
Why do I keep getting rest_cookie_invalid_nonce errors?
Your security token doesn't match what the server expects. The classic causes: page caching serving stale nonces (especially caching applied to logged-in users), mismatched site URLs between settings (www/non-www, http/https), or session cookies being dropped. It's a configuration fix, not a mystery — and it's one of our most common API repairs.
My mobile app / Zapier / headless frontend stopped connecting to my site. Can you fix it?
Yes. External integrations fail for the same four reasons plus one more: authentication method changes (application passwords disabled, keys expired). We test the exact requests your integration makes, fix the failing layer, and can add endpoint monitoring so a future breakage alerts you instead of silently stopping your sync.
A security plugin fixed one problem but broke my editor. Do I have to choose?
No — that trade-off is a configuration failure, not a law of nature. Security plugins' API lockdown features default to blunt settings; configured granularly, sensitive routes stay restricted while the editor's routes work normally. We tune the same plugin you already have to do both jobs correctly.
Keep Reading
- Fix WordPress HTTP errors: 401, 403, 404 & more
- Fix WordPress CSS & JS errors
- Custom API integrations & development
- Fix WooCommerce cart, checkout & shop problems
- All WordPressFix services →
A practical checklist for invalid JSON responses
Start with a single failing save in the block editor. Record the time, the page ID and whether the error affects every post or just one. In your browser's Network panel, locate the failed REST request. Inspect its HTTP status, response content type and response body. Do not share cookies, authorization headers or personal data from this panel.
A 200 response containing HTML may point to a login redirect, a maintenance page or an unexpected PHP notice. A 401 or 403 calls for an authentication or access-rule check. A 404 on a known REST route suggests checking routing and permalink configuration. A 500 response requires the matching PHP and web server logs. A successful response from /wp-json/ alone does not prove that authenticated editing works.
For rest_cookie_invalid_nonce, first save any unsaved text locally, sign out and sign back in. Compare the configured WordPress and site URLs with the address in your browser. Check whether a CDN or page cache is reusing a logged-in response. Review only the relevant cache and firewall rules; do not turn off the firewall or expose private routes to everyone.
If the failure started after an update, reproduce it on a staging copy with the same PHP version. Test one suspected plugin or theme change at a time and record the results. Avoid editing production rewrite rules without a rollback copy. When the cause is corrected, test creating a draft, updating a published test page and any affected integration. Confirm that unauthenticated requests still cannot modify content.
For a repair request, send the exact error, HTTP status, time of failure and a sanitized response excerpt. This helps separate a WordPress code issue from a proxy, cache or hosting problem.
Why does the REST API work in my browser but fail when I save a post?
Public API routes and authenticated editing requests use different permissions and session checks. Inspect the actual failing save request rather than relying on the public API index.
Related help: WordPress Bug Fixing Service.
Get your API answering again.
Open the HELLO FIX chat in the corner or email your URL and the exact error (a screenshot of the wp-json response is perfect). API repairs start at $150 — the block editor is usually saving again the same day.