Project / Webhook Configuration

Configure webhooks for a repository

post

Automatically registers all required webhooks for a repository. Supports both GitHub and Azure DevOps.

GitHub (platform: 'github'):

  • Repository identifier format: owner/repo (e.g., 'octocat/hello-world')

  • Creates a single webhook with events: pull_request, pull_request_review, pull_request_review_comment, issue_comment, issues, push

  • Uses GitHub App authentication (configured via integrations)

Azure DevOps (platform: 'azure-devops'):

  • Repository identifier format: org/project/repo (e.g., 'myorg/myproject/myrepo')

  • Creates Service Hook subscriptions for: git.pullrequest.created, git.pullrequest.updated, git.pullrequest.merged, ms.vss-code.git-pullrequest-comment-event, workitem.commented, git.push

  • Requires PAT with "Service Hooks: Read & Write" scope, or a stored Azure DevOps integration

Push Events & Build-on-Merge: Push events trigger the build-on-merge workflow when:

  • Push is to a configured default branch (set in project configuration)

  • Push is to a release branch matching 'release-' or 'release/' patterns

Idempotency: This endpoint is idempotent - calling it multiple times with the same URL will not create duplicate webhooks.

Secret: A webhook secret is automatically generated if one doesn't exist. The secret is only returned in the response if it was newly generated.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
platformstring · enumOptional

Platform type (defaults to github)

Default: githubExample: githubPossible values:
repositoryIdentifierstringRequired

Repository identifier. GitHub: owner/repo. Azure DevOps: org/project/repo

Example: octocat/hello-world
webhookUrlstringOptional

Base URL for webhooks (e.g., https://sfp-server.com). Defaults to DOMAIN config. The platform-specific path is appended automatically.

Example: https://sfp-server.com
patstringOptional

Personal Access Token (required for Azure DevOps if no stored integration exists)

Example: pat_xxx...
Responses
post
/sfp/api/project/configuration/webhook

List configured webhooks for a repository

get

Retrieves all webhooks configured for the specified repository from the platform (GitHub or Azure DevOps).

GitHub: Returns webhooks from GitHub API Azure DevOps: Returns Service Hook subscriptions from Azure DevOps API

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
platformstring · enumRequired

Platform type

Possible values:
repositoryIdentifierstringRequired

Repository identifier

Query parameters
patstringOptional

PAT for Azure DevOps (if no stored integration)

Responses
chevron-right
200

List of webhooks for the repository

No content

get
/sfp/api/project/configuration/webhook/{platform}/{repositoryIdentifier}

No content

Delete a specific webhook

delete

Deletes a specific webhook from the platform (GitHub or Azure DevOps).

GitHub: Deletes the webhook by ID Azure DevOps: Deletes the Service Hook subscription by ID

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
platformstring · enumRequired

Platform type

Possible values:
repositoryIdentifierstringRequired

Repository identifier

webhookIdstringRequired

Webhook/subscription ID to delete

Query parameters
patstringOptional

PAT for Azure DevOps (if no stored integration)

Responses
delete
/sfp/api/project/configuration/webhook/{platform}/{repositoryIdentifier}/{webhookId}

No content

Last updated