# Sending data to a webhook

Now that you've created your webhook URL, named it, and sent your first test request you are ready to start sending real user data from your app's frontend or backend.&#x20;

The way webhooks work is very simple: **we give you a unique URL** that will be linked to a user action and **you make a request to this URL** with your user's email address every time your user completed that action.

Let's say we want to notify Palabra when a user validated their email address. The first step would be to [create a webhook](/sources/getting-data-from-webhooks/creating-a-webhook.md), that we will name '**User validated email address**'.&#x20;

After creating your webhook you'll get a URL like this: `https://hooks.palabra.io/webhook?id=[UNIQUE-ID]`

The next step will be to go to your app and find the method where you are validating your user's email address:

{% code title="user-validation.js" %}

```javascript
const request = require('request-promise-native')

const userValidatedEmail = async ({ email }) => {
    //.. app specific logic after user validates email

    // sending request to webhook
    const response = await request({
      // get uri from https://a.palabra.io
      uri: 'https://hooks.palabra.io/webhook?id=[UNIQUE-ID]',
      method: 'POST',
      body: {
        email // required
      },
      json: true
    })
  
    if (!response) {
      throw new Error('Error triggering webhook')
    }
}
```

{% endcode %}

Now every time a user validates their email address you'll notify Palabra.

{% hint style="danger" %}
Important: make sure you always **send an email address** on your webhook's request.
{% endhint %}

Remember you can also send other user data on your body's payload. Just add other user properties to the body object.


---

# 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://docs.palabra.io/sources/getting-data-from-webhooks/sending-data-to-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.
