Disable Comments lets you block any comments made on your WordPress website with REST API. This is an interface used by developers to access your website from outside your WordPress installation. Read the instructions below to learn how to disable any comments made via REST API.
Step 1: First, install Disable Comments plugin on your website
Step 2: Navigate to Settings→ Disable Comments from your WordPress dashboard.
Step 3: From here, toggle the ‘Disable Comments via REST API’ option to disable any comments made on your website with REST API. Make sure to click on the ‘Save’ button to update your changes.