# Configure a Webhook in GitLab

{% 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/v2/\<OrgName>/trigger-scm-push-request](https://na25.autorabit.com/api/webhook/v2/%3COrgName%3E/trigger-scm-push-request)

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 > 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%2FF3dKzOJS9phKygGrZYhQ%2Fimage.png?alt=media&#x26;token=42cb58f0-4235-4f35-81a4-c7ae7c2d9454" alt=""><figcaption></figcaption></figure>

4. Enter a **Token Name**.
5. Select **Type** as **webhook**.
6. (Optional) Add 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%2F8CateExgWyBS23GRFKhi%2Fimage.png?alt=media&#x26;token=077a36f9-3bf6-4421-be3a-77c0d69eb7c8" alt=""><figcaption></figcaption></figure>

8. Your API token is now created.

## B. Create a Webhook with Authentication on GitLab

1. Log in to your GitLab account and select the target repository.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FqxYLU8Sshidj4JuW5grl%2Fimage.png?alt=media&#x26;token=c1d7086f-8456-4c11-99a0-6db9278c1735" alt=""><figcaption></figcaption></figure>

2. Go to **Settings > Integrations**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FSxm8VISw6vtUFzRxzOMo%2Fimage.png?alt=media&#x26;token=7eb47e81-a742-4213-bfcc-fae60447b64a" alt=""><figcaption></figcaption></figure>

3. In the **URL** field, enter the webhook endpoint:

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

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FomwZyXIzYE4lTqWjzgQI%2Fimage.png?alt=media&#x26;token=25225bad-f2ae-4015-8ed5-0ebe5fc4dedc" alt=""><figcaption></figcaption></figure>

4. Complete the configuration and click **Add Webhook**.

## Smart Commits

Define the pattern used to extract ALM-related information from commit messages. For example:

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FlI1p4bcMl3aNrespHFni%2Fimage.png?alt=media&#x26;token=b055c1cc-328b-4b1b-a7f3-0d2f091915e0" alt=""><figcaption></figcaption></figure>

To enable automatic updates via webhook:

* Check the **Enable auto update on webhook** option.
* This will display the required webhook URL for use in repository settings.

For more detailed setup across repositories, refer to the [Webhook Configuration Guide](file://product-guides/arm/arm-features/webhooks).\
To integrate with external Smart Commit systems, see the [Version Control Repositories Summary](file://product-guides/arm/arm-features/version-control/introduction-to-version-control/version-control-repositories-summary).

## For Enterprise Customers

Use the following endpoints for enterprise-specific configurations: /api/webhook/v2//enterprise/trigger-scm-push-request /api/webhook/v2//enterprise/sync-alm-commits
