Kody usually creates the webhook automatically when you connect an Azure DevOps project. This page covers the manual setup path you take when automatic registration didn’t happen — typically on self-hosted installs or in Azure projects where Kody can’t create service hooks on your behalf.Documentation Index
Fetch the complete documentation index at: https://docs.kodus.io/llms.txt
Use this file to discover all available pages before exploring further.
Webhook URLs must reach the Webhooks service (port 3332). Using the API domain only works if your reverse proxy routes
/.../webhook paths to the Webhooks service.Azure Repos webhook URL requires a signed token
Unlike GitHub, GitLab, Bitbucket and Forgejo, Azure Repos webhook requests must include an encryptedtoken query parameter. Kodus validates this token on every incoming request and rejects calls without it with 403 Unauthorized. The token is derived from two environment variables you already configured during self-hosted setup:
CODE_MANAGEMENT_SECRET— the 32-byte encryption key (hex-encoded).CODE_MANAGEMENT_WEBHOOK_TOKEN— the plaintext the key encrypts.
<generated> value is produced by encrypting CODE_MANAGEMENT_WEBHOOK_TOKEN with CODE_MANAGEMENT_SECRET using AES-256-CBC, formatted as <ivHex>:<cipherHex>.
Kody generates this token automatically when it creates the webhook for you via the UI-driven integration flow. You only need to generate it by hand when you’re registering the webhook manually in Azure DevOps.
Generating the webhook token
Pick the option that matches your environment. Both use the env vars that your Kodus stack already has configured — you do not need to clone the repository.Option A — inside the running Kodus container (recommended)
Run this against an already-runningapi container. The env vars are already in scope:
?token=... on the webhook URL. Example:
Option B — locally with Node (no Docker)
If your Kodus stack is not running or you want to generate the token on a different machine, export the two env vars and run:Creating the webhook subscription in Azure DevOps
- Navigate to your Azure DevOps project.
- Click Project settings in the bottom-left corner.
- Under General, select Service hooks.
- Click + Create subscription.
-
Configure the webhook:
- Service: Web Hooks
- Trigger on this type of event: select one of the supported events (see below)
-
URL: your Kodus Azure Repos webhook URL with the token appended:
- Filters (optional): filter by repository or branch if needed.
- Action: send a POST request to the given URL.
- Click Finish.
git.pullrequest.created— Pull request createdgit.pullrequest.updated— Pull request updatedgit.pullrequest.merge.attempted— Pull request merge attemptedms.vss-code.git-pullrequest-comment-event— Pull request commented
Make sure the URL is reachable from Azure DevOps and accepts incoming POST requests on port 3332 (directly or through your reverse proxy).
Troubleshooting
Azure sends the webhook but Kodus returns 403
Azure sends the webhook but Kodus returns 403
The
?token= value is missing, truncated, or was generated with a different CODE_MANAGEMENT_SECRET / CODE_MANAGEMENT_WEBHOOK_TOKEN than the one the running API uses. Regenerate the token with Option A (which guarantees it’s produced with the same env vars the container is actually using) and update the subscription URL in Azure.Webhook never arrives
Webhook never arrives
Azure DevOps only retries failed deliveries a limited number of times. Check the Service hooks page — successful deliveries show a green check. If deliveries are failing with connection errors, verify the URL is reachable from the public internet and that your reverse proxy forwards
/.../webhook paths to port 3332.Works for one event but not others
Works for one event but not others
Each event type needs its own subscription in Azure DevOps. If you only created “Pull request created”, updates and comments won’t trigger reviews.