# Decide heartbeat items in bulk

Accept or reject up to 50 pending heartbeat items at once. Send {"ids": [1,2], "accept": true} - accept is never assumed - with an optional reason for a rejection. Each id is settled on its own, because accepting sends real messages and no rollback could unsend them, so the answer carries a line per id saying whether it landed and why not.

Access class: `workspace:admin`.

## Endpoint

`POST /v1/workspace/heartbeat/actions/bulk`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "accept": true,
    "ids": [
      1
    ],
    "reason": "string"
  },
  "params": {},
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "decided": 1,
    "lines": [
      {
        "action": "string",
        "id": "",
        "refused": "string",
        "state": "string"
      }
    ],
    "refused": 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"
}
```
