# Review routes: publish, remove, withhold

URL: /code/api/review/verbs · Id: `page:code/api/review/verbs`

> The Review Verbs publish, remove, withhold 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.publish
Publish shows a Review on the Startup’s Pages with its rating counted, whatever the rating. [Verb page](/business/nouns/review/publish?interface=api).

```text
POST /{namespace}/reviews/{review}/publish
```

Path: `review`. Emits [`Review.published`](/business/events/Review.published).

**Inputs**

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

**Returns**

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

**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 POST https://api.sb/leaseline.app/reviews/review_1XPL2xTlfx/publish \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```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.publish",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Review.remove
Remove takes a Review down for good when its author or its venue asks; the record is kept. [Verb page](/business/nouns/review/remove?interface=api).

```text
POST /{namespace}/reviews/{review}/remove
```

Path: `review`. Body, as JSON: the other inputs. Emits [`Review.removed`](/business/events/Review.removed).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `review` | [Review](/business/nouns/review) | Yes | The Review to take down. |
| `reason` | `string` | Yes | Who asked. |

**Returns**

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

**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 POST https://api.sb/leaseline.app/reviews/review_1XPL2xTlfx/remove \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"authorRequest"}'
```

```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.remove",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Review.withhold
Withhold keeps a Review off display for one of five reasons, none of them its rating or its tone. [Verb page](/business/nouns/review/withhold?interface=api).

```text
POST /{namespace}/reviews/{review}/withhold
```

Path: `review`. Body, as JSON: the other inputs. Emits [`Review.withheld`](/business/events/Review.withheld).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `review` | [Review](/business/nouns/review) | Yes | The Review to withhold. |
| `reason` | `string` | Yes | Why it is not shown. |

**Returns**

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

**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 POST https://api.sb/leaseline.app/reviews/review_1XPL2xTlfx/withhold \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"fake"}'
```

```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.withhold",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```