# Create your first webhook URL

> A few simple steps to create webhooks in Pocket Alert

*25.01.2025*

<!-- source: https://pocketalert.app/blog/create-your-first-webhook-url -->

[//]: # '# How to integrate Bitbucket webhooks into pocket alert'

## Create a new webhook

![create webhook](https://cdn.pocketalert.app/guides/git/webhook-create.gif)

1. Go to the [Webhooks](https://pocketalert.app/webhooks) page
2. Click on the "Create" button
3. Fill in the form with the following information:
   - **Name**: The name of the webhook
   - **Application**: The application to link the webhook to
   - **Device**: The device to link the webhook to
   - **Message**: The message to send when the webhook is triggered
4. Click on the "Create" button
5. Copy the URL of the webhook

**In the message we specify \* to get all the JSON and determine what parameters we need.**

## How JSON parser works
Webhooks are essential for real-time data transmission between applications. Follow these steps to configure webhooks efficiently and ensure seamless integration with your systems.

1. **Define Your JSON Payload Structure**
   Identify the data format you wish to receive. To capture the full dataset, use the wildcard symbol * in your configuration. This ensures the entire JSON payload is delivered without filtering.
2. **Extract Specific Data from Nested JSON**
   For targeting individual fields within nested objects, use the syntax `%objectName.field%`. For example, `%params.name%` extracts the name value from the params object.

```json
{
  "event": {
    "title": "New Order",
    "message": "A new order has been placed with ID 12345",
    "tags": ["order", "new"],
    "users": [
      {"first": "Dale", "last": "Murphy", "age": 44, "nets": ["ig", "fb", "tw"]},
      {"first": "Roger", "last": "Craig", "age": 68, "nets": ["fb", "tw"]},
      {"first": "Jane", "last": "Murphy", "age": 47, "nets": ["ig", "tw"]}
    ]
  }
}
```

To set up the webhook, you would configure it like this:

- If you want to display the entire JSON, simply use the *
- To get the title of the event, use `%event.title%`
- To get the message, use `%event.message%`
- To get the tags, use `%event.tags%`

```json
Title: %event.title%
Message: %event.message%
Tags: %event.tags%
Users: %event.users.0%
First user: %event.users.0.first% %event.users.0.last%
```

Here is an example of how the output would look using the provided configuration based on the example JSON:

```
Title: New Order
Message: A new order has been placed with ID 12345
Tags: ["order","new"]
Users: {"age":44,"first":"Dale","last":"Murphy","nets":["ig","fb","tw"]}
First user: Dale Murphy
```

More information about the variables can be found in the [GJSON Path Syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md).
