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

# Vote on answers

Vote up or down on a particular answer to a question by answer_id.

> 👍 How to use this endpoint
>
> * For example responses, click the relevant status code on the right.

> 📘 Please note:
>
> * Retrieve an `answer_id` param by utilizing the [Retrieve Questions and Answers for a Product](https://docs.yotpo.com/reference/reviews-retrieve-questions-and-answers-for-a-product) endpoint.  Your `answer_id` will appear as such.
> * The `id` in the response is an index that is incremented. It is not connected to the `review_id`.

```json Answer ID
"sorted_public_answers": [
                    {
                        "id": 15421,
```

> 📘 Before you vote
>
> * Get an `answer_id` from [Retrieve questions and answers for a product](https://docs.yotpo.com/reference/reviews-retrieve-questions-and-answers-for-a-product).
> * The `id` in the response is an incrementing vote index. It isn't the `review_id`.

# 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": {
    "/answers/{answer_id}/vote/{vote_type}": {
      "post": {
        "summary": "Vote on answers",
        "description": "Vote up or down on a particular answer to a question by answer_id. To undo a vote, add `/true` to the path, for example `/answers/{answer_id}/vote/up/true`.",
        "operationId": "vote-on-answers",
        "parameters": [
          {
            "name": "answer_id",
            "in": "path",
            "description": "The ID of the answer",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vote_type",
            "in": "path",
            "description": "Vote type - `up` or `down`",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "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\": 11\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": 11,
                              "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"
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "http",
              "code": "POST https://api.yotpo.com/answers/1234/vote/down "
            }
          ],
          "samples-languages": [
            "http"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "value": "application/json",
        "key": "Content-Type"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```

# Sibling pages

* [About Q\&A](https://docs.yotpo.com/reference/about-qa.md)
* [Retrieve Q\&A for a product](https://docs.yotpo.com/reference/reviews-retrieve-questions-and-answers-for-a-product.md)
* [Retrieve the bottom line for Q\&A](https://docs.yotpo.com/reference/reviews-retrieve-the-bottom-line-for-questions-and-answers.md)
* [Retrieve answered questions for a product](https://docs.yotpo.com/reference/retrieve-product-questions-storefront.md)
* [Create question (with confirmation email)](https://docs.yotpo.com/reference/send-question-confirmation-mail.md)