# Take back a heartbeat decision

Return a refused or failed heartbeat item to the queue while the workspace's take-back window is open. An APPLIED item cannot be reverted - the message has already gone out - and a window that has closed or is set to zero answers 410. Use it as the undo behind a refusal somebody pressed by mistake.

Access class: `workspace:admin`.

## Endpoint

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

## Parameters

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

## Request body

Content type: `application/json`.

```json
{
  "body": {},
  "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"
}
```
