WP_Error: Invalid response from the API appears when a REST request returns non‑JSON data. The server sends HTML, a 403, or a 500 status instead of the expected JSON payload. This breaks Gutenberg, Site Editor, and any admin action which relies on the REST API.
Typical triggers include blocked endpoints, mismatched site URLs, corrupted rewrite rules, PHP fatal errors, SSL mis‑configuration, or a plugin which alters the REST response. When the API cannot deliver valid JSON, WordPress wraps the failure in a WP_Error object and displays the message.