> For the complete documentation index, see [llms.txt](https://docs.discords.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.discords.com/discords.com-bots/receiving-webhooks.md).

# Receiving webhooks

### Setting up webhooks

Webhooks can be set up on your bot's edit page, which you can find on your user profile. Go to Discords.com, navigate to the bots section, log in (if you haven't already), click on your profile picture in the top right corner, scroll down and you'll see a list of your bots.

### Webhook URL

The webhook URL is the address where we will `POST` the webhook to. Make sure that a webserver is running on the other site that allows `POST` requests to be received.

If you only want notifications when someone votes, you can put in a Discord webhook URL, make sure not to remove the authorization key from the URL as it is necessary.

### Webhook Secret

This is a secret value only your server and Discords.com should know. We will send that value along as an `Authorization` header so that you can verify the request came from us.

{% hint style="info" %}
We are currently working on integrating [HMAC encryption](https://www.okta.com/identity-101/hmac) for those of you who will want better authentication in the future. Join our [Discord server](https://discord.gg/dsl) to get the latest development updates.
{% endhint %}

***

### Sample webhook responses

<pre class="language-json"><code class="lang-json"><strong>// Regular upvote
</strong><strong>{
</strong>  "user": "254287885585350666",
  "bot": "621352902656524288",
  "query": {
    "cast": "/bots/bot/621352902656524288/vote"
  },
  "engine": "IridiumNode-v16.18.1",
  "type": "vote"
}
</code></pre>

```json
// Premium upvote
{
  "user": "254287885585350666",
  "bot": "621352902656524288",
  "query": {
    "cast": "/bots/bot/621352902656524288/vote"
  },
  "engine": "IridiumNode-v16.18.1",
  "type": "premium_vote"
}
```

```json
// Review
{
  "user": "254287885585350666",
  "bot": "621352902656524288",
  "stars": 5,
  "content": "This is some sample content",
  "engine": "IridiumNode-v16.18.1",
  "type": "review"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.discords.com/discords.com-bots/receiving-webhooks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
