> ## 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

<ParamField path="webhookTargetId" type="string" required>
  Webhook target ID.
</ParamField>

<ParamField path="org" type="string | undefined">
  Organization override.
</ParamField>

<ParamField path="url" type="string | undefined">
  New delivery URL.
</ParamField>

<ParamField path="name" type="string | null | undefined">
  New human-readable name. Pass `null` to clear it.
</ParamField>

<ParamField path="events" type="string[] | undefined">
  Replacement event subscription list.
</ParamField>

<ParamField path="repo_ids" type="string[] | null | undefined">
  Replacement repository filter. Pass `null` to clear the filter and receive organization-wide events.
</ParamField>

## Response

<ResponseField name="id" type="string">
  Webhook target ID.
</ResponseField>

<ResponseField name="name" type="string | null">
  Webhook target name, or null when unnamed.
</ResponseField>

<ResponseField name="url" type="string">
  Delivery URL.
</ResponseField>

<ResponseField name="events" type="string[]">
  Event names delivered to this target.
</ResponseField>

<ResponseField name="repo_ids" type="string[] | null">
  Repository allowlist, or null when the target receives events for all repositories.
</ResponseField>

<ResponseField name="created_at" type="string">
  Creation time.
</ResponseField>

<ResponseField name="updated_at" type="string">
  Last update time.
</ResponseField>
