Preview event dispatch envelopes
curl --request POST \
--url https://api.example.com/connections/preview-event \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"item_id": "<string>",
"connection_id": "<string>",
"cycle": {
"originating_connection_id": "<string>",
"hop_count": 1
}
}
'import requests
url = "https://api.example.com/connections/preview-event"
payload = {
"item_id": "<string>",
"connection_id": "<string>",
"cycle": {
"originating_connection_id": "<string>",
"hop_count": 1
}
}
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({
item_id: '<string>',
connection_id: '<string>',
cycle: {originating_connection_id: '<string>', hop_count: 1}
})
};
fetch('https://api.example.com/connections/preview-event', 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.example.com/connections/preview-event",
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([
'item_id' => '<string>',
'connection_id' => '<string>',
'cycle' => [
'originating_connection_id' => '<string>',
'hop_count' => 1
]
]),
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.example.com/connections/preview-event"
payload := strings.NewReader("{\n \"item_id\": \"<string>\",\n \"connection_id\": \"<string>\",\n \"cycle\": {\n \"originating_connection_id\": \"<string>\",\n \"hop_count\": 1\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.example.com/connections/preview-event")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"item_id\": \"<string>\",\n \"connection_id\": \"<string>\",\n \"cycle\": {\n \"originating_connection_id\": \"<string>\",\n \"hop_count\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/connections/preview-event")
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 \"item_id\": \"<string>\",\n \"connection_id\": \"<string>\",\n \"cycle\": {\n \"originating_connection_id\": \"<string>\",\n \"hop_count\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"envelopes": [
{
"connection_id": "<string>",
"integration_name": "<string>",
"would_dispatch": true,
"dispatch_reason": "ok",
"envelope": {
"kind": "item-event",
"integration_name": "<string>",
"connection_id": "<string>",
"event_type": "<string>",
"item_id": "<string>",
"cycle": {
"originating_connection_id": "<string>",
"hop_count": 1
},
"tenant_id": "<string>",
"payload": null
}
}
],
"hop_budget": {
"max": 1,
"used": 1
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "forbidden",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "item_not_found",
"message": "<string>",
"details": {}
}
}Connections
Preview event dispatch envelopes
Renders the wire envelopes the reactive-run bridge would POST to Cloudflare Queues for a given item-event, without invoking any handler or producing a queue message. Operator debugging surface. Returns one entry per subscribing connection in the caller’s tenant — would_dispatch: true with the synthesised envelope, or would_dispatch: false with a dispatch_reason so the operator can see why a subscriber would be skipped (self-event / cross-tenant / hop-budget / subscription_inactive). Defaults to all subscribers; pass connection_id to filter to one.
POST
/
connections
/
preview-event
Preview event dispatch envelopes
curl --request POST \
--url https://api.example.com/connections/preview-event \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"item_id": "<string>",
"connection_id": "<string>",
"cycle": {
"originating_connection_id": "<string>",
"hop_count": 1
}
}
'import requests
url = "https://api.example.com/connections/preview-event"
payload = {
"item_id": "<string>",
"connection_id": "<string>",
"cycle": {
"originating_connection_id": "<string>",
"hop_count": 1
}
}
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({
item_id: '<string>',
connection_id: '<string>',
cycle: {originating_connection_id: '<string>', hop_count: 1}
})
};
fetch('https://api.example.com/connections/preview-event', 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.example.com/connections/preview-event",
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([
'item_id' => '<string>',
'connection_id' => '<string>',
'cycle' => [
'originating_connection_id' => '<string>',
'hop_count' => 1
]
]),
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.example.com/connections/preview-event"
payload := strings.NewReader("{\n \"item_id\": \"<string>\",\n \"connection_id\": \"<string>\",\n \"cycle\": {\n \"originating_connection_id\": \"<string>\",\n \"hop_count\": 1\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.example.com/connections/preview-event")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"item_id\": \"<string>\",\n \"connection_id\": \"<string>\",\n \"cycle\": {\n \"originating_connection_id\": \"<string>\",\n \"hop_count\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/connections/preview-event")
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 \"item_id\": \"<string>\",\n \"connection_id\": \"<string>\",\n \"cycle\": {\n \"originating_connection_id\": \"<string>\",\n \"hop_count\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"envelopes": [
{
"connection_id": "<string>",
"integration_name": "<string>",
"would_dispatch": true,
"dispatch_reason": "ok",
"envelope": {
"kind": "item-event",
"integration_name": "<string>",
"connection_id": "<string>",
"event_type": "<string>",
"item_id": "<string>",
"cycle": {
"originating_connection_id": "<string>",
"hop_count": 1
},
"tenant_id": "<string>",
"payload": null
}
}
],
"hop_budget": {
"max": 1,
"used": 1
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "forbidden",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "item_not_found",
"message": "<string>",
"details": {}
}
}Authorizations
Pass an API key (marfa_k1_...) or OAuth access token (marfa_at_...)
Body
application/json