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

# Moderate a Review

> Moderate a Review using the Razorpay Orders Review API.

Available in
🇮🇳 India

Use this endpoint to moderate a review by changing its published status. The request body determines the behaviour:

| Intent | Body | Behaviour |
| - | - | - |
| Approve or re-publish | `{ "published_status": "published" }` | From `awaiting_approval` or `hidden`. Fires `order.review.published`. |
| Hide | `{ "published_status": "hidden" }` | From `awaiting_approval` or `published`. Fires `order.review.hidden`. |

> [!WARNING]
>
> **Watch Out!**
>
> `published` and `hidden` are the only writable statuses, and content fields are never writable over this API. A review already in the target status returns `200` unchanged and fires nothing. A transition not listed above, or any other body, returns `400`.

```bash Curl theme={null}
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
-X PATCH https://api.razorpay.com/v1/orders/reviews/ordrev_Ndx4kpTr77wxyz \
-H "content-type: application/json" \
-d '{
  "published_status": "published"
}'
```

```json Success theme={null}
{
  "id": "ordrev_Ndx4kpTr77wxyz",
  "entity": "order.review",
  "review_request_id": "rvreq_Nct0mnpQ12abcd",
  "order_id": null,
  "receipt": "RISTA-88921",
  "customer_id": "cust_Nct0mnpQ12cust",
  "customer": {
    "name": "Ananya",
    "contact": "+919812345621",
    "email": "ananya@example.com"
  },
  "applies_to": "product",
  "published_status": "published",
  "rating": 5,
  "body": "Best filter coffee I have had.",
  "media_urls": ["https://ark-media.razorpay.com/r/9f2a1c.jpg"],
  "line_item": {
    "sku": "SKU-BT-114",
    "name": "Attikan Estate",
    "variant_id": "250g-wb"
  },
  "submitted_at": 1752998400,
  "update_request": null
}
```

```json Failure theme={null}
{
  "error": {
    "code": "BAD_REQUEST_ERROR",
    "description": "published and hidden are the only writable statuses.",
    "source": "business",
    "step": "payment_initiation",
    "reason": "input_validation_failed",
    "field": "published_status"
  }
}
```

## Path Parameters

**id** `string` *required*

Unique identifier of the review to be moderated. The prefix is `ordrev_`.

## Request Parameters

**published\_status** `string` *required*

The target moderation state. Possible values:

* `published`: Approve or re-publish the review, from `awaiting_approval` or `hidden`.
* `hidden`: Hide the review, from `awaiting_approval` or `published`.

## Response Parameters

See the [Review entity](https://razorpay.com/docs/api/orders/reviews/review-entity.md) for the full list of response parameters.

## Errors

> [accordion] Authentication failed.
>
> **Code:** `401`
>
> The API credentials passed in the API call differ from the ones generated on the Dashboard.
>
> **Solution:** The API keys must be active and entered correctly with no whitespace before or after the keys.

> [accordion] published and hidden are the only writable statuses.
>
> **Code:** `400`
>
> The `published_status` field was set to a value other than `published` or `hidden`, or a content field was sent in the body.
>
> **Solution:** Pass only `published_status` with a value of `published` or `hidden`. Review content is never writable over this API.

> [accordion] The id provided does not exist.
>
> **Code:** `404`
>
> The review id does not exist or does not belong to the requestor.
>
> **Solution:** Ensure you use a valid review id that belongs to the requestor.
