---
updatedAt: 2026-10-29T11:54:48.000Z
agentTools:
  projectIndex: https://docs.yotpo.com/llms.txt
---

# Publish/Unpublish Reviews

This API allows you to publish or reject one or multiple reviews to the onsite widgets.

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th style={{ textAlign: "left" }}>
        Field
      </th>

      <th style={{ textAlign: "left" }}>
        Data Type
      </th>

      <th style={{ textAlign: "left" }}>
        Is it mandatory?
      </th>

      <th style={{ textAlign: "left" }}>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        store\_id
      </td>

      <td style={{ textAlign: "left" }}>
        String
      </td>

      <td style={{ textAlign: "left" }}>
        Yes
      </td>

      <td style={{ textAlign: "left" }}>
        Store id/app key of the merchant
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        review\_action
      </td>

      <td style={{ textAlign: "left" }}>
        String
      </td>

      <td style={{ textAlign: "left" }}>
        Yes  

        Allowed values: "publish", "unpublish"
      </td>

      <td style={{ textAlign: "left" }}>
        The action to perform on the reviews.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        review\_ids
      </td>

      <td style={{ textAlign: "left" }}>
        Array of integers
      </td>

      <td style={{ textAlign: "left" }}>
        Yes
      </td>

      <td style={{ textAlign: "left" }}>
        An array of review IDs to be published or unpublished.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        admin\_email
      </td>

      <td style={{ textAlign: "left" }}>
        String
      </td>

      <td style={{ textAlign: "left" }}>
        No
      </td>

      <td style={{ textAlign: "left" }}>
        The email address of the admin initiating the action. It will be visible in moderation audit log
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        admin\_display\_name
      </td>

      <td style={{ textAlign: "left" }}>
        String
      </td>

      <td style={{ textAlign: "left" }}>
        No
      </td>

      <td style={{ textAlign: "left" }}>
        The display name of the admin initiating the action. It will be visible in moderation audit log
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        reason
      </td>

      <td style={{ textAlign: "left" }}>
        String
      </td>

      <td style={{ textAlign: "left" }}>
        No  

        Needed for unpublish review\_action
      </td>

      <td style={{ textAlign: "left" }}>
        Reason of unpublish review\_action
      </td>
    </tr>
  </tbody>
