Skip to main content
Create a webhook target. The response includes the signing secret once. Required scope: admin

Options

str
required
HTTPS URL that receives webhook deliveries.
str | None
Organization override.
str | None
Human-readable target name.
list[str] | None
Event types to subscribe to. Defaults to ['push'] when omitted.
list[str] | None
Restrict deliveries to specific repository IDs. Omit to receive events for all repositories in the organization.

Event names

Supported event names include repo.created, repo.updated, repo.deleted, bookmark.created, bookmark.deleted, bookmark.moved, bookmark.merged, change.created, change.evolved, push, sync.queued, sync.in_progress, sync.completed, and sync.failed.

Response

str
Webhook target ID.
str | None
Webhook target name, or null when unnamed.
str
Delivery URL.
list[str]
Event names delivered to this target.
list[str] | None
Repository allowlist, or null when the target receives events for all repositories.
datetime
Creation time.
datetime
Last update time.
str
Webhook signing secret. Store it immediately; it is shown only once.