# Refuse a heartbeat action

Say no to one planned action, with an optional reason kept beside it. The item is settled rather than deleted, so the run still reads as what was proposed and what was decided. Reach for defer instead to put an item off without deciding on it. Admin only.

Access class: `workspace:admin`.

## Endpoint

`POST /v1/workspace/heartbeat/actions/{id}/refuse`

## Parameters

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

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "reason": "string"
  },
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "conversation_id": 1,
    "created_at": "string",
    "deferred_at": "string",
    "deferred_by_user_id": 1,
    "deferred_until": "string",
    "id": 1,
    "kind": "string",
    "payload": "string",
    "plan_index": 1,
    "reason": "string",
    "record_id": 1,
    "reverted_at": "string",
    "reverted_by_user_id": 1,
    "reverted_from": "string",
    "reviewed_at": "string",
    "reviewed_by_user_id": 1,
    "run_id": 1,
    "settled_at": "string",
    "state": "string"
  }
}
```

### 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"
}
```
