---
title: "Apply edit commands"
description: "Applies a batch of commands and saves a new version. The batch applies whole or not at all. A bad command changes nothing and answers 422 with what to send instead. Free."
url: https://docs.roasos.com/api-reference/edits/changeEdit
---

# Apply edit commands

Applies a batch of commands and saves a new version. The batch applies whole or not at all. A bad command changes nothing and answers 422 with what to send instead. Free.

## `POST /v1/edits/{id}/commands`

Endpoint: `POST https://api.roasos.com/v1/edits/{id}/commands`

Apply edit commands

Applies a batch of commands and saves a new version. The batch applies whole or not at all. A bad command changes nothing and answers 422 with what to send instead. Free.

### Parameters

- `id` (path) — required

### Request body

Content type: `application/json`

### Responses

- `200`: The new version
- `404`: Not found
- `409`: The edit changed since expected_version. Nothing was changed.
- `422`: A command is not valid. The message says what to send. Nothing was changed.

Read the full reference at https://docs.roasos.com/api-reference/edits/changeEdit.
