Vercel
API ReferenceWebhooks

Update Webhook

Updates the configuration of an existing webhook, including its name, event subscriptions, or target URL.

v2 of the v0 API is currently in beta and not yet ready for production. There may be breaking changes.
PATCH/v2/hooks/{hookId}

Usage

TypeScript Example
import { v0 } from 'v0'const result = await v0.webhooks.update({  hookId: 'wh_ghi012',})console.log(result)

API Signature

Request

Path Parameters

hookId: string

The unique identifier of the webhook to update.

Request Body

name?: string

A new display name for the webhook.

events?: ('chat.created' | 'chat.updated' | 'chat.deleted' | 'message.created' | 'message.updated' | 'message.deleted' | 'message.finished')[]

Updated list of event types to subscribe to.

url?: string

A new target URL to receive webhook payloads.

Response

id: string

A unique identifier for the webhook.

createdAt: string

The ISO timestamp representing when the chat was created.

name: string

A user-defined name to label the webhook.

events: ('chat.created' | 'chat.updated' | 'chat.deleted' | 'message.created' | 'message.updated' | 'message.deleted' | 'message.finished')[]

List of event types this webhook is subscribed to.

url: string

Target URL that receives event payloads for this webhook.

chatId: string | null

Optional ID of the chat that this webhook is scoped to.

On this page