# Move records between groups

Moves the records named in `ids` out of the `from` group and into the `to` group in ONE transaction, both groups on this page. A record that is not in the source group is REFUSED on its own line rather than quietly added to the target — 'move' is a claim about where it was. The same group for both is refused outright. At most 100 ids.

Access class: `def:read`.

## Endpoint

`POST /v1/definitions/{key}/groups/move`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| key | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "from": "string",
    "ids": [
      "string"
    ],
    "to": "string"
  },
  "params": {
    ":key": "string"
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "changed": 1,
    "failed": 1,
    "requested": 1,
    "results": [
      {
        "changed": "string",
        "error": "string",
        "ok": "string",
        "rowId": ""
      }
    ],
    "succeeded": 1
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
