---
title: "Create a product review"
method: POST
path: "/products/{product_id}/reviews"
---

# Create a product review

`POST /products/{product_id}/reviews`

## Request

- Base URL: `https://api.ecommerceapi.uk/v1`
- URL: `https://api.ecommerceapi.uk/v1/products/{product_id}/reviews`
- Auth: HTTP basic

Creates a new review for a specified product.

## Path parameters

- `product_id` integer, required

## Request body

- ProductReviewCreate
  - `name` string, required: The name of the customer who added the review.
  - `content` string, required: The content of the review.
  - `rating` integer, required: The review rating (between 1 and 5).
  - `active` boolean: Indicates whether the review should be displayed.

## Response `200`

Product review created successfully.

- ProductReview
  - `id` integer: Unique identifier for the product review.
  - `createdAt` string, date-time: Timestamp when the review was created.
  - `name` string: The name of the customer who added the review.
  - `content` string: The content of the review.
  - `rating` integer: The review rating (between 1 and 5).
  - `active` boolean: Indicates whether the review is displayed.

## Other responses

- `400`: Invalid request data.
- `401`: Unauthorized. Invalid or missing API key.
- `500`: Server error.

---

[API](https://skmtc.dev/ecommerceapi/apis/product-reviews.md) - [All operations](https://skmtc.dev/ecommerceapi/apis/product-reviews/llms.txt) - [OpenAPI document](https://skmtc.dev/ecommerceapi/apis/product-reviews/revisions/e7212702d624?raw)
