---
title: "Rename, change the URL/events, or enable/disable"
method: PATCH
path: "/notifications/webhooks/{webhookId}"
tags: ["Notifications"]
---

# Rename, change the URL/events, or enable/disable

`PATCH /notifications/webhooks/{webhookId}`

## Request

- Base URL: `https://hostingsurge.com/api/v1`
- URL: `https://hostingsurge.com/api/v1/notifications/webhooks/{webhookId}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-hs_session`

## Path parameters

- `webhookId` string, uuid, required

## Request body

- object
  - `name` string
  - `url` string
  - `eventTypes` string[]
  - `auditStream` boolean
  - `enabled` boolean

## Response `200`

Updated

- object
  - `id` string, uuid, required
  - `projectId` string, uuid, nullable, required: null: team-wide (every project's events plus team-wide events)
  - `name` string, required
  - `kind` 'generic' | 'slack' | 'discord', required
  - `url` string, required
  - `eventTypes` string[], required: empty: every event type
  - `auditStream` boolean, required: also receives every team audit-log entry (event type audit_log; team-wide webhooks only)
  - `enabled` boolean, required
  - `consecutiveFailures` integer, required
  - `disabledAt` string, nullable, required: ISO-8601 timestamp
  - `lastSuccessAt` string, nullable, required: ISO-8601 timestamp
  - `lastFailureAt` string, nullable, required: ISO-8601 timestamp
  - `lastError` string, nullable, required
  - `createdAt` string, required: ISO-8601 timestamp
  - `updatedAt` string, required: ISO-8601 timestamp

## Other responses

- `400`: Invalid request (code invalid_request)
- `401`: Missing or invalid session/token (code unauthorized)
- `403`: Authenticated but not permitted (code forbidden)
- `404`: Not found or not visible to the caller (code not_found)
- `429`: Too many requests (code rate_limited); see Retry-After

---

[API](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api.md) · [All operations](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/revisions/4d08337cdff1?raw)
