Likes
Authorizations
AuthorizationstringRequired
JWT Access Token obtained via login/register/refresh
Path parameters
blogIdstring Β· objectidRequired
ID of the blog post.
Responses
200
Blog liked successfully. Returns new likes count.
application/json
likesCountintegerOptional
400
User has already liked this blog.
application/json
401
Authentication information is missing or invalid (e.g., missing/expired token).
application/json
404
The specified resource was not found.
application/json
500
An unexpected error occurred on the server.
application/json
post/likes/blog/{blogId}
POST /api/v1/likes/blog/{blogId} HTTP/1.1
Host: blog-api.codewithsadee.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"likesCount": 15
}Authorizations
AuthorizationstringRequired
JWT Access Token obtained via login/register/refresh
Path parameters
blogIdstring Β· objectidRequired
ID of the blog post.
Responses
204
Request successful, no response body.
No content
400
User has not liked this blog previously.
application/json
401
Authentication information is missing or invalid (e.g., missing/expired token).
application/json
404
The specified resource was not found.
application/json
500
An unexpected error occurred on the server.
application/json
delete/likes/blog/{blogId}
DELETE /api/v1/likes/blog/{blogId} HTTP/1.1
Host: blog-api.codewithsadee.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Last updated
Was this helpful?