> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mesa.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# webhookTargets.update()

> Update a webhook delivery target.

Update a webhook target. Omitted fields are left unchanged.

**Required scope: `admin`**

```ts theme={null}
const target = await mesa.webhookTargets.update({
  webhookTargetId: 'wht_123',
  events: ['push', 'change.created'],
});
```

Clear the repository filter and make the target organization-wide:

```ts theme={null}
await mesa.webhookTargets.update({
  webhookTargetId: 'wht_123',
  repo_ids: null,
});
```

## Options

**webhookTargetId** `string` *required*

Webhook target ID.

**url** `string | undefined`

New delivery URL.

**name** `string | null | undefined`

New human-readable name. Pass `null` to clear it.

**events** `string[] | undefined`

Replacement event subscription list.

**repo\_ids** `string[] | null | undefined`

Replacement repository filter. Pass `null` to clear the filter and receive organization-wide events.

## Response

**id** `string`

Webhook target ID.

**name** `string | null`

Webhook target name, or null when unnamed.

**url** `string`

Delivery URL.

**events** `string[]`

Event names delivered to this target.

**repo\_ids** `string[] | null`

Repository allowlist, or null when the target receives events for all repositories.

**created\_at** `string`

Creation time.

**updated\_at** `string`

Last update time.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.