Comments are made by readers on specific blog posts to give their opinion, suggest changes, give sources, interact with authors...
| Field | Type | Description | Can be null ? |
|---|---|---|---|
| slug | string | unique identifier of the comment | |
| username | string | username of the comment's author (2-64 characters) | |
| string | their email | β
(without USER_WRITE permission) |
|
| encoded_email | string | encoded hash of their email for Gravatar | |
| ip | string | IP from where the comment was published | β
(without USER_WRITE permission) |
| post | string | identifier of the blog post | |
| content | string | comment's content (5-500 characters) | |
| is_validated | boolean | if it's validated by a moderator (publicly available) | β
(without USER_WRITE permission) |
| pinned | boolean | if it's pinned (at the top) | |
| timestamp | integer | unix timestamp, comment creation |
GET /comments
Get all the comments published on any article. Returns an array of comment objects. Requires auth and USER_WRITE permission.
This endpoint uses pagination.
GET /comments/{post.url}
Get comments published on a specific article. Returns an array of comment objects.
This endpoint uses pagination.
POST /comments/{post.url}
Submit, as a user, a comment on an article. Note that a moderator will have to validate the comment in order for it to be published.
| Field | Type | Description |
|---|---|---|
| username | string | username of the comment's author |
| string | their email | |
| content | string | comment's content |
PUT /comments/{post.url}/{comment.url}
Validate a comment to publish it. Requires auth and USER_WRITE permission.
DELETE /comments/{post.url}/{comment.url}
Delete a comment, published or not. Requires auth and USER_WRITE permission