
If you wish to ‘Create comments’ using REST API, without exposing Administrator credentials to the Front-End application, you are at the right place. Since WordPress 4.7, REST API was natively included in WordPress.
In order to ‘Create a comment’ , the authentication for a user with ‘Administrator’ role is required. While this is a deliberately done for security reasons, such implementation makes it very hard for Front-End applications to implement a simple ‘Post Comment’ or ‘Reply Comment’ function.
This plugin fulfils such requirement by extending the existing WordPress REST API endpoints.
Requirements:
Minimum PHP version: 7.0
Minimum WordPress version: 5.5
Installation:
Download the plugin form wordpress marketplace install it like any other WordPress plugin.
After the installation activate the plugin through the ‘Plugins’ menu in WordPress
Endpoint:
When this plugin is installed one new endpoint is added to the wp/v2 namespace.
Endpoint
HTTP Verb
Permalinks
*/wp-json/wp/v2/comments/create
POST
enabled
*/?rest_route=/wp/v2/comments/create
POST
disabled
Usage:
To create a comment using REST API, send a POST request to:
/wp-json/wp/v2/comments/create – if permalinks is enabled on your wordpress website.
Or
/?rest_route=/wp/v2/comments/create if permalinks is not enabled on your wordpress website.
With a JSON body, as shown bellow:
`Json
{
“post”: “Post ID”,
“author_name”: “Comment Author’s name”,
“author_email”: “Comment Author’s email”,
“content”: “Comment content”
}
`
The content may also be send as an object:
`Json
{
“post”: “Post ID”,
“author_name”: “Comment Author’s name”,
“author_email”: “Comment Author’s email”,
“content”: {
“raw”:”Comment content”
}
}
`
Set header to:
`
content-type: application/json
`
If successful, you should receive a response with the data of the created comment:
`Json
{
“id”: “[comment id]”,
“status”: “[comment status]”,
“message”:”[server response message]”
}
`
In response header the status code should be:
`Http
HTTP 201 Created
`
To reply a comment you just need to add the field parent for the parent comment to the JSON body
`Json
{
“post”: “Post ID”,
“author_name”: “Comment Author’s name”,
“author_email”: “Comment Author’s email”,
“content”: “Comment content”,
“parent”:”Comment parent ID”
}
`
Note: Ensure the parent is a comment id that belongs to the post informed in the field post. The comment parent post id must match the post id otherwise the following error will be shown:
`Json
{
“code”: “rest_post_mismatch_parent_post_id”,
“message”: “Post ID and Parent post ID does not match”,
“data”: {
“status”: 400
}
}
`
If there is any thing to say about the plugin fill free to contact us.
Starting from $0 per month.
Rating
Reviewers
No reviews
Tags
Developed By
Joaquim Domingos António
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Showcase images with an image carousel that rotates or slides visuals, improves design, and draws attention to key content.
Add an AI chatbot that answers user questions by crawling your site, using uploaded content, and collecting chat interactions.
Present all your locations with a clear company branch list that helps customers find nearby offices, understand key details, and enjoy a smoother experience.
Display Bluesky posts with a Bluesky feed carousel that auto updates, shows posts in a clear layout, and keeps visitors engaged.

Collect event responses with an RSVP form that lets guests register easily, saves submissions, sends notifications, and helps you organize attendance efficiently.
Add a corner coupon pop-up to highlight discounts, collect emails, and drive user engagement without interrupting browsing.
Create interactive personality quizzes with custom results and flexible design to boost engagement and help visitors explore tailored outcomes easily.

Use an engagement toolbox that combines forms, galleries, chats, and interactive elements to increase visitor activity and create a more engaging user experience.
Create job listings with a jobs board widget that lets you post openings, manage roles easily, and help candidates find the right positions quickly.
Show live streams and clips with a Twitch feed that keeps content fresh, boosts engagement, and helps visitors follow your channel more easily.
Enhance titles with highlighted headlines that use custom colors, animations, and styles to draw attention and help visitors notice key messages.
Add a countdown timer to your site to highlight upcoming events or launches and encourage timely user action.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
