Skip to main content
Update a webhook target. Omitted fields are left unchanged. Required scope: admin
const target = await mesa.webhookTargets.update({
  webhookTargetId: 'wht_123',
  events: ['push', 'change.created'],
});
Clear the repository filter and make the target organization-wide:
await mesa.webhookTargets.update({
  webhookTargetId: 'wht_123',
  repo_ids: null,
});

Options

webhookTargetId
string
required
Webhook target ID.
org
string | undefined
Organization override.
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.