# Apply a heartbeat action

Say yes to one planned action and let it happen — today that means sending the follow-up it drafted on its conversation. 409 when the action is no longer in the planned state, or is a kind with nothing to apply. If the thread's contact changed between drafting and approval the approval becomes a REFUSAL carrying that reason rather than a message to the wrong person. Admin only.

Access class: `workspace:admin`.

## Endpoint

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

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