Skip to Content

Webhooks

Webhooks are available on the Enterprise plan.

What is a Webhook?

A webhook in Git is a mechanism that allows a Git repository to notify external systems about events that occur within the repository. Think of it as an automated messenger that sends real-time updates when specific actions happen in your repository.

A Git webhook is:

  • Event-driven notification: A way for Git repositories to send HTTP POST requests to a specified URL when certain events occur
  • Automation trigger: A method to automatically initiate actions in external systems based on Git activities
  • Integration mechanism: A bridge between your Git repository and other tools or services

Common Use Cases

Git webhooks enable numerous automation scenarios:

  • Continuous Integration/Deployment: Triggering builds and deployments when code changes
  • Issue tracking integration: Updating tickets when commits reference issues
  • Chat notifications: Sending events to a service of yours that posts alerts to Slack/Teams/Discord
  • Documentation updates: Automatically regenerating documentation after changes
  • Custom automations: Initiating specific workflows unique to your development process
  • Monitoring and analytics: Tracking repository activity in external systems

Creating and Managing Webhooks

APIGit supports configuring multiple webhooks to report repository events to external systems. To configure webhooks:

  1. Navigate to your API repository
  2. Select the Settings tab
  3. Go to Webhooks
  4. View existing webhooks under Webhook Endpoints or create new ones

Webhook Settings page with two webhook endpoints

Use the actions of a webhook to edit or delete it.

Adding a New Webhook

To create a new webhook, click the Add WebHook button in the upper left corner. You’ll need to provide:

  • Remote Url: The endpoint that will receive the webhook events
  • Content type: application/json or application/x-www-form-urlencoded
  • Branch Filter: A glob pattern that limits push, branch creation and branch deletion events to matching branches, such as main or {main,release*}. Leave it as * for all branches
  • Authorization Header: Sent with each request when present, for example Bearer token123456. There is no separate signing secret, so use this header to authenticate requests
  • Active: Untick it to pause the webhook
  • When should this webhook be triggered?: Which events should trigger the webhook

Add WebHook dialog with the URL, content type, branch filter, authorization header and event options

Customizing Event Triggers

APIGit provides granular control over which events will trigger your webhook. Choose Just the push event, I need everything, or custom events to select specific events based on your integration needs.

Add WebHook dialog with custom events selected, showing the Repository Events group

GroupEventFires when
Repository EventsCreateBranch or tag created
Repository EventsDeleteBranch or tag deleted
Repository EventsForkRepository forked
Repository EventsPushGit push to a repository
Repository EventsRepositoryRepository created or deleted
Issue EventsIssuesIssue opened, closed, reopened, or edited
Issue EventsIssue AssignedIssue assigned or unassigned
Issue EventsIssue LabeledIssue labels updated or cleared
Issue EventsIssue MilestonedIssue milestoned or demilestoned
Issue EventsIssue CommentIssue comment created, edited, or deleted
Pull Request EventsPull RequestPull request opened, closed, reopened, or edited
Pull Request EventsPull Request AssignedPull request assigned or unassigned
Pull Request EventsPull Request LabeledPull request labels updated or cleared
Pull Request EventsPull Request MilestonedPull request milestoned or demilestoned
Pull Request EventsPull Request CommentPull request comment created, edited, or deleted
Pull Request EventsPull Request ReviewedPull request approved, rejected, or review comment
Pull Request EventsPull Request SynchronizedPull request synchronized
Pull Request EventsPull Request Review RequestedPull request review requested or review request removed

Once configured, your webhooks will automatically notify your external systems whenever the selected events occur in your repository, enabling seamless integration with your broader development ecosystem.

Last updated on