# Add or remove people on many records

Adds the people in `add` and takes off the people in `remove`, in ONE `role`, across up to 100 records named by `ids`, in one transaction — everyone else on each record stays. Use it to put a second person on a batch of leads or deals without replacing who is already there (`post_definitions_key_rows_assignees` replaces the role with one person). Each record's person cell keeps its primary unless that person is removed, in which case it moves to whoever remains. Always 200 for a well-formed batch; a record the store refused is reported beside its id. The same account in `add` and `remove` is refused.

Access class: `def:read`.

## Endpoint

`POST /v1/definitions/{key}/rows/assignments`

## Parameters

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

## Request body

Content type: `application/json`.

```json
{
  "add": [
    "string"
  ],
  "ids": [
    "string"
  ],
  "remove": [
    "string"
  ],
  "role": "string"
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "failed": 1,
    "requested": 1,
    "results": [
      {
        "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"
}
```
