---
title: Update webhook
slug: graph/api/update-webhook
docTags: 
createdAt: 2026-08-28T18:28:55.472Z
---

{
  "id": "CngaggPuA_e0InthMGvLS",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://cg.optimizely.com/api/webhooks/{id}",
    "servers": [
      {
        "url": "https://cg.optimizely.com/api/webhooks/{id}"
      }
    ],
    "name": "Update webhook",
    "description": "<p>Update a registered webhook with <code>id</code></p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "id",
          "type": "string",
          "description": ""
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "example": "{\"disabled\":false,\"request\":{\"url\":\"https://webhook.site/191a5568-31fe-49ac-bde5-ed2f7dad6918\",\"method\":\"POST\",\"headers\":{\"test-header-key\":\"test-header-value\"}},\"topics\":[\"doc.*\"],\"filters\":[{\"status\":{\"in\":[\"Published\",\"Created\"]}}]}",
          "description": "<p>The <code>WebhookPayload</code> type represents the payload of a webhook request, which includes information\nabout the request, filters, and whether the webhook is disabled.</p>",
          "customType": "WebhookPayload",
          "schema": [
            {
              "name": "disabled",
              "kind": "optional",
              "type": "boolean",
              "description": ""
            },
            {
              "name": "request",
              "kind": "required",
              "type": "object",
              "description": "",
              "modelRef": "#/components/schemas/Request",
              "customType": "Request",
              "schema": [
                {
                  "name": "url",
                  "kind": "required",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "method",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "headers",
                  "kind": "optional",
                  "type": "object",
                  "description": "Construct a type with a set of properties K of type T",
                  "modelRef": "#/components/schemas/Record_string.string_",
                  "customType": "Record_string.string_",
                  "schema": []
                }
              ]
            },
            {
              "name": "topics",
              "kind": "optional",
              "type": "array",
              "description": "",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "filters",
              "kind": "optional",
              "type": "object",
              "description": "",
              "complexType": "anyOf",
              "complexItems": [
                {
                  "name": "FilterMap",
                  "description": "",
                  "modelRef": "#/components/schemas/FilterMap",
                  "schema": []
                }
              ],
              "schema": []
            }
          ],
          "modelRef": "#/components/schemas/WebhookPayload",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "epi-hmac",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>HMAC authentication (<code>epi-hmac xxx</code>)</p>",
          "in": "header"
        },
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "description": "JWT token",
          "scheme": "bearer"
        },
        {
          "id": "Basic",
          "name": "Basic",
          "kind": "optional",
          "type": "http",
          "description": "HMAC credentials",
          "scheme": "basic"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "204",
        "description": "No content",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "b0nrIi78F7QzcgR7HvC04",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url https://cg.optimizely.com/api/webhooks/{id} \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"request\": {\n     \"url\": \"\"\n     },\n     \"filters\": {}\n     }'"
        },
        {
          "id": "3TK8JsDK-_JV7oX7dYiha",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"request\": {\n      \"url\": \"\"\n   },\n   \"filters\": {}\n});\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://cg.optimizely.com/api/webhooks/{id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "xJsdV2czKZUeNw0bQA8XT",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://cg.optimizely.com/api/webhooks/{id}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"request\": {\n      \"url\": \"\"\n   },\n   \"filters\": {}\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "qcrLiqTYnd-20tGLWPlyS",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://cg.optimizely.com/api/webhooks/{id}\"\n\npayload = json.dumps({\n   \"request\": {\n      \"url\": \"\"\n   },\n   \"filters\": {}\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "b0nrIi78F7QzcgR7HvC04"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-204",
          "language": "204",
          "code": "// No content\n"
        }
      ],
      "selectedLanguageId": "response-0-204"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}