> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quader864.ir/llms.txt
> Use this file to discover all available pages before exploring further.

# Approve post

> Approve a pending post for publication

<Note>
  This endpoint requires moderator or admin role.
</Note>

## Path parameters

<ParamField path="id" type="string" required>
  The post ID
</ParamField>

## Response

<ResponseField name="message" type="string">
  Approval confirmation
</ResponseField>

<ResponseField name="post" type="object">
  The approved post with updated visibility
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api-verifier-2.onrender.com/api/blog/65a1b2c3d4e5f6g7h8i9j0k1/approve \
    -H "Authorization: Bearer <your-token>"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "message": "Post approved and published",
    "post": {
      "_id": "65a1b2c3d4e5f6g7h8i9j0k1",
      "title": "My Trading Strategy",
      "visibility": "public",
      "publishedAt": "2024-01-16T15:00:00.000Z"
    }
  }
  ```
</ResponseExample>
