Fix “Not a Valid JSON Response” When Saving WordPress Widgets (403)
If WordPress shows “The response is not a valid JSON response” when you save a sidebar or footer widget, a hosting security rule may be blocking the request the block-based widget editor uses to save your change.
In this article
Identify the Endpoint-Specific 403 Error
The block-based WordPress widget editor sends its save request to the WordPress batch REST API endpoint, /wp-json/batch/v1. A 403 response means that a security layer denied the request instead of returning the JSON data the editor expects, which causes the error message.
This has been observed on IONOS hosting, but it can affect sites on any host or security service. A working /wp-json/ endpoint does not rule out this problem: the base REST API can work while the batch endpoint is blocked.
If the failed request does not return 403 from /wp-json/batch/v1, use the guide to invalid JSON errors caused by HTTP/HTTPS mismatches, REST API 404 responses, or permalink routing instead.
Confirm the Blocked Request
- In your WordPress dashboard, go to Appearance > Widgets and keep the widget change ready to save.
- Open your browser's developer tools and select the Network tab. The Network tab lists the requests your browser sends and the responses it receives.
- Save the widget change again.
- In the Network list, find the request whose path is
/wp-json/batch/v1. - Confirm that its method is
POSTand its status is403.
You can also open https://yourdomain.com/wp-json/ in a browser, replacing yourdomain.com with your domain. If it shows JSON output while the Network tab shows the 403 batch request, the block affects the specific batch endpoint.
Ask Your Hosting Provider to Allow the Request
Contact the provider that manages your hosting firewall or web application firewall (WAF), which is a security filter that reviews website requests. Give them:
- The time the save failed, including your time zone.
- The request path:
/wp-json/batch/v1. - The request method:
POST. - The response status:
403.
Ask the provider to review the security logs and add a narrow exception that allows the affected authenticated request. Do not disable the firewall or REST API protection for your entire site.
Use Another Widget Interface While the Block Is Reviewed
While the provider reviews the block, you can use the official Classic Widgets plugin to use the classic widget screen instead of the block-based editor. This avoids the batch endpoint used by the block-based widget screen.
If your active classic theme provides a Customizer-based widget interface, you can use that interface instead while the block remains in place. This option is not available with every theme.
Verify the Resolution
- Return to the block-based WordPress Widgets screen and repeat the same widget change.
- Save the change and confirm that it is saved without the “not a valid JSON response” message.
- In your browser's Network tab, confirm that the request to
/wp-json/batch/v1no longer returns403.
