Update a webhook subscription
/api/v1/webhooks/{id}Authentication
- Bearer Token
AuthorizationJWT access token
- API Key
X-API-KeyAPI key for management-tier access
Path Parameters
| Name | Required | Type | Description |
|---|---|---|---|
id | string |
Request body
urlstringevent_typesstring[]descriptionstringis_activeboolean
Code samples
curl -X PATCH "https://api.canopy.dev/api/v1/webhooks/value" \
-H "X-API-Key: $CANOPY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "string",
"event_types": [
"string"
],
"description": "string",
"is_active": false
}'const response = await fetch("https://api.canopy.dev/api/v1/webhooks/value", {
method: "PATCH",
headers: {
"X-API-Key": "$CANOPY_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"url": "string",
"event_types": [
"string"
],
"description": "string",
"is_active": false
}),
});
const data = await response.json();import requests
response = requests.patch(
"https://api.canopy.dev/api/v1/webhooks/value",
headers={
"X-API-Key": "$CANOPY_API_KEY",
"Content-Type": "application/json"
},
json={
"url": "string",
"event_types": [
"string",
],
"description": "string",
"is_active": False,
},
)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
payload := map[string]interface{}{
"url": "string",
"event_types": []interface{}{
"string",
},
"description": "string",
"is_active": false,
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("PATCH", "https://api.canopy.dev/api/v1/webhooks/value", bytes.NewBuffer(body))
req.Header.Set("X-API-Key", "$CANOPY_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
200 Webhook subscription updated
{
"id": "string",
"url": "string",
"event_types": [
"string"
],
"description": "string",
"is_active": false,
"created_at": "2026-04-20T12:00:00.000Z"
}application/json
id *stringurl *stringevent_types *string[]descriptionstringis_active *booleancreated_at *string (date-time)
401 Invalid or expired token
403 This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)
404 Webhook subscription not found