Webhooks allow you to receive notifications of changes to your organization’s repositories in real time. A webhook target represents anDocumentation Index
Fetch the complete documentation index at: https://docs.mesa.dev/llms.txt
Use this file to discover all available pages before exploring further.
https:// URL to which Mesa will send these notifications, in the form of HTTP POST requests. Each target is scoped to your organization, can subscribe to multiple event types, and can optionally be restricted to a subset of repositories.
Create a webhook target
target.secret in your secret manager. The SDK and REST API only return it once, here on create. The dashboard always shows it on the target’s detail page, and you can also rotate to mint a new one.
Supported events
Subscribe to any combination of the following on a target:| Event | Fires when | data shape |
|---|---|---|
repo.created | A repository is created. | { repo } |
repo.updated | A repository’s name, default bookmark, or tags change. | { repo, before, after } |
repo.deleted | A repository is deleted. | { repo } |
bookmark.created | A bookmark is created (including the default bookmark on repo.created). | { bookmark } |
bookmark.deleted | A bookmark is deleted. | { bookmark } |
bookmark.moved | A bookmark is moved to a different change. | { bookmark, from } |
bookmark.merged | A bookmark is advanced via a merge. | { bookmark } |
change.created | A new change is created. | { change } |
change.evolved | An existing change advances to a new commit (rebase, content edit, message edit, etc.). | { change, previous_current_commit_oid } |
push | A git push lands one or more bookmark updates via git-receive-pack. | { source, updates, reconciliation } |
events is omitted on create, it defaults to ["push"].
Managing webhook targets requires the
admin scope. Repo-scoped tokens
can only manage targets whose repo_ids is a subset of the repos the
token has access to. They cannot create org-wide targets.List webhook targets
Paginated.limit is at most 100 and defaults to 100. Pass the previous response’s next_cursor to fetch the next page; has_more indicates whether another page is available.
Update a webhook target
PATCH uses full-replace semantics on each field you include. Omitted fields are left unchanged.
events: providing an array replaces the current list of subscribed events in full. There is no incremental add/remove.repo_ids: providing an array replaces the current repo filter. Passnullto clear the filter and make the target org-wide. Empty arrays are rejected.
Delete a webhook target
Payload shape
Every delivery shares the same envelope:push event data
updates[].action is created, updated, or deleted. before is null when the action is created; after is null when the action is deleted.
repo.* event data
before and after are only included on repo.updated. repo.created and repo.deleted carry just repo.
bookmark.* event data
from is only included on bookmark.moved. bookmark.created, bookmark.deleted, and bookmark.merged carry just bookmark.
change.* event data
previous_current_commit_oid is only included on change.evolved. change.created carries just change.
Webhook headers
Content-Type: application/jsonUser-Agent: Depot-Webhook/1.0X-Depot-Event: <event_type>X-Depot-Delivery: <delivery_id>X-Depot-Signature: t=<unix>,sha256=<hex>
Verify signatures
The signature is computed as:Rotate the signing secret
To rotate, open the webhook target’s detail page in the dashboard (Webhooks → click the target) and click Regenerate in the Signing secret section. Confirm the dialog.- Mesa starts signing every subsequent delivery with the new secret.
- Deliveries will fail signature verification at your receiver until you update it with the new value.
admin scope, same as create, update, and delete. See the note at the top of this page.
Delivery behavior
Mesa fires webhooks asynchronously, with a 10-second timeout per request. Receivers should respond fast and defer long-running work to a background queue. Anything longer than 10s is treated as a failure. There is no automatic retry. A failed delivery is logged but not redelivered. If you need at-least-once semantics, queue the work yourself the moment you receive the request. TheX-Depot-Delivery header is unique per delivery. Use it as an idempotency key on the receiver.

