curl --request POST \
--url https://api.openpmm.com/v1/workspaces/{workspace_id}/webhook-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "Production events",
"url": "https://example.com/openpmm/events",
"event_types": [
"post.published",
"post.failed",
"post.awaiting-provider",
"post.needs-attention"
],
"destination_filter_mode": "all",
"content_mode": "metadata"
}
'import requests
url = "https://api.openpmm.com/v1/workspaces/{workspace_id}/webhook-endpoints"
payload = {
"name": "Production events",
"url": "https://example.com/openpmm/events",
"event_types": ["post.published", "post.failed", "post.awaiting-provider", "post.needs-attention"],
"destination_filter_mode": "all",
"content_mode": "metadata"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Production events',
url: 'https://example.com/openpmm/events',
event_types: [
'post.published',
'post.failed',
'post.awaiting-provider',
'post.needs-attention'
],
destination_filter_mode: 'all',
content_mode: 'metadata'
})
};
fetch('https://api.openpmm.com/v1/workspaces/{workspace_id}/webhook-endpoints', 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.openpmm.com/v1/workspaces/{workspace_id}/webhook-endpoints",
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([
'name' => 'Production events',
'url' => 'https://example.com/openpmm/events',
'event_types' => [
'post.published',
'post.failed',
'post.awaiting-provider',
'post.needs-attention'
],
'destination_filter_mode' => 'all',
'content_mode' => 'metadata'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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.openpmm.com/v1/workspaces/{workspace_id}/webhook-endpoints"
payload := strings.NewReader("{\n \"name\": \"Production events\",\n \"url\": \"https://example.com/openpmm/events\",\n \"event_types\": [\n \"post.published\",\n \"post.failed\",\n \"post.awaiting-provider\",\n \"post.needs-attention\"\n ],\n \"destination_filter_mode\": \"all\",\n \"content_mode\": \"metadata\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.openpmm.com/v1/workspaces/{workspace_id}/webhook-endpoints")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Production events\",\n \"url\": \"https://example.com/openpmm/events\",\n \"event_types\": [\n \"post.published\",\n \"post.failed\",\n \"post.awaiting-provider\",\n \"post.needs-attention\"\n ],\n \"destination_filter_mode\": \"all\",\n \"content_mode\": \"metadata\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openpmm.com/v1/workspaces/{workspace_id}/webhook-endpoints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Production events\",\n \"url\": \"https://example.com/openpmm/events\",\n \"event_types\": [\n \"post.published\",\n \"post.failed\",\n \"post.awaiting-provider\",\n \"post.needs-attention\"\n ],\n \"destination_filter_mode\": \"all\",\n \"content_mode\": \"metadata\"\n}"
response = http.request(request)
puts response.read_body{
"id": "wh_01JABCDEF",
"object": "webhook_endpoint",
"name": "<string>",
"url": "<string>",
"enabled": true,
"event_types": [
"post.published"
],
"destination_filter_mode": "all",
"destination_ids": [
"dest_01JABCDEF"
],
"content_mode": "metadata",
"secret_last_four": "<string>",
"previous_secret_expires_at": "2026-08-09T12:00:00.000Z",
"config_version": 2,
"created_at": "2026-08-09T12:00:00.000Z",
"updated_at": "2026-08-09T12:00:00.000Z",
"secret": "<string>"
}Create Webhook Endpoint
Create a webhook endpoint. The response contains the signing secret once. Full-content delivery also requires posts:read.
curl --request POST \
--url https://api.openpmm.com/v1/workspaces/{workspace_id}/webhook-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "Production events",
"url": "https://example.com/openpmm/events",
"event_types": [
"post.published",
"post.failed",
"post.awaiting-provider",
"post.needs-attention"
],
"destination_filter_mode": "all",
"content_mode": "metadata"
}
'import requests
url = "https://api.openpmm.com/v1/workspaces/{workspace_id}/webhook-endpoints"
payload = {
"name": "Production events",
"url": "https://example.com/openpmm/events",
"event_types": ["post.published", "post.failed", "post.awaiting-provider", "post.needs-attention"],
"destination_filter_mode": "all",
"content_mode": "metadata"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Production events',
url: 'https://example.com/openpmm/events',
event_types: [
'post.published',
'post.failed',
'post.awaiting-provider',
'post.needs-attention'
],
destination_filter_mode: 'all',
content_mode: 'metadata'
})
};
fetch('https://api.openpmm.com/v1/workspaces/{workspace_id}/webhook-endpoints', 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.openpmm.com/v1/workspaces/{workspace_id}/webhook-endpoints",
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([
'name' => 'Production events',
'url' => 'https://example.com/openpmm/events',
'event_types' => [
'post.published',
'post.failed',
'post.awaiting-provider',
'post.needs-attention'
],
'destination_filter_mode' => 'all',
'content_mode' => 'metadata'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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.openpmm.com/v1/workspaces/{workspace_id}/webhook-endpoints"
payload := strings.NewReader("{\n \"name\": \"Production events\",\n \"url\": \"https://example.com/openpmm/events\",\n \"event_types\": [\n \"post.published\",\n \"post.failed\",\n \"post.awaiting-provider\",\n \"post.needs-attention\"\n ],\n \"destination_filter_mode\": \"all\",\n \"content_mode\": \"metadata\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.openpmm.com/v1/workspaces/{workspace_id}/webhook-endpoints")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Production events\",\n \"url\": \"https://example.com/openpmm/events\",\n \"event_types\": [\n \"post.published\",\n \"post.failed\",\n \"post.awaiting-provider\",\n \"post.needs-attention\"\n ],\n \"destination_filter_mode\": \"all\",\n \"content_mode\": \"metadata\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openpmm.com/v1/workspaces/{workspace_id}/webhook-endpoints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Production events\",\n \"url\": \"https://example.com/openpmm/events\",\n \"event_types\": [\n \"post.published\",\n \"post.failed\",\n \"post.awaiting-provider\",\n \"post.needs-attention\"\n ],\n \"destination_filter_mode\": \"all\",\n \"content_mode\": \"metadata\"\n}"
response = http.request(request)
puts response.read_body{
"id": "wh_01JABCDEF",
"object": "webhook_endpoint",
"name": "<string>",
"url": "<string>",
"enabled": true,
"event_types": [
"post.published"
],
"destination_filter_mode": "all",
"destination_ids": [
"dest_01JABCDEF"
],
"content_mode": "metadata",
"secret_last_four": "<string>",
"previous_secret_expires_at": "2026-08-09T12:00:00.000Z",
"config_version": 2,
"created_at": "2026-08-09T12:00:00.000Z",
"updated_at": "2026-08-09T12:00:00.000Z",
"secret": "<string>"
}Authorizations
Send an account API key in the Authorization: Bearer <key> header.
Headers
Optional request ID. OpenPMM returns this value when it is valid. Otherwise, OpenPMM creates a request ID.
128A unique key for this operation. Use the same key when you retry the same request. Different input with the same key returns 409.
1 - 200Path Parameters
Unique workspace ID.
"ws_01JABCDEF"
Body
Webhook endpoint configuration.
1 - 120Public HTTPS URL. Use port 443 and a DNS hostname. Do not include credentials. The hostname must not resolve to a private or reserved address.
2048^https://1post.published, post.failed, post.awaiting-provider, post.needs-attention all, selected 100Unique destination ID.
metadata, full Response
The endpoint and its new signing secret.
Unique webhook endpoint ID.
"wh_01JABCDEF"
"webhook_endpoint"Full webhook delivery URL.
post.published, post.failed, post.awaiting-provider, post.needs-attention all, selected Unique destination ID.
metadata, full 4"2026-08-09T12:00:00.000Z"
x >= 1"2026-08-09T12:00:00.000Z"
"2026-08-09T12:00:00.000Z"
Signing secret. This value is returned only once.
