> For the complete documentation index, see [llms.txt](https://developers.didomi.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.didomi.io/integrations/tutorials/configure-a-http-webhook.md).

# Configure a HTTP webhook

{% hint style="warning" %}
Webhooks are a premium feature that is not enabled for organizations by default. Make sure you reach out to <support@didomi.io> to enable this integration before configuring one for your organization.
{% endhint %}

### Introduction

Webhooks allow you to subscribe to events happening on the Didomi platform to implement custom workflows when your users change their consent preferences. When an event is triggered, we'll send a HTTP POST payload to the configured endpoint.

### Creating your integration configuration

To configure a HTTP Webhook integration for your organization, send a `POST /marketplace/integrations` request with the `webhook-http` type, the ID of your organization, and the URL (endpoint) through which the events will be received. By default, HTTP webhook authentication is disabled.

```json
POST https://api.didomi.io/v1/marketplace/integrations?organization_id=YOUR_ORG_ID

BODY
{
  "type_id": "webhook-http",
  "authentication": {},
  "properties": {
    "url": "https://api.my-site.com/consents"
  }
}

```

#### Authentication

The HTTP webhook integration supports OAuth as authentication mechanism. To enable it, you can specify the url and the oauth credentials to get a session token (this token will be sent inside the `Authorization` HTTP header in the event webhook request) inside the `authentication` object.

```json
POST https://api.didomi.io/v1/marketplace/integrations?organization_id=YOUR_ORG_ID

BODY
{
  "type_id": "webhook-http",
  "authentication": {
    "url": "https://api.my-site.com/oauth/token",
    "client_id": "***************",
    "client_secret": "******************"
  "properties": {
    "url": "https://api.my-site.com/consents"
  }
}
```

This will automatically start sending HTTP POST requests to your configured endpoint whenever a new Didomi event happens and your users consent preferences are updated.

For more information on HTTP webhooks, please visit the [Webhooks documentation](/integrations/generic-integrations/webhooks.md).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.didomi.io/integrations/tutorials/configure-a-http-webhook.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
