# Creating a webhook

Creating a webhook is extremely easy in our EverTransit system. For the purpose of this tutorial, we are going to create a webhook that listens for the creation of a ride. Follow the steps below.

**Step 1.** Go to the developer's section located on the [new dispatch website](https://next.evertransit.com/) and click on the Webhooks card.

![](https://401638202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FncBJGr7LibzayGdNpU4o%2Fuploads%2Fzy98Zwgamzq1NF7zYFsO%2Fwebhooks.png?alt=media\&token=ec7a46e4-ffdd-4094-992d-0ed645324f66)

**Step 2.** To add a new webhook, click on the `Add Webhook` button. Note that you need to have the EverTransit API feature enabled. If you haven't already enabled it, [click here](#enable-evertransit-api).

![](https://401638202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FncBJGr7LibzayGdNpU4o%2Fuploads%2FhnZmIcqQetE0kzyuIAiM%2Fwebhooks%20page.png?alt=media\&token=63c89e61-f05c-4d46-8803-b592b62a7b91)

**Step 3.** Fill in the information in the necessary fields.

![](https://401638202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FncBJGr7LibzayGdNpU4o%2Fuploads%2FePAheha3chKnPtg9QkfK%2Fadd%20webhook.png?alt=media\&token=52281e84-bd04-4e98-bd05-3aa1be1c4f76)

#### Endpoint URL

The endpoint URL is the URL of the server that will receive the webhook POST requests.

Since we're developing locally for our tutorial, we'll set it to the `https://*.ngrok.io` URL, followed by `/webhook`. For example, `https://9a6b-84-126-144-149.ngrok.io/webhook`.

#### Secret

Setting a webhook secret allows you to ensure that `POST` requests sent to the endpoint URL are from EverTransit. When you set a secret, you'll receive the `Webhook-Signature` header in the webhook `POST` request. For more information on how to use a secret with a signature header to secure your webhook payloads, see [Securing your webhooks](https://developers.evertransit.com/webhooks/quickstart-guide/secure-webhooks).

In order for EverTransit to allow us to create a webhook, you must enter a value in this field. Make a note of this value. We'll use it to set up our webhook.

#### Description

This input is used to describe your webhook.

#### Selecting the events

Events are our way of letting you know when something interesting happens in your fleet. When an event occurs, we create a new Event object. If you registered a webhook endpoint to receive that event, we send it to your endpoint as part of a POST request. For more information about events and all the supported events, consult the section [Webhook events](https://developers.evertransit.com/webhooks/webhook-events).&#x20;

For now, we are only going to select the event `ride.created` , which will allow each time a ride is created in your fleet, this event will be notified to you through a POST request to the endpoint that you [previously configured](#endpoint-url).

Once we have reached this point, we just have to click on the `Add Webhook` button and the webhook will be created.

![](https://401638202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FncBJGr7LibzayGdNpU4o%2Fuploads%2FjIUjutZ5YaHKvrWA91iy%2Fadd%20webhook%20filled.png?alt=media\&token=89d2487d-43a4-4811-8546-f65779065a34)

## Enable EverTransit API

Note that you need to have the EverTransit API feature enabled. If you haven't already enabled it, you will see a page like this when you click on the Webhooks button. So you need to contact us to enable this feature for your fleet.

![](https://401638202-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FncBJGr7LibzayGdNpU4o%2Fuploads%2F3wWSD8hEYoKFppFAVXIU%2Fdisable%20API.png?alt=media\&token=955fa17e-9f0e-4f6c-8153-e09b699f75b1)


---

# 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://developers.evertransit.com/webhooks/quickstart-guide/creating-a-webhook.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.
