Recipe Book

Comments

Comment management endpoints for the Smart Recipe Book

These endpoints allow you to edit and delete your own comments. To create a comment or list comments for a recipe, see the Recipes endpoints:

  • GET /recipe-book/recipes/<recipeId>/comments — List comments for a recipe
  • POST /recipe-book/recipes/<recipeId>/comments — Add a comment to a recipe

The Comment model

PropTypeDefault
id
string
-
text
string
-
recipeId
string
-
author
Profile
-
created
Date
-
updated
Date
-

Update comment

PUT/recipe-book/comments/<id>

Edit a comment by its id. Only the author of the comment can update it.

Request
{
  "text": "Updated: this was even better the second time around!"
}
Response
{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "text": "Updated: this was even better the second time around!",
    "recipeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "author": {
      "name": "john_doe",
      "email": "john@stud.noroff.no",
      "bio": null,
      "avatar": null,
      "banner": null
    },
    "created": "2026-03-12T14:00:00.000Z",
    "updated": "2026-03-12T14:30:00.000Z"
  },
  "meta": {}
}

Delete comment

DELETE/recipe-book/comments/<id>

Delete a comment by its id. Only the author of the comment can delete it.

Returns an empty 204 No Content response on success.

On this page