curl --request POST \
--url https://api.deck.co/v2/event-destinations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"events": [
"<string>"
],
"filter": {},
"hookdeck": {
"token": "<string>"
}
}
'import requests
url = "https://api.deck.co/v2/event-destinations"
payload = {
"name": "<string>",
"events": ["<string>"],
"filter": {},
"hookdeck": { "token": "<string>" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
events: ['<string>'],
filter: {},
hookdeck: {token: '<string>'}
})
};
fetch('https://api.deck.co/v2/event-destinations', 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.deck.co/v2/event-destinations",
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' => '<string>',
'events' => [
'<string>'
],
'filter' => [
],
'hookdeck' => [
'token' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.deck.co/v2/event-destinations"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"filter\": {},\n \"hookdeck\": {\n \"token\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.deck.co/v2/event-destinations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"filter\": {},\n \"hookdeck\": {\n \"token\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deck.co/v2/event-destinations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"filter\": {},\n \"hookdeck\": {\n \"token\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "evtd_AbC123xYz456",
"object": "<string>",
"name": "<string>",
"status": "<string>",
"type": "webhook",
"events": [
"<string>"
],
"created_at": "2026-08-24T12:00:00Z",
"updated_at": "2026-08-24T12:00:00Z",
"filter": {},
"request_id": "<string>",
"test_endpoint": {
"inspect_url": "<string>"
},
"webhook": {
"url": "<string>"
},
"aws_sqs": {
"queue_url": "<string>"
},
"aws_kinesis": {
"stream_name": "<string>",
"region": "<string>"
},
"aws_s3": {
"bucket": "<string>",
"region": "<string>"
},
"aws_eventbridge": {
"region": "<string>",
"event_bus_name": "<string>"
},
"gcp_pubsub": {
"project_id": "<string>",
"topic": "<string>"
},
"rabbitmq": {
"exchange": "<string>",
"server_url": "<string>"
},
"azure_servicebus": {
"name": "<string>"
},
"hookdeck": {},
"cloudflare_queues": {
"account_id": "<string>",
"queue_id": "<string>"
}
}{
"errors": {},
"type": "<string>",
"title": "<string>",
"status": 123,
"traceId": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}Create an event destination
Creates a new event destination (e.g. a webhook endpoint) to receive platform events.
curl --request POST \
--url https://api.deck.co/v2/event-destinations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"events": [
"<string>"
],
"filter": {},
"hookdeck": {
"token": "<string>"
}
}
'import requests
url = "https://api.deck.co/v2/event-destinations"
payload = {
"name": "<string>",
"events": ["<string>"],
"filter": {},
"hookdeck": { "token": "<string>" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
events: ['<string>'],
filter: {},
hookdeck: {token: '<string>'}
})
};
fetch('https://api.deck.co/v2/event-destinations', 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.deck.co/v2/event-destinations",
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' => '<string>',
'events' => [
'<string>'
],
'filter' => [
],
'hookdeck' => [
'token' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.deck.co/v2/event-destinations"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"filter\": {},\n \"hookdeck\": {\n \"token\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.deck.co/v2/event-destinations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"filter\": {},\n \"hookdeck\": {\n \"token\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deck.co/v2/event-destinations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"events\": [\n \"<string>\"\n ],\n \"filter\": {},\n \"hookdeck\": {\n \"token\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "evtd_AbC123xYz456",
"object": "<string>",
"name": "<string>",
"status": "<string>",
"type": "webhook",
"events": [
"<string>"
],
"created_at": "2026-08-24T12:00:00Z",
"updated_at": "2026-08-24T12:00:00Z",
"filter": {},
"request_id": "<string>",
"test_endpoint": {
"inspect_url": "<string>"
},
"webhook": {
"url": "<string>"
},
"aws_sqs": {
"queue_url": "<string>"
},
"aws_kinesis": {
"stream_name": "<string>",
"region": "<string>"
},
"aws_s3": {
"bucket": "<string>",
"region": "<string>"
},
"aws_eventbridge": {
"region": "<string>",
"event_bus_name": "<string>"
},
"gcp_pubsub": {
"project_id": "<string>",
"topic": "<string>"
},
"rabbitmq": {
"exchange": "<string>",
"server_url": "<string>"
},
"azure_servicebus": {
"name": "<string>"
},
"hookdeck": {},
"cloudflare_queues": {
"account_id": "<string>",
"queue_id": "<string>"
}
}{
"errors": {},
"type": "<string>",
"title": "<string>",
"status": 123,
"traceId": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}Headers
Optional key that makes the request idempotent. Retrying with the same key returns the original response instead of repeating the operation; keys expire after 24 hours. Any string up to 256 characters. See Idempotency.
256"550e8400-e29b-41d4-a716-446655440000"
Body
Request body for creating a new event destination. Provide name, type, events, and exactly one type-specific configuration object whose property name matches type (for example {"type": "webhook", "webhook": {"url": "..."}}).
Destination type. Defaults to webhook if omitted. Send the matching configuration object under a property whose name equals this value (for example, when type is aws_sqs, include an aws_sqs object).
webhook, aws_sqs, aws_kinesis, aws_s3, aws_eventbridge, gcp_pubsub, rabbitmq, azure_servicebus, hookdeck, cloudflare_queues Optional content filter matched against each event payload. Only events of the subscribed types that match are delivered. Write the filter against the event as you receive it, for example {"data": {"task_id": "task_a1b2c3d4"}}. Omit to deliver every event of the subscribed types. Must be an object nested no more than 32 levels deep. See Filtering events.
Response
Created
An event destination object representing an endpoint that receives platform events.
Destination type. The endpoint configuration is returned under a property whose name equals this value (for example, a webhook destination returns a webhook object).
webhook, aws_sqs, aws_kinesis, aws_s3, aws_eventbridge, gcp_pubsub, rabbitmq, azure_servicebus, hookdeck, cloudflare_queues Was this page helpful?