---
title: Update Hook
description: Updates the configuration of an existing webhook, including its name, event subscriptions, or target URL.
docs_index: /docs/llms.txt
lastUpdated: 2026-11-22
product: v0 API
type: reference
prerequisites:
  - /docs/api/v1/quickstart
---

> For an index of all documentation, see [/docs/llms.txt](/docs/llms.txt).

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

#### `PATCH /v1/hooks/{hookId}`

## Usage

```typescript
import { v0 } from 'v0-sdk'

const result = await v0.hooks.update({
  hookId: '123',
  name: 'My Updated Hook',
  events: ['chat.created', 'message.created'],
})

console.log(result)
```

```bash
curl -X PUT https://api.v0.dev/v1/hooks/123   -H "Authorization: Bearer $V0_API_KEY"   -H "Content-Type: application/json"   -d '{
    "name": "My Updated Hook",
    "events": ["chat.created", "message.created"],
    "url": "https://example.com"
  }'
```

## API Signature

### Request

#### Path Parameters

- `hookId: string` The ID of the webhook to update. Provided as a path parameter.

#### Body

- `name?: string` A new name for the hook.
- `events?: 'chat.created' | 'chat.updated' | 'chat.deleted' | 'message.created' | 'message.updated' | 'message.deleted' | 'message.finished'[]` Updated list of event types to subscribe to.
  - `item: 'chat.created' | 'chat.updated' | 'chat.deleted' | 'message.created' | 'message.updated' | 'message.deleted' | 'message.finished'`
- `url?: string` A new URL to send webhook payloads to.

### Response

- `id: string` A unique identifier for the webhook.
- `object: 'hook'` Fixed value identifying this object as a webhook.
- `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.
  - `item: 'chat.created' | 'chat.updated' | 'chat.deleted' | 'message.created' | 'message.updated' | 'message.deleted' | 'message.finished'`
- `chatId?: string` Optional ID of the chat that this webhook is scoped to.
- `url: string` Target URL that receives event payloads for this webhook.

---

For a semantic overview of all documentation, see [/docs/sitemap.md](/docs/sitemap.md)

For an index of all available documentation, see [/docs/llms.txt](/docs/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/docs/agents.md](/docs/agents.md)