---
updatedAt: 2026-11-11T07:32:40.000Z
agentTools:
  projectIndex: https://docs.yotpo.com/llms.txt
---

# Create an answer to a question

Create a public or private Answer to a specific Question per `question_id`.

> 👍 How to use this endpoint
>
> * To see example requests, click **Examples** in the payload on the right.
> * For example responses, click the relevant status code on the right.
> * Retrieve the `question_id` parameter from [Retrieve All Questions](https://docs.yotpo.com/reference/retrieve-all-questions)

# 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": {
    "/questions/{question_id}/answers": {
      "post": {
        "summary": "Create an answer to a question",
        "description": "Create a public or private Answer to a specific Question per `question_id`.",
        "operationId": "create-answer-for-question",
        "parameters": [
          {
            "name": "question_id",
            "in": "path",
            "description": "Retrieve this parameter from [Retrieve All Questions](ref:retrieve-all-questions)",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "answer"
                ],
                "properties": {
                  "answer": {
                    "type": "object",
                    "description": "The contents of your answer to a question",
                    "required": [
                      "content"
                    ],
                    "properties": {
                      "content": {
                        "type": "string",
                        "description": "The content of the answer"
                      },
                      "public": {
                        "type": "boolean",
                        "description": "Choose whether the answer will be show on-site or only send an email to the customer. Public answer=true. Private answer=false"
                      }
                    }
                  }
                }
              },
              "examples": {
                "Public Answer": {
                  "value": {
                    "answer": {
                      "content": "This is a public answer to a question",
                      "public": true
                    }
                  }
                },
                "Private Answer ": {
                  "value": {
                    "answer": {
                      "content": "This is my private answer to your question",
                      "public": false
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": {\n    \"code\": 200,\n    \"message\": \"OK\"\n  },\n  \"response\": {\n    \"comment\": {\n      \"id\": 19,\n      \"commentable_id\": 14,\n      \"commentable_type\": \"Question\",\n      \"content\": \"This is a public answer to a question\",\n      \"votes_up\": 0,\n      \"votes_down\": 0,\n      \"public\": true,\n      \"approved\": true,\n      \"created_at\": \"2017-03-14T13:46:08Z\",\n      \"store_owner_comment\": true,\n      \"answerer\": {\n        \"id\": 10,\n        \"display_name\": \"John Doe\",\n        \"slug\": \"john-doe\",\n        \"social_image\": null,\n        \"is_social_connected\": false,\n        \"bio\": null,\n        \"score\": 0,\n        \"badges\": []\n      }\n    }\n  }\n}"
                  }
                }
              }
            },
            "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": {
    "headers": [
      {
        "value": "application/json",
        "key": "Content-Type"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```