Rate this page:
Webhooks provide a way to configure Bitbucket Cloud to make requests to your server (or another external service) whenever certain events occur in Bitbucket Cloud.
A webhook consists of:
There are two parts to getting a webhook to work: creating the webhook and triggering the webhook. After you create a webhook for an event, every time that event occurs, Bitbucket sends a payload request that describes the event to the specified URL. Thus, you can think of webhooks as a kind of notification system.
Use webhooks to integrate applications with Bitbucket Cloud. The following use cases provides examples of when you would want to use webhooks:
GET /2.0/hook_events
Returns the webhook resource or subject types on which webhooks can be registered.
Each resource/subject type contains an events
link that returns the
paginated list of specific events each individual subject type can
emit.
This endpoint is publicly accessible and does not require authentication or scopes.
Example:
1 2$ curl https://api.bitbucket.org/2.0/hook_events { "repository": { "links": { "events": { "href": "https://api.bitbucket.org/2.0/hook_events/repository" } } }, "workspace": { "links": { "events": { "href": "https://api.bitbucket.org/2.0/hook_events/workspace" } } } }
1 2 3 4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/hook_events' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
A mapping of resource/subject types pointing to their individual event types.
Content type | Value |
---|---|
application/json |
GET /2.0/hook_events/{subject_type}
Returns a paginated list of all valid webhook events for the specified entity. The team and user webhooks are deprecated, and you should use workspace instead. For more information, see