---
title: "Send a Webhook to Datadog: Post Events From Any Source"
meta:
  "og:description": "Send any webhook to Datadog. Transform an incoming webhook into a Datadog Events API request in flight to post events and alerts — no glue server."
  "og:title": "Send a Webhook to Datadog: Post Events From Any Source"
  description: "Send any webhook to Datadog. Transform an incoming webhook into a Datadog Events API request in flight to post events and alerts — no glue server."
---

[Blog](https://webhookrelay.com/blog/)

# **Send a Webhook to Datadog: Post Events From Any Source**

Send any webhook to Datadog. Transform an incoming webhook into a Datadog Events API request in flight to post events and alerts — no glue server.

2 min read

Karolis RusenasJun 11, 2026

<details>

<summary>**On this page **

</summary>

- [How it works](#how-it-works)
- [Step 1: Get a Datadog API key](#step-1-get-a-datadog-api-key)
- [Step 2: Create a Webhook Relay output to the Events API](#step-2-create-a-webhook-relay-output-to-the-events-api)
- [Step 3: Add a transformation function](#step-3-add-a-transformation-function)
- [Step 4: Point your source at the URL and test](#step-4-point-your-source-at-the-url-and-test)
- [Going further](#going-further)
- [Get started](#get-started)
- [FAQ](#faq-heading)

</details>

![Send a Webhook to Datadog: Post Events From Any Source](https://webhookrelay.com/images/blog/heroes/route.jpg)

You want events from across your stack — deploys, signups, failed payments, CI runs — to show up on your **Datadog** Events stream so you can overlay them on dashboards and alert on them. The problem: the Datadog Events API expects a specific JSON body and the API key in a header, and the webhook your source sends never matches that shape.

[Webhook Relay](https://webhookrelay.com) sits in the middle. It receives the incoming webhook at a stable public URL, **transforms** the payload into the Datadog Events API format, and delivers it — no glue server, no Lambda, no maintenance.

## [How it works](#how-it-works)

1. Your source service POSTs its webhook to a Webhook Relay endpoint.
2. A transformation function maps the payload into a Datadog Events API request.
3. Webhook Relay forwards it to the Datadog Events API with your API key, and the event appears in Datadog.

## [Step 1: Get a Datadog API key](#step-1-get-a-datadog-api-key)

In Datadog, go to **Organization Settings → API Keys** and copy (or create) an **API key**.

## [Step 2: Create a Webhook Relay output to the Events API](#step-2-create-a-webhook-relay-output-to-the-events-api)

Create a bucket with a public input, then add an output pointing at the Datadog Events API:

- **Output destination:** `https://api.datadoghq.com/api/v1/events` (use `datadoghq.eu` for the EU site)
- **Headers:**
  - `DD-API-KEY: <your-api-key>`
  - `Content-Type: application/json`

## [Step 3: Add a transformation function](#step-3-add-a-transformation-function)

Attach a function that maps the incoming webhook into a Datadog event:

```
local body = json.decode(r.RequestBody)

local event = {
  title = body.title or "Event from webhook",
  text = body.message or r.RequestBody,
  alert_type = body.severity or "info",        -- info | warning | error | success
  tags = { "source:webhook-relay", "service:" .. (body.service or "unknown") }
}

r:SetRequestBody(json.encode(event))
```

## [Step 4: Point your source at the URL and test](#step-4-point-your-source-at-the-url-and-test)

Configure your source service's webhook to point at the Webhook Relay public URL. Trigger an event — or replay one from the [Webhook Bin](https://webhookrelay.com/webhook-bin/) — and it appears on your Datadog Events stream within seconds. The Webhook Relay logs show Datadog's response if the mapping needs tweaking.

## [Going further](#going-further)

- **Fan out:** also send the event to [PagerDuty](https://webhookrelay.com/blog/webhook-to-pagerduty/), [Slack](https://webhookrelay.com/blog/webhook-to-slack/) or archive it to [S3](https://webhookrelay.com/blog/webhook-to-s3/) with [multiple destinations](https://webhookrelay.com/features/webhook-multiple-destinations/).
- **Filter noise:** use [forwarding rules](https://webhookrelay.com/features/forwarding-rules/) so only the events you care about reach Datadog.
- **Inspect first:** see the raw payload in the [Webhook Bin](https://webhookrelay.com/webhook-bin/) before writing the mapping.

## [Get started](#get-started)

[Create a free Webhook Relay account](https://my.webhookrelay.com/register) and turn any webhook into Datadog events — no servers to run. New to webhooks? Start with [what is a webhook](https://webhookrelay.com/blog/what-is-webhook/) and [how to transform webhooks](https://webhookrelay.com/features/transform-webhooks/).

## **Frequently asked questions**

### **How do I send a webhook to Datadog?**

Create a Datadog API key, then create a Webhook Relay endpoint that forwards to the Datadog Events API. Add a transform function that maps the incoming payload into the Events API format (title, text, tags) and sends the API key in the DD-API-KEY header. Point your source at the Webhook Relay URL and each event appears on your Datadog Events stream.

### **Why can't I point my service straight at Datadog?**

The Datadog Events API expects a specific JSON body (title and text, plus optional tags, alert_type and a source_type_name) and the API key in a header. A raw webhook from CI, a payment provider or a custom app sends a different shape, so Datadog rejects it. Webhook Relay reshapes the request in flight so Datadog accepts it.

### **What can I do with webhook events in Datadog?**

Once events land in Datadog you can overlay them on dashboards, alert on them with monitors, and correlate them with metrics and traces — for example marking deploys, signups or failed payments alongside your system graphs.