> ## Documentation Index
> Fetch the complete documentation index at: https://docs.platform.toloka.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# client.reviews.acceptAwaiting()

> Accept the awaiting reviews of a run.

Only teams with customer review enabled: other teams get `403 The "customerReview" feature is not enabled for this team`. Accept every review of the run, or of one generation node, that takes a decision now: `needs_review` and `returned` before their deadline. Pass `expectedCount`, the number of reviews the user confirmed: when a different number awaits a decision now, the response is 409 with the current number and nothing is accepted. The reviews are fixed at the request, so reviews that open later are not included. They are accepted in the background through the same accept as one by one: each expert is paid, each task is billed, and each item moves on to the next node. A review that is decided, rejected, or past its deadline before its turn is skipped. There is no job to poll: follow the progress in the `awaiting` list, which shrinks as the reviews are accepted. Rejects stay one by one, each with its own evidence.

## Signature

Method signature on `client.reviews`:

```ts theme={null}
acceptAwaiting(args: {
  runId: string;
  nodeId?: string;
  expectedCount: number;
}): Promise<AcceptReviewsResult>;
```

## Parameters

**runId** `string` *required*

Pipeline run ID with prefix `plr.`.

**nodeId** `string`

Only accept the reviews of this generation node.

**expectedCount** `number` *required*

How many awaiting reviews the user confirmed accepting. When a different number awaits a decision now, nothing is accepted.

## Returns

`Promise<AcceptReviewsResult>`

The awaiting reviews queued to be accepted in the background.

**count** `number` *required*

Number of reviews queued to be accepted.

## Errors

HTTP errors throw [`PotatoApiError`](https://docs.platform.toloka.ai/docs/sdk/errors). The endpoint documents these error responses:

| Status | Description |
| - | - |
| 403 | Customer review is not enabled for the team of the run, or the scoped token lacks the needed `review` permission. Deciding needs `review:write`, which every preset except `read` and `labeling-read` includes. |
| 404 | Run not found |
| 409 | A different number of reviews awaits a decision than `expectedCount`. Nothing was accepted; the message says the current number. |
| 429 | Rate limit exceeded |

HTTP endpoint: [`POST /runs/{runId}/reviews/accept`](https://docs.platform.toloka.ai/docs/api-reference/reviews/accept-pipeline-run-reviews).

```ts acceptAwaiting() theme={null}
import { createClient } from "@toloka-platform/sdk";

const client = createClient({
  baseUrl: "https://platform.toloka.ai",
  apiKey: process.env.TOLOKA_API_KEY!,
});

const acceptReviewsResult = await client.reviews.acceptAwaiting({
  runId: "plr.019a0000-0000-7000-8000-000000000001",
  expectedCount: 1
});
console.log(acceptReviewsResult);
```

```json acceptAwaiting() theme={null}
{
  "count": 1
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.