---
updatedAt: 2026-10-29T10:55:14.000Z
agentTools:
  projectIndex: https://docs.yotpo.com/llms.txt
---

# Upvote or downvote reviews

Vote up or down on whether a particular review is helpful by `review_id`.

## Supporting Undo Vote Actions

Using `vote_type/up` or `vote_type/down` will increase upvotes/downvotes count by 1, per click.

To add the ability to undo votes, where clicking the up/down vote asset cancels the vote action, post to the endpoints below:

:+1:**Undo Upvote** <https://api.yotpo.com/reviews/{{review_id}}/vote/up/true>

\:-1: **Undo Downvote** <https://api.yotpo.com/reviews/{{review_id}}/vote/down/true>

<Callout icon="📘" theme="info">
  ### Note:

  The "id" in the response is an index that is incremented. It is not connected to the `review_id`.
</Callout>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Reviews API (V1)",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.yotpo.com",
      "description": "Main API server for authenticated and write operations"
    }
  ],
  "components": {
    "securitySchemes": {
      "X-Yotpo-Token": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Yotpo-Token",
        "description": "Your Yotpo account access token. See [Yotpo Authentication](ref:yotpo-authentication) to learn how to generate your token."
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid access token",
        "content": {
          "application/json": {
            "examples": {
              "Unauthorized": {
                "value": {
                  "status": {
                    "message": "You are not authorized to access this page.",
                    "code": 401,
                    "error_type": "Exceptions::AccessDenied"
                  }
                }
              }
            },
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message"
                    },
                    "code": {
                      "type": "integer",
                      "description": "HTTP status code"
                    },
                    "error_type": {
                      "type": "string",
                      "description": "Internal error class"
                    }
                  },
                  "description": "Error details."
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "X-Yotpo-Token": []
    }
  ],
  "paths": {
    "/reviews/{review_id}/vote/{vote_type}": {
      "post": {
        "summary": "Upvote or downvote reviews",
        "description": "Vote up or down on whether a particular review is helpful by `review_id`.",
        "operationId": "vote-on-reviews",
        "parameters": [
          {
            "name": "review_id",
            "in": "path",
            "description": "The unique review identifier of the review you want to vote on",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "vote_type",
            "in": "path",
            "description": "The type of vote to cast. Use `up` to upvote or `down` to downvote. Each action changes the vote count by 1.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "up",
                "down"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n \"status\": {\n   \"code\": 200,\n   \"message\": \"OK\"\n },\n \"response\": {\n   \"vote\": {\n     \"id\": 10\n   }\n }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer",
                          "example": 200,
                          "default": 0,
                          "description": "HTTP status code."
                        },
                        "message": {
                          "type": "string",
                          "example": "OK",
                          "description": "Status message, for example `OK`."
                        }
                      },
                      "description": "Request status."
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "vote": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 10,
                              "default": 0,
                              "description": "Vote ID."
                            }
                          },
                          "description": "The vote you created."
                        }
                      },
                      "description": "Response payload."
                    }
                  }
                }
              }
            },
            "headers": {
              "ratelimit-limit": {
                "description": "The maximum number of requests allowed in the current time window",
                "schema": {
                  "type": "integer"
                }
              },
              "ratelimit-remaining": {
                "description": "The number of requests remaining in the current time window",
                "schema": {
                  "type": "integer"
                }
              },
              "ratelimit-reset": {
                "description": "The time (in seconds) until the rate limit resets",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-limit-minute": {
                "description": "The maximum number of requests allowed per minute",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining-minute": {
                "description": "The number of requests remaining in the current minute",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            },
            "headers": {
              "ratelimit-limit": {
                "description": "The maximum number of requests allowed in the current time window",
                "schema": {
                  "type": "integer"
                }
              },
              "ratelimit-remaining": {
                "description": "The number of requests remaining in the current time window",
                "schema": {
                  "type": "integer"
                }
              },
              "ratelimit-reset": {
                "description": "The time (in seconds) until the rate limit resets",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-limit-minute": {
                "description": "The maximum number of requests allowed per minute",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining-minute": {
                "description": "The number of requests remaining in the current minute",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "value": "application/json",
        "key": "Content-Type"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```

# Sibling pages

* [About reviews (storefront)](https://docs.yotpo.com/reference/about-storefront-reviews.md)
* [Top Three 5-Star Reviews](https://docs.yotpo.com/reference/recent-5-star-reviews.md)
* [Retrieve the reviews payload in HTML](https://docs.yotpo.com/reference/retrieve-the-reviews-payload-in-html.md)
* [Top mentioned topics](https://docs.yotpo.com/reference/top-mentioned-topics.md)
* [Retrieve LLM schema HTML for a product](https://docs.yotpo.com/reference/retrieve-llm-schema.md)
* [Retrieve star distribution for a product](https://docs.yotpo.com/reference/storefront-star-distribution.md)