# Configure a Webhook in Visual Studio GIT

{% hint style="info" %}
After the 25.3.9 release, the structure of the webhook payload URL was updated. Customers need to update the webhook URL in the repository settings of their remote repo. Some customers are still using the old webhook URL containing **autorabitrest**, which should now be replaced with api.

Example:

Old URL: [https://na25.autorabit.com/**autorabitrest/**&#x77;ebhook/triggerSCMPushrequest](https://na25.autorabit.com/autorabitrest/webhook/triggerSCMPushrequest)

Updated URL: [https://na25.autorabit.com/**api**/webhook/triggerSCMPushrequest](https://na25.autorabit.com/api/webhook/triggerSCMPushrequest)

Unless you update the Payload URL, you might face pull request/trigger build-on-commit jobs triggering.
{% endhint %}

## A. Create a Webhook API Token from ARM

1. Log in to ARM.
2. Navigate to **Admin Section > API Token**.
3. Click **Create API Token**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F1Bnu4DN0pBvbTME42qsn%2Fimage.png?alt=media&#x26;token=bfb8d20b-5df9-4877-9ea4-048d4cf77aec" alt="API Token creation screen in ARM"><figcaption></figcaption></figure>

4. Enter a **Token Name**.
5. Select **Type** as **webhook**.
6. (Optional) Enter a **Description**.
7. Click **Create Option**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FZqu5uZttuBREy054vwEG%2Fimage.png?alt=media&#x26;token=8e07ceb9-23ec-469d-a9d5-9d15add9ecdc" alt="Webhook API token details input screen in ARM"><figcaption></figcaption></figure>

8. Your webhook API token is now created.

***

## B. Create a Webhook with Authentication in Visual Studio Git

1. Log in to your Microsoft Visual Studio Git account.
2. Navigate to the project’s **Service Hooks** page:

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FwFxZOPVqdL6BGRl05Y1x%2Fimage.png?alt=media&#x26;token=7eff31c6-beb8-4e49-bed0-a5d41d2bb0d2" alt="Service Hooks settings page in Visual Studio Git"><figcaption></figcaption></figure>

3. Click **Create Subscription**.
4. The wizard will display a list of available services for integration.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FQvrvxOdZiyLMl6K5baE0%2Fimage.png?alt=media&#x26;token=7a36c479-a232-430c-8cb3-de67db1f16c9" alt="Integration service selection wizard in Visual Studio Git" width="563"><figcaption></figcaption></figure>

5. Click **Next** to select an event trigger and optionally configure filters.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fd617QVCUBd9tP6Ki24GR%2Fimage.png?alt=media&#x26;token=919599ce-7194-4a7e-92e1-9ab62e1e2932" alt="Trigger events configuration screen"><figcaption></figcaption></figure>

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FVpxKCOKM0Rr3u7xXfjT1%2Fimage.png?alt=media&#x26;token=ccd74363-6acf-4bf9-aa07-61602cde7cd1" alt="Additional filters screen for webhook trigger events"><figcaption></figcaption></figure>

6. Enter the **Payload URL** to which webhook POST requests will be sent. Use the format:

Example:\
<https://login.autorabit.com/api/webhook/v2/autorabit.com/trigger-scm-push-request>

7. Configure **Basic Authentication**:

* **Username:** Your ARM login username
* **Password:** Webhook API Token generated from ARM

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FGedMGpLyKKjXLsKPKUMH%2Fimage.png?alt=media&#x26;token=d0527736-9b08-4948-97cf-17317387f3ea" alt="Basic authentication fields in webhook configuration screen"><figcaption></figcaption></figure>

8. Re-enter your AutoRABIT username and webhook token to complete authentication.

{% hint style="info" %}
**Note:** For events like *Pull Request Created* or *Pull Request Updated*, use the same URL and credentials.
{% endhint %}

9. Review the configuration, test the subscription, and complete the setup.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FEZICKTd6NQOj2Vf8dgQY%2Fimage.png?alt=media&#x26;token=c50cf7be-c28e-4256-bf6d-7396f5a466e1" alt="Test and confirm webhook subscription setup" width="563"><figcaption></figcaption></figure>

10. Click **Finish**. The webhook will now appear in the **Service Hooks** tab.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FpBEWdk35Cx3rjKyMQpg4%2Fimage.png?alt=media&#x26;token=827044cc-b124-4f26-924b-6d4d5111778c" alt="Service Hooks tab showing configured webhook in Visual Studio Git"><figcaption></figcaption></figure>

11. Once triggered, verify webhook success from the service hook tab. You can also view webhook history to see trigger count and outcomes.

***

## Smart Commits

Use custom commit message patterns to link commits to ALM stories.\
Example:

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FFGuE7QhtQdyqywlmeqqf%2Fimage.png?alt=media&#x26;token=d14e12e0-b8a9-401c-82ab-d921d8558dc8" alt="Smart commit configuration in Visual Studio Git" width="563"><figcaption></figcaption></figure>

To reveal the webhook configuration URL:

* Enable the **auto update on webhook** checkbox.

For additional help, refer to:

* [Webhook Setup Guide](file://product-guides/arm/arm-features/webhooks)
* [Sync External Smart Commits](file://product-guides/arm/arm-features/version-control/introduction-to-version-control/version-control-repositories-summary)

***

## For Enterprise Customers

Use these endpoints for enterprise configuration: /api/webhook/v2//enterprise/trigger-scm-push-request /api/webhook/v2//enterprise/sync-alm-commits
