# comment

Source: https://zotonic.com/docs/2063/comment

URI: https://zotonic.com/id/2063

Language: en



Model for comments attached to resources. It provides listing, moderation checks, counting, and retrieval of individual comments.

Available Model API Paths
-------------------------

| Method | Path pattern          | Description                                                                      |
| ------ | --------------------- | -------------------------------------------------------------------------------- |
| `get`  | `/anonymous/...`      | Return whether anonymous comments are allowed; defaults to `true` when `mod_comment.anonymous` is unset. |
| `get`  | `/moderate/...`       | Return whether new comments require moderation; defaults to `false` when `mod_comment.moderate` is unset/empty. |
| `get`  | `/rsc/+id/...`        | Return all comment rows for resource `+id` (ascending by creation time; requires resource visibility). |
| `get`  | `/count/+id/...`      | Return total comment count for resource `+id` (requires resource visibility).    |
| `get`  | `/get/+commentid/...` | Return comment record `+commentid`, or `undefined` if missing; access is denied when the linked resource is not visible. |

`/+name` marks a variable path segment. A trailing `/...` means extra path segments are accepted for further lookups.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2063?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2063?language=en>)
