List, create, and delete comments
Read article comments, add a comment, and remove comments owned by the authenticated user.
This reference covers the three comment operations for an article. Listing comments is available without authentication; creating and deleting a comment require the Token authorization scheme. All paths use an article slug, and comment deletion also uses the integer comment id.
The examples target the public demo API at https://api.realworld.show/api. Replace ARTICLE_SLUG, COMMENT_ID, and YOUR_TOKEN with values from your account. See authentication and token usage and the error envelope for shared request and error behavior.
GET /articles/{slug}/comments
List the comments attached to an article. Authentication is optional.
/articles/{slug}/commentsSlug of the article whose comments you want to read.
curl --request GET \ --url https://api.realworld.show/api/articles//comments
{ "comments": [
{
"id": 1,
"createdAt": "2026-09-25T10:00:00Z",
"updatedAt": "2026-09-25T10:00:00Z",
"body": "A useful comment",
"author": {
"username": "reader_123",
"bio": null,
"image": "https://example.com/avatar.png",
"following": false
}
}
] }curl --request GET \
--url "https://api.realworld.show/api/articles/ARTICLE_SLUG/comments"The response always uses a comments array. Each comment includes its integer id, body, timestamps, and author profile. An empty article has an empty array.
POST /articles/{slug}/comments
Create a comment for an article. Authentication is required, and the request body must contain a non-null body field inside comment.
/articles/{slug}/commentsUse the form `Token YOUR_TOKEN`.
Slug of the article to comment on.
Object containing the required string property `body`.
curl --request POST \
--url https://api.realworld.show/api/articles//comments \
--header 'Content-Type: application/json' \
--data '{
"comment": {}
}'{ "comment": { "id": 1, "createdAt": "2026-09-25T10:00:00Z", "updatedAt": "2026-09-25T10:00:00Z", "body": "A useful comment", "author": { "username": "reader_123", "bio": null, "image": "https://example.com/avatar.png", "following": false } } }curl --request POST \
--url "https://api.realworld.show/api/articles/ARTICLE_SLUG/comments" \
--header "Authorization: Token YOUR_TOKEN" \
--header "Content-Type: application/json" \
--data '{"comment":{"body":"A useful comment"}}'The 201 Created response contains the new comment under comment. Capture its integer id if you may need to remove it later.
DELETE /articles/{slug}/comments/{id}
Delete a comment that belongs to the authenticated user. The operation returns no response body.
/articles/{slug}/comments/{id}Use the form `Token YOUR_TOKEN`.
Slug of the article containing the comment.
Integer ID of the comment to delete.
curl --request DELETE \ --url https://api.realworld.show/api/articles//comments/
{}curl --request DELETE \
--url "https://api.realworld.show/api/articles/ARTICLE_SLUG/comments/COMMENT_ID" \
--header "Authorization: Token YOUR_TOKEN"After 204 No Content, call the list operation again and confirm that the deleted ID is absent. A failed ownership check leaves the comment available to its owner.
Next steps
Use read an article by slug to obtain an article slug, or review favorite and unfavorite articles for another authenticated article action.