Skip to main content
POST
/
api
/
recipes
/
{id}
/
repost
Toggle Recipe Repost
curl --request POST \
  --url https://api.example.com/api/recipes/{id}/repost

Authentication

Requires authentication via session cookie.

Path Parameters

ParameterTypeDescription
idUUIDThe recipe ID

Behavior

  • If not reposted: creates a recipe_reposts record.
  • If already reposted: deletes the record (unrepost).
  • The repost_count on the recipe is updated automatically by a database trigger.

Response

{
  "message": "Recipe reposted",
  "isReposted": true
}

Error Responses

StatusCodeDescription
401UNAUTHORIZEDNot authenticated
404NOT_FOUNDRecipe not found or deleted