---
title: "Accept or reject tracked changes in bulk"
---

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

# Accept or reject tracked changes in bulk

Path: CloudRaker Paperwork API › Redline

`POST /v1/redline/{sessionId}/suggestions/apply`

Accepts and rejects several tracked changes in one call.

```json
{ "accept": ["tc1", "tc2"], "reject": ["tc5"] }
```

`?revision` is the session revision you read the `tc` ids at. Suggestion ids are POSITIONAL — any edit renumbers them — so passing it turns a stale id into a `409 revision_conflict` instead of a silent hit on the wrong change.

**Learn more:** [Redlining](https://docs.cloudraker.com/paperwork/developers/file-tools)

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `sessionId` (`applyRedlineSuggestions.path.sessionId`; string, required)
  - minLength 1

## Query parameters

- `revision` (`applyRedlineSuggestions.query.revision`; integer, optional)
  - min 0; max 9007199254740991

## Request body

_Required._

- `accept` (`applyRedlineSuggestions.accept`; array<string>, optional)
- `reject` (`applyRedlineSuggestions.reject`; array<string>, optional)

## Example request

```json
{
  "accept": [
    "string"
  ],
  "reject": [
    "string"
  ]
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.cloudraker.com/v1/redline/<sessionId>/suggestions/apply' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accept": [
    "string"
  ],
  "reject": [
    "string"
  ]
}
'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/v1/redline/<sessionId>/suggestions/apply';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({accept: ['string'], reject: ['string']})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/v1/redline/<sessionId>/suggestions/apply"

payload = {
    "accept": ["string"],
    "reject": ["string"]
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The new revision.

#### Example

```json
{
  "revision": -9007199254740991,
  "summary": {
    "paragraphCount": -9007199254740991,
    "comments": -9007199254740991,
    "trackedChanges": -9007199254740991
  }
}
```

- `revision` (`applyRedlineSuggestions.response.200.revision`; integer, required)
  - min -9007199254740991; max 9007199254740991
- `summary` (`applyRedlineSuggestions.response.200.summary`; object, required)
  - `paragraphCount` (`applyRedlineSuggestions.response.200.summary.paragraphCount`; integer, required)
    - min -9007199254740991; max 9007199254740991
  - `comments` (`applyRedlineSuggestions.response.200.summary.comments`; integer, required)
    - min -9007199254740991; max 9007199254740991
  - `trackedChanges` (`applyRedlineSuggestions.response.200.summary.trackedChanges`; integer, required)
    - min -9007199254740991; max 9007199254740991

### 400

Validation Error

#### Example

```json
{
  "success": false,
  "error": [
    null
  ],
  "data": null
}
```

- `success` (`applyRedlineSuggestions.response.400.success`; boolean, required)
  - one of `false`
- `error` (`applyRedlineSuggestions.response.400.error`; array<unknown>, required)
- `data` (`applyRedlineSuggestions.response.400.data`; unknown, required)

### 404

Unknown or expired session.

### 409

The ids were read at an older revision (`revision_conflict`).

### 429

Rate limited. The `/v1` API allows at least **67 requests per minute per organization** (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the `Retry-After` interval and retry — the error is `retryable`.

#### Example

```json
{
  "code": "rate_limited",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`applyRedlineSuggestions.response.429.code`; string, required)
  - one of `"rate_limited"`
- `message` (`applyRedlineSuggestions.response.429.message`; string, required)
- `retryable` (`applyRedlineSuggestions.response.429.retryable`; boolean, required)
  - one of `true`
- `requestId` (`applyRedlineSuggestions.response.429.requestId`; string, required)
- `docUrl` (`applyRedlineSuggestions.response.429.docUrl`; string, optional)


Source: https://docs.cloudraker.com/paperwork/api/redline/apply-redline-suggestions/index.md
