404 Error Contact Form 7 on WordPress

this is quite a common issue with htaccess file blocking malformed un-shlashed url such as cf7 wp-json requests.

Therefore check your .htaccess file in your root folder to see if this is the case with your server too, find the section in your .htaccess that is adding a “https://wordpress.stackexchange.com/” at the end of requests

# Add trailing slash to the end of the link
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteCond %{REQUEST_URI} !^/wp-json
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpg|png|jpeg|css|js|xml)$ [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1/ [L,R=301]
# End Adding trailing slash to the end of the link

and isnert the line RewriteCond %{REQUEST_URI} !^/wp-json to escape wp-json requests just before the RewriteRule