---
type: api
title: Acknowledge a watch
description: **All methods and paths for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/operation/operation-watcher-ack-watch
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/operation/operation-watcher-ack-watch
products:
  - Elasticsearch
---

# Acknowledge a watch


Availability:

## Paths

- `POST` (also `PUT`) `/_watcher/watch/{watch_id}/_ack/{action_id}`
- `POST` (also `PUT`) `/_watcher/watch/{watch_id}/_ack`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/authentication#bearerauth)

#### Path Parameters

- `watch_id` (string Name)
  The watch identifier.
- `action_id` (union Name | [] Name) — optional, leave it out to use `/_watcher/watch/{watch_id}/_ack`
  A comma-separated list of the action identifiers to acknowledge.
If you omit this parameter, all of the actions of the watch are acknowledged.

## Description

Acknowledging a watch enables you to manually throttle the execution of the watch's actions.

The acknowledgement state of an action is stored in the `status.actions.<id>.ack.state` structure.

IMPORTANT: If the specified watch is currently being executed, this API will return an error
The reason for this behavior is to prevent overwriting the watch status from a watch execution.

Acknowledging an action throttles further executions of that action until its `ack.state` is reset to `awaits_successful_execution`.
This happens when the condition of the watch is not met (the condition evaluates to false).
To demonstrate how throttling works in practice and how it can be configured for individual actions within a watch, refer to External documentation.

## Required authorization

* Cluster privileges: `manage_watcher`

[Learn more about actions](https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/actions#example)

## Response

`application/json`

- `status` ({} WatchStatus)
  - `actions` (Actions)
  - `last_checked` (DateTime)
  - `last_met_condition` (DateTime)
  - `state` ({} ActivationState)
    - `active` (boolean)
    - `timestamp` (DateTime)
  - `version` (number VersionNumber)
  - `execution_state` (string)
## Code Examples

#### Console

```console
POST _watcher/watch/my_watch/_ack
```

#### JavaScript

```javascript
const response = await client.watcher.ackWatch({
  watch_id: "my_watch",
});
```

#### Python

```python
resp = client.watcher.ack_watch(
    watch_id="my_watch",
)
```

#### curl

```curl
curl -X POST "$ELASTICSEARCH_URL/_watcher/watch/my_watch/_ack" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.watcher().ackWatch(a -> a
    .watchId("my_watch")
);
```

#### PHP

```php
$resp = $client->watcher()->ackWatch([
    "watch_id" => "my_watch",
]);
```

#### Ruby

```ruby
response = client.watcher.ack_watch(
  watch_id: "my_watch"
)
```

## Response Examples

#### Watcher ack watch response example1

A successful response from `POST _watcher/watch/my_watch/_ack`.

```json
{
  "status": {
    "state": {
      "active": true,
      "timestamp": "2015-05-26T18:04:27.723Z"
    },
    "last_checked": "2015-05-26T18:04:27.753Z",
    "last_met_condition": "2015-05-26T18:04:27.763Z",
    "actions": {
      "test_index": {
        "ack" : {
          "timestamp": "2015-05-26T18:04:27.713Z",
          "state": "acked"
        },
        "last_execution" : {
          "timestamp": "2015-05-25T18:04:27.733Z",
          "successful": true
        },
        "last_successful_execution" : {
          "timestamp": "2015-05-25T18:04:27.773Z",
          "successful": true
        }
      }
    },
    "execution_state": "executed",
    "version": 2
  }
}
```

