Webhook

On This Page

    Webhooks notify your app when certain events happen in Bitbucket. When an event you have subscribed to occurs, Bitbucket will make a POST request containing JSON data relating to the event to the URL you specified.

    To receive webhook events, your app should include the webhook module declaration in its JSON descriptor. The declaration indicates the relative URL of the local resource where it will receive the notification. Bitbucket sends an HTTP POST to this resource in response to an event. Within your app, the code that handles the POST should process any information passed in the body of the message. Each webhook POST sent to your app will also include the authentication headers that allow your app to authenticate that request. Specifically, the JWT token can be found in the Authorization HTTP header.

    Note that some proxies will strip out the Authorization header by default (e.g. Apache and mod_wsgi) so extra configuration may be required to ensure the Authentication header is visible.

    Properties

    event
    Type
    string
    Max length
    64
    Required
    Yes
    Allowed values
    • issue:comment_created
    • issue:created
    • issue:updated
    • project:updated
    • pullrequest:approved
    • pullrequest:comment_created
    • pullrequest:comment_deleted
    • pullrequest:created
    • pullrequest:fulfilled
    • pullrequest:rejected
    • pullrequest:superseded
    • pullrequest:unapproved
    • pullrequest:updated
    • pullrequest:changes_request_created
    • pullrequest:changes_request_removed
    • repo:branch_created
    • repo:branch_deleted
    • repo:commit_comment_created
    • repo:commit_status_created
    • repo:commit_status_updated
    • repo:created
    • repo:deleted
    • repo:fork
    • repo:imported
    • repo:push
    • repo:transfer
    • repo:updated
    • user:account_property_changed
    Description

    The event identifier


    url
    Type
    string
    Max length
    2048
    Format
    uri-template
    Required
    Yes

    params
    Type
    object

    Rate this page: