# Update notification capture and retention

Source: https://docs.wabe.sh/api-reference/operations/configurenotifications/

`POST https://api.wabe.sh/v1/disks/{disk}/notifications`

## Authorization

Project API key from the Wabe Dashboard or actor runtime access token for the disk URL supplied by the broker.

## Parameters

- `disk` (path, string, required) — Project disk name, or the disk ID in the actor runtime disk URL.

## Request body

`application/json`

Example

```json
{
  "enabled": true,
  "retention": {
    "max_count": 1000
  },
  "coalesce_window_ms": 0
}
```

Schema

```json
{
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean"
    },
    "retention": {
      "type": "object",
      "properties": {
        "max_count": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1
        },
        "max_bytes": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1
        }
      },
      "required": [],
      "additionalProperties": false
    },
    "coalesce_window_ms": {
      "type": "integer",
      "minimum": 0,
      "maximum": 60000
    },
    "include_value": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

## Responses

### 200

Updated settings. A supplied retention object replaces the previous one; at least one positive limit is required while enabled.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean"
    },
    "retention": {
      "type": "object",
      "properties": {
        "max_count": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1
        },
        "max_bytes": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1
        }
      },
      "additionalProperties": false,
      "required": []
    },
    "coalesce_window_ms": {
      "type": "integer",
      "minimum": 0,
      "maximum": 60000
    },
    "include_value": {
      "type": "boolean"
    }
  },
  "required": [
    "enabled",
    "retention",
    "coalesce_window_ms",
    "include_value"
  ],
  "additionalProperties": false
}
```

### 400

Invalid settings, cursor or filters.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "code",
    "message"
  ],
  "additionalProperties": false
}
```

`text/plain`

Schema

```json
{
  "type": "string"
}
```

### 401

Missing, invalid or revoked project API key, or an invalid runtime access token.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}
```

### 403

Actor runtime token does not authorize this disk or instance generation.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}
```

### 404

Object was not found.

`text/plain`

Schema

```json
{
  "type": "string"
}
```

### 409

Conflict, nonempty destination or referenced object.

`text/plain`

Schema

```json
{
  "type": "string"
}
```

### 500

Storage failure.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "code",
    "message"
  ],
  "additionalProperties": false
}
```

`text/plain`

Schema

```json
{
  "type": "string"
}
```

### 503

Notifications closed.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "code",
    "message"
  ],
  "additionalProperties": false
}
```
