Skip to main content
Version: Next (Unreleased)

Webhook endpoints

The SDK exposes webhook endpoint management under harbor.webhooks. Delivery handling happens on your HTTP server; see Webhook delivery for payload shape and retry semantics.

create

harbor.webhooks.create({
workspaceId: 'ws_018f3a2e4b9c',
url: 'https://api.example.com/harbor/webhooks',
events: ['order.shipped', 'invoice.paid'],
});

Returns: WebhookEndpoint with id, url, events, and secret.

Required scope: webhooks:manage

Store secret immediately. Harbor shows it once at creation.

retrieve

harbor.webhooks.retrieve('wh_0193f1a2d001');

Returns: WebhookEndpoint (secret field omitted)

Required scope: webhooks:manage

list

harbor.webhooks.list({
workspaceId: 'ws_018f3a2e4b9c',
limit: 20,
});

Returns: Page<WebhookEndpoint>

Required scope: webhooks:manage

WebhookEndpoint object

FieldTypeDescription
idstringEndpoint ID (wh_ prefix)
urlstringHTTPS destination
eventsstring[]Subscribed event types
statusstringactive or disabled
createdAtstringISO 8601 timestamp

Next steps

See Webhooks guide for registration and verification. verifyWebhookSignature() params in Client.