Skip to main content
POST
/
webhooks
Create a webhook
curl --request POST \
  --url https://api.getdialed.ai/flows/webhooks \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "definition_id": "def_a1b2c3d4",
  "description": "Inbound Stripe payment webhook",
  "enabled": true,
  "input_template": {
    "amount": "{{ payload.data.object.amount }}"
  },
  "mode": "trigger",
  "provider": "standard",
  "rate_limit": 1000
}
'
import requests

url = "https://api.getdialed.ai/flows/webhooks"

payload = {
"definition_id": "def_a1b2c3d4",
"description": "Inbound Stripe payment webhook",
"enabled": True,
"input_template": { "amount": "{{ payload.data.object.amount }}" },
"mode": "trigger",
"provider": "standard",
"rate_limit": 1000
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
definition_id: 'def_a1b2c3d4',
description: 'Inbound Stripe payment webhook',
enabled: true,
input_template: {amount: '{{ payload.data.object.amount }}'},
mode: 'trigger',
provider: 'standard',
rate_limit: 1000
})
};

fetch('https://api.getdialed.ai/flows/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getdialed.ai/flows/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'definition_id' => 'def_a1b2c3d4',
'description' => 'Inbound Stripe payment webhook',
'enabled' => true,
'input_template' => [
'amount' => '{{ payload.data.object.amount }}'
],
'mode' => 'trigger',
'provider' => 'standard',
'rate_limit' => 1000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.getdialed.ai/flows/webhooks"

payload := strings.NewReader("{\n \"definition_id\": \"def_a1b2c3d4\",\n \"description\": \"Inbound Stripe payment webhook\",\n \"enabled\": true,\n \"input_template\": {\n \"amount\": \"{{ payload.data.object.amount }}\"\n },\n \"mode\": \"trigger\",\n \"provider\": \"standard\",\n \"rate_limit\": 1000\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.getdialed.ai/flows/webhooks")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"definition_id\": \"def_a1b2c3d4\",\n \"description\": \"Inbound Stripe payment webhook\",\n \"enabled\": true,\n \"input_template\": {\n \"amount\": \"{{ payload.data.object.amount }}\"\n },\n \"mode\": \"trigger\",\n \"provider\": \"standard\",\n \"rate_limit\": 1000\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.getdialed.ai/flows/webhooks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"definition_id\": \"def_a1b2c3d4\",\n \"description\": \"Inbound Stripe payment webhook\",\n \"enabled\": true,\n \"input_template\": {\n \"amount\": \"{{ payload.data.object.amount }}\"\n },\n \"mode\": \"trigger\",\n \"provider\": \"standard\",\n \"rate_limit\": 1000\n}"

response = http.request(request)
puts response.read_body
{
  "created_at": "2026-07-09T09:00:00Z",
  "definition_id": "def_a1b2c3d4",
  "description": "Inbound Stripe payment webhook",
  "enabled": true,
  "id": "wh_1a2b3c4d5e6f",
  "mode": "trigger",
  "org_id": "org_e5f6g7h8",
  "provider": "standard",
  "rate_limit": 1000,
  "receive_url": "/webhooks/acme/wh_1a2b3c4d5e6f",
  "signing_secret": "whsec_...",
  "updated_at": "2026-07-09T09:00:00Z"
}
{
"detail": "Authentication required"
}
{
"detail": "Admin role required"
}
{
"detail": "Definition not found"
}
{
"detail": "Validation error"
}
{
"detail": "Rate limit exceeded"
}
{
"detail": "Webhook secret create failed, record cleaned up"
}

Authorizations

X-API-Key
string
header
required

Body

application/json

POST /webhooks body. Admin-authored; sender never touches this surface.

definition_id
string
required
description
string
required
Required string length: 1 - 200
mode
enum<string>
default:trigger
Available options:
trigger,
resume
provider
enum<string>
default:standard
Available options:
standard,
stripe,
five9,
custom
input_template
Input Template · object | null
dispatch_retry
Dispatch Retry · object | null
rate_limit
integer | null
Required range: x > 0
enabled
boolean
default:true

Response

Successful Response

POST response — the ONLY place the signing secret + receive URL appear.

Show-once at create (and on explicit rotate); the read model omits both.

id
string
required
definition_id
string
required
org_id
string
required
description
string
required
mode
string
required
provider
string
required
input_template
Input Template · object | null
required
dispatch_retry
Dispatch Retry · object | null
required
rate_limit
integer | null
required
enabled
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
signing_secret
string
required
receive_url
string
required