# Review routes: update

URL: /code/api/review/records-update · Id: `page:code/api/review/records-update`

> The Review Verbs update as api.sb routes, with inputs, result, refusals and an example.

Reference for [Review](/business/nouns/review), one group of [Review routes](/code/api/review).

### Review.update
Changes the given properties of a Review. [Verb page](/business/nouns/review/update?interface=api).

```text
PATCH /{namespace}/reviews/{id}
```

Path: `id`. Body, as JSON: the other inputs. Emits `Review.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Review. |
| `rating` | `integer` | No | The score, from 1 to 5. |
| `body` | `text` | No | The reviewer’s words. |
| `venue` | `string` | No | The venue it was posted on, by id; empty for the Startup’s own Site. |
| `displayConsent` | `boolean` | No | True once the reviewer agreed it may be shown on the Startup’s own Pages. Never randomized. |
| `customer` | [Customer](/business/nouns/customer) | No | The Customer who wrote it, when known. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `review` | [Review](/business/nouns/review) | Yes | The Review. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
curl -X PATCH https://api.sb/leaseline.app/reviews/review_1XPL2xTlfx \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rating":1}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "review": {
    "$id": "https://api.sb/leaseline.app/reviews/review_1XPL2xTlfx",
    "$type": "Review",
    "rating": 1,
    "status": "submitted"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Review.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```