# Update a Reply webhook's endpoint, preset, headers, events, or enabled state

PATCH /api/agent/webhooks/{id}. Required scopes: services:write.

HTML: https://notify.belweave.ai/docs/api/patchWebhooksId

Required scopes: `services:write`

```http
PATCH /api/agent/webhooks/{id}
Authorization: Bearer ntf_your_token
```

## Operation schema

```json
{
  "summary": "Update a Reply webhook's endpoint, preset, headers, events, or enabled state",
  "operationId": "patchWebhooksId",
  "security": [
    {
      "bearer": [
        "services:write"
      ]
    }
  ],
  "x-notify-scopes": [
    "services:write"
  ],
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "schema": {
        "type": "string"
      },
      "required": true
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "url": {
              "type": "string",
              "maxLength": 2048,
              "format": "uri"
            },
            "preset": {
              "type": "string",
              "enum": [
                "generic",
                "grok",
                "slack"
              ]
            },
            "headers": {
              "maxItems": 16,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
                  },
                  "value": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  }
                },
                "required": [
                  "name",
                  "value"
                ]
              }
            },
            "events": {
              "minItems": 1,
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "interaction.answered",
                  "interaction.expired",
                  "interaction.canceled"
                ]
              }
            },
            "enabled": {
              "type": "boolean"
            },
            "isDefault": {
              "type": "boolean"
            }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "webhook": {
                "$ref": "#/components/schemas/ReplyWebhook"
              }
            },
            "required": [
              "webhook"
            ]
          }
        }
      }
    },
    "400": {
      "description": "Invalid request",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Missing, unknown, revoked, or expired token",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "The token lacks a required scope or the account lacks permission",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Not found for this account",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}
```

Resolve schema references against [OpenAPI](https://notify.belweave.ai/openapi.json).
