# Repository / Webhooks

## Handle incoming GitHub webhook events

> Processes incoming GitHub webhook events. This is the endpoint that GitHub calls when events occur in the repository.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.9.0"},"paths":{"/sfp/api/repository/webhook":{"post":{"operationId":"RepositoryWebhookController_handleWebhook","summary":"Handle incoming GitHub webhook events","description":"Processes incoming GitHub webhook events. This is the endpoint that GitHub calls when events occur in the repository.","parameters":[{"name":"x-github-event","required":true,"in":"header","schema":{"type":"string"}},{"name":"x-github-delivery","required":true,"in":"header","schema":{"type":"string"}},{"name":"x-hub-signature-256","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"The webhook event has been processed successfully"}},"tags":["Repository / Webhooks"]}}}}
```

## Handle incoming Azure DevOps webhook events

> Processes incoming Azure DevOps webhook events. Always returns 200 to prevent Azure DevOps from putting the webhook on probation.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.9.0"},"paths":{"/sfp/api/repository/webhook/azuredevops":{"post":{"operationId":"RepositoryWebhookController_handleAzureDevOpsWebhook","summary":"Handle incoming Azure DevOps webhook events","description":"Processes incoming Azure DevOps webhook events. Always returns 200 to prevent Azure DevOps from putting the webhook on probation.","parameters":[{"name":"x-vss-activityid","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"The Azure DevOps webhook event has been processed (always returns 200)"}},"tags":["Repository / Webhooks"]}}}}
```

## Generate webhook secret for Azure DevOps repository

> Generates and stores a webhook secret for an Azure DevOps repository.\
> \
> \*\*Note\*\*: Consider using POST /project/configuration/webhook with platform='azure-devops' instead, which automatically creates webhooks with the generated secret.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.9.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}}},"paths":{"/sfp/api/repository/webhook/azuredevops/secret":{"post":{"operationId":"RepositoryWebhookController_generateAzureDevOpsWebhookSecret","summary":"Generate webhook secret for Azure DevOps repository","description":"Generates and stores a webhook secret for an Azure DevOps repository.\n\n**Note**: Consider using POST /project/configuration/webhook with platform='azure-devops' instead, which automatically creates webhooks with the generated secret.","parameters":[],"responses":{"201":{"description":"The webhook secret has been generated successfully"},"403":{"description":"Forbidden - Requires role: owner"}},"tags":["Repository / Webhooks"]}}}}
```

## Get webhook secret for Azure DevOps repository

> Retrieves the webhook secret for an Azure DevOps repository.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.9.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}}},"paths":{"/sfp/api/repository/webhook/azuredevops/secret/{repositoryIdentifier}":{"get":{"operationId":"RepositoryWebhookController_getAzureDevOpsWebhookSecret","summary":"Get webhook secret for Azure DevOps repository","description":"Retrieves the webhook secret for an Azure DevOps repository.","parameters":[{"name":"repositoryIdentifier","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"The webhook secret"},"403":{"description":"Forbidden - Requires role: owner"}},"tags":["Repository / Webhooks"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flxbl.io/flxbl/sfp-server/api-reference/repository-webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
