curl -X POST https://api-verifier-2.onrender.com/api/blog/65a1b2c3d4e5f6g7h8i9j0k1/approve \
-H "Authorization: Bearer <your-token>"
{
"message": "Post approved and published",
"post": {
"_id": "65a1b2c3d4e5f6g7h8i9j0k1",
"title": "My Trading Strategy",
"visibility": "public",
"publishedAt": "2024-01-16T15:00:00.000Z"
}
}
Blog
Approve post
Approve a pending post for publication
POST
/
api
/
blog
/
{id}
/
approve
curl -X POST https://api-verifier-2.onrender.com/api/blog/65a1b2c3d4e5f6g7h8i9j0k1/approve \
-H "Authorization: Bearer <your-token>"
{
"message": "Post approved and published",
"post": {
"_id": "65a1b2c3d4e5f6g7h8i9j0k1",
"title": "My Trading Strategy",
"visibility": "public",
"publishedAt": "2024-01-16T15:00:00.000Z"
}
}
This endpoint requires moderator or admin role.
Path parameters
string
required
The post ID
Response
string
Approval confirmation
object
The approved post with updated visibility
curl -X POST https://api-verifier-2.onrender.com/api/blog/65a1b2c3d4e5f6g7h8i9j0k1/approve \
-H "Authorization: Bearer <your-token>"
{
"message": "Post approved and published",
"post": {
"_id": "65a1b2c3d4e5f6g7h8i9j0k1",
"title": "My Trading Strategy",
"visibility": "public",
"publishedAt": "2024-01-16T15:00:00.000Z"
}
}