/comments
GETPublic
Lists comments for a target, by target_type and target_id, with offset and limit. Unknown target types return 422.
Handler: cb_get_comments()
| Parameter | Type | Required | Default or allowed values |
|---|---|---|---|
| target_type | see source | — | — |
| target_id | see source | — | — |
| offset | integer | — | 0 |
| limit | integer | — | — |
curl "https://example.com/wp-json/davo/v1/comments"POSTAccess check: auth_require_comment
Creates a comment on a target as the current user.
Handler: cb_create_comment()
| Parameter | Type | Required | Default or allowed values |
|---|---|---|---|
| target_type | see source | — | — |
| target_id | see source | — | — |
| content | string | Yes | — |
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/comments" \
-H "Content-Type: application/json" \
-d '{"content": "…"}'src/domains/comments/routes.php:70