</Table>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "App partners API",
    "description": "Endpoints for apps that Yotpo merchants install. The app-level webhook is defined separately, in webhooks.json.",
    "version": "2"
  },
  "servers": [
    {
      "url": "https://developers.yotpo.com"
    }
  ],
  "security": [
    {
      "X-Yotpo-Token": []
    }
  ],
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "paths": {
    "/v2/{store_id}/moderation/reviews": {
      "post": {
        "summary": "Publish/Unpublish Reviews",
        "description": "This API allows you to publish or reject one or multiple reviews to the onsite widgets.",
        "operationId": "publishunpublish-reviews",
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "description": "Store id/app key of the merchant",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "review_action",
                  "review_ids"
                ],
                "properties": {
                  "review_action": {
                    "type": "string",
                    "description": "The action to perform on the reviews. Allowed values: \"publish\", \"unpublish\""
                  },
                  "review_ids": {
                    "type": "array",
                    "description": "An array of review IDs to be published or unpublished.",
                    "items": {
                      "type": "integer",
                      "format": "int32"
                    }
                  },
                  "admin_email": {
                    "type": "string",
                    "description": "The email address of the admin initiating the action. It will be visible in moderation audit log"
                  },
                  "admin_display_name": {
                    "type": "string",
                    "description": "The display name of the admin initiating the action. It will be visible in moderation audit log"
                  },
                  "reason": {
                    "type": "string",
                    "description": "Reason of unpublish review_action. Needed for unpublish review_action"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "204",
            "content": {
              "application/json": {
                "examples": {
                  "Success": {
                    "value": "Success"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n   \"status\":{\n      \"message\":\"Exceptions::InvalidParams\",\n      \"code\":400,\n      \"error_type\":\"Exceptions::InvalidParams\",\n      \"uuid\":\"<uuid>\",\n      \"s\":4\n   }\n}\n"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Exceptions::InvalidParams"
                        },
                        "code": {
                          "type": "integer",
                          "example": 400,
                          "default": 0
                        },
                        "error_type": {
                          "type": "string",
                          "example": "Exceptions::InvalidParams"
                        },
                        "uuid": {
                          "type": "string",
                          "example": "<uuid>"
                        },
                        "s": {
                          "type": "integer",
                          "example": 4,
                          "default": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid access token, or the token belongs to a different store.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n   \"status\":{\n      \"message\":\"You are not authorized to access this page.\",\n      \"code\":401,\n      \"error_type\":\"Exceptions::AccessDenied\",\n      \"uuid\":\"cbe81761a44a5c01fe9595f99681bdb5\",\n      \"s\":4\n   }\n}\n"
                  },
                  "Missing token": {
                    "summary": "No token sent (or sent as Authorization: Bearer)",
                    "value": {
                      "error": "invalid_request",
                      "error_description": "The access token is missing"
                    }
                  },
                  "Invalid token": {
                    "summary": "Token unknown, revoked or for another app",
                    "value": {
                      "error": "invalid_token",
                      "error_description": "The access token is invalid or has expired"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "You are not authorized to access this page."
                        },
                        "code": {
                          "type": "integer",
                          "example": 401,
                          "default": 0
                        },
                        "error_type": {
                          "type": "string",
                          "example": "Exceptions::AccessDenied"
                        },
                        "uuid": {
                          "type": "string",
                          "example": "cbe81761a44a5c01fe9595f99681bdb5"
                        },
                        "s": {
                          "type": "integer",
                          "example": 4,
                          "default": 0
                        }
                      }
                    },
                    "error": {
                      "type": "string",
                      "description": "OAuth error code: `invalid_request` when no token was sent, `invalid_token` when the token is unknown, revoked or expired.",
                      "enum": [
                        "invalid_request",
                        "invalid_token"
                      ]
                    },
                    "error_description": {
                      "type": "string",
                      "description": "Human-readable reason for the error."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "javascript",
              "code": "{\n   \"review_action\": \"<review_action_name>\",\n   \"review_ids\": [<review_id_1>, <review_id_2>, <review_id_3>],\n   \"admin_email\":\"<admin email>\",\n   \"admin_display_name\":\"<admin name>\",\n   \"reason\": \"<reason>\"\n}\n"
            },
            {
              "language": "javascript",
              "code": "{\n   \"review_action\": \"publish\",\n    \"review_ids\": [1, 2, 3],\n    \"admin_email\":\"john.random@exampple.com\",\n    \"admin_display_name\":\"John Random\" \n}\n",
              "name": "Publish"
            },
            {
              "language": "javascript",
              "code": "{\n   \"review_action\": \"unpublish\",\n    \"review_ids\": [1, 2, 3],\n    \"admin_email\":\"john.random@exampple.com\",\n    \"admin_display_name\":\"John Random\",\n    \"reason\": \"False or misleading\",\n}\n",
              "name": "Unpublish"
            }
          ],
          "samples-languages": [
            "javascript"
          ]
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "X-Yotpo-Token": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Yotpo-Token",
        "description": "Send your app's access token for the merchant's store in the `X-Yotpo-Token` header of every request. To get a token, see [Generate Access Token](ref:generate-a-token). The API also reads the token from an `access_token` query parameter, but that isn't recommended: URLs end up in server and proxy logs. `Authorization: Bearer` is not supported."
      }
    }
  }
}
```

# Sibling pages

* [Introduction to Reviews](https://docs.yotpo.com/reference/introduction-to-reviews.md)
* [All Reviews](https://docs.yotpo.com/reference/all-reviews.md)
* [Product Reviews](https://docs.yotpo.com/reference/product-review.md)
* [Product Star Rating](https://docs.yotpo.com/reference/bottomline.md)
* [Review by Review ID](https://docs.yotpo.com/reference/reviews-id.md)
* [Top Reviews](https://docs.yotpo.com/reference/top-reviews.md)
* [Best Reviews](https://docs.yotpo.com/reference/best-reviews.md)
* [Best Sentences](https://docs.yotpo.com/reference/best-sentences.md)