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.

Send a Webhook to Datadog: Post Events From Any Source

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 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

  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

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

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

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

Configure your source service's webhook to point at the Webhook Relay public URL. Trigger an event — or replay one from the 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

Get started

Create a free Webhook Relay account and turn any webhook into Datadog events — no servers to run. New to webhooks? Start with what is a webhook and how to 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.