Skip to main content

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.

Create a webhook target. The response includes the signing secret once.
target = await mesa.webhook_targets.create(
    url="https://example.com/mesa/webhook",
    name="production-webhook",
    events=["push", "change.created"],
    repo_ids=["repo_123"],
)

print(target.id)
print(target.secret)  # store immediately

Options

url
str
required
HTTPS URL that receives webhook deliveries.
org
str | None
Organization override.
name
str | None
Human-readable target name.
events
list[str] | None
Event types to subscribe to. Defaults to ['push'] when omitted.
repo_ids
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_run.enqueued, sync_run.started, sync_run.completed, and sync_run.failed.

Response

id
str
Webhook target ID.
name
str | None
Webhook target name.
url
str
Delivery URL.
events
list[str]
Subscribed events.
repo_ids
list[str] | None
Repository filter, or None for organization-wide delivery.
secret
str
Signing secret. Store it immediately because list and update responses do not include it.

Required scope

admin