nextjs-wordpress icon indicating copy to clipboard operation
nextjs-wordpress copied to clipboard

contact form 7 API does not work - No route was found matching the URL and request method.

Open mac10046 opened this issue 11 months ago • 0 comments

I have added contact form 7 plugin to add contact us page in the UI and tried hitting this CURL using POSTMAN in many different ways.

Referring to this POST for sending using the API https://medium.com/@mahesh_joshi/wordpress-contact-form-7-rest-api-endpoints-bf45907b571c


curl --location 'https://DOMAIN.com/wp-json/contact-form-7/v1/contact-forms/948e6c6/feedback' \
--form 'your-name="MY NAME"' \
--form 'your-email="[email protected]"' \
--form 'your-subject="Testing"' \
--form 'your-message="hope its works"'

but I keep getting the same error

{
    "code": "rest_no_route",
    "message": "No route was found matching the URL and request method.",
    "data": {
        "status": 404
    }
}

Looks like some plugin code is blocking it, tried deactivating all plugins except contact form 7 but yet it didnt work out Even commented out the whole htaccess file code to check but yet no luck

mac10046 avatar Jan 04 '25 17:01 mac10046