Skip to main content
GET
/
api
/
collections
/
{id}
/
comments
Collection Comments
curl --request GET \
  --url https://api.example.com/api/collections/{id}/comments

List Comments

GET /api/collections//comments No authentication required.

Response

{
  "comments": [
    {
      "id": "uuid",
      "content": "Great curation!",
      "createdAt": "2025-01-15T10:30:00Z",
      "author": {
        "id": "uuid",
        "username": "fujifilmfan",
        "avatarUrl": "https://..."
      }
    }
  ],
  "total": 3
}

Create Comment

POST /api/collections//comments Requires authentication.

Request Body

{
  "content": "Amazing collection @curator"
}

Mention Handling

Same pattern as post and recipe comments — @username mentions are parsed, stored in collection_comment_mentions, and trigger notifications via database triggers.

Response (201)

{
  "message": "Comment added successfully",
  "comment": {
    "id": "uuid",
    "content": "Amazing collection @curator",
    "createdAt": "2025-01-15T10:30:00Z",
    "author": {
      "id": "uuid",
      "username": "currentuser",
      "avatarUrl": "https://..."
    }
  }
}

Error Responses

StatusCodeDescription
400VALIDATION_ERRORInvalid comment content
401UNAUTHORIZEDNot authenticated
404NOT_FOUNDCollection not found or deleted