> ## 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.

# Reject post

> Reject a pending post

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

## Path parameters

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

## Request body

<ParamField body="reason" type="string">
  Reason for rejection (optional)
</ParamField>

## Response

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

<ResponseField name="post" type="object">
  The rejected post with updated visibility and admin notes
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api-verifier-2.onrender.com/api/blog/65a1b2c3d4e5f6g7h8i9j0k1/reject \
    -H "Authorization: Bearer <your-token>" \
    -H "Content-Type: application/json" \
    -d '{
      "reason": "Content does not meet quality guidelines"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "message": "Post rejected",
    "post": {
      "_id": "65a1b2c3d4e5f6g7h8i9j0k1",
      "title": "My Trading Strategy",
      "visibility": "rejected",
      "adminNotes": "Content does not meet quality guidelines"
    }
  }
  ```
</ResponseExample>
