---
title: Update webhook
slug: webhook-api/update-webhook
docTags: 
createdAt: 2024-06-10T16:49:31.068Z
---

{
  "id": "u34i60vgBjzvqZTkc2ZcW",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://api.catenda.com/v2/projects/{project-id}/webhooks/user/{webhook-id}",
    "servers": [
      {
        "url": "https://api.catenda.com/v2/projects/{project-id}/webhooks/user/{webhook-id}"
      }
    ],
    "name": "Update webhook",
    "description": "Update a webhook subscription.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "project-id",
          "type": "string",
          "example": "af2d8af0fa54465b89bf26dd3d92cfd0",
          "description": "Catenda project id"
        },
        {
          "kind": "required",
          "name": "webhook-id",
          "type": "string",
          "description": "Id of the webhook"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "event",
              "kind": "optional",
              "type": "string<issue.created | issue.deleted | issue.modified | issue.status.changed | library.document.revision.published | model.created | revision.created>",
              "description": "The event that triggers the callback URL.\n\nValid values are: \n  - issue.created\n  - issue.deleted\n  - issue.modified\n  - issue.status.changed\n  - library.document.revision.published\n  - model.created\n  - revision.created\n",
              "example": "issue.created"
            },
            {
              "name": "state",
              "kind": "optional",
              "type": "string<ENABLED | DISABLED_BY_USER>",
              "description": "The state of the Webhook.\n\nValid values are:\n  - ENABLED\n  - DISABLED_BY_USER\n",
              "example": "ENABLED"
            },
            {
              "name": "target_url",
              "kind": "optional",
              "type": "string",
              "description": "The URL to be called when the event occurs",
              "example": "https://hooks.zapier.com/hooks/catch/1028857/a8w0or/"
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "label",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "description": "Id of the label",
                "example": "397t0ccc8f74619096c738de15dc6512"
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "description": "Name of the label",
                "example": "Label 1"
              },
              {
                "name": "color",
                "kind": "optional",
                "type": "string",
                "description": "Valid RGB hexadecimal color of the label",
                "example": "#6aa84f"
              },
              {
                "name": "group",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/label-group",
                "customType": "label-group",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the label group",
                    "example": "357t0ccc8f74719096c734de18fc6512"
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "description": "Name of the label group",
                    "example": "Group name"
                  }
                ]
              },
              {
                "name": "deleted",
                "kind": "optional",
                "type": "boolean",
                "description": "Soft deletion state of the label",
                "example": false
              }
            ],
            "modelRef": "#/components/schemas/label",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "iSFXvrkrRPFqQA43HFGmZ",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url https://api.catenda.com/v2/projects/{project-id}/webhooks/user/{webhook-id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "5Fx027S9gLuC6hRtqDo4H",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.catenda.com/v2/projects/{project-id}/webhooks/user/{webhook-id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "e441EUWLoBmZLmYw4-qjm",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.catenda.com/v2/projects/{project-id}/webhooks/user/{webhook-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\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "VDa5KLCaXFBRaK2sbR4aQ",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.catenda.com/v2/projects/{project-id}/webhooks/user/{webhook-id}\"\n\npayload = {}\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": "iSFXvrkrRPFqQA43HFGmZ"
    },
    "results": {
      "languages": [
        {
          "id": "qAZRX6JQB3qRi50q2iB0G",
          "language": "200",
          "code": "// OK\n{\n  \"id\": \"397t0ccc8f74619096c738de15dc6512\",\n  \"name\": \"Label 1\",\n  \"color\": \"#6aa84f\",\n  \"group\": {\n    \"id\": \"357t0ccc8f74719096c734de18fc6512\",\n    \"name\": \"Group name\"\n  },\n  \"deleted\": false\n}"
        }
      ],
      "selectedLanguageId": "qAZRX6JQB3qRi50q2iB0G"
    }
  },
  "children": [
    {
      "id": "DGLAHqb8SHjQcTKtyc_PM",
      "type": "paragraph",
      "children": [
        {
          "text": "Update a webhook subscription."
        }
      ]
    }
  ]
}