Send event to subscription
curl --request POST \
--url https://qa-api.endl.xyz/api/v0/webhooks/subscriptions/{id}/send \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"eventId": "evt_9f1a4c7b2e08"
}
'import requests
url = "https://qa-api.endl.xyz/api/v0/webhooks/subscriptions/{id}/send"
payload = { "eventId": "evt_9f1a4c7b2e08" }
headers = {
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({eventId: 'evt_9f1a4c7b2e08'})
};
fetch('https://qa-api.endl.xyz/api/v0/webhooks/subscriptions/{id}/send', 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://qa-api.endl.xyz/api/v0/webhooks/subscriptions/{id}/send",
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([
'eventId' => 'evt_9f1a4c7b2e08'
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"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://qa-api.endl.xyz/api/v0/webhooks/subscriptions/{id}/send"
payload := strings.NewReader("{\n \"eventId\": \"evt_9f1a4c7b2e08\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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://qa-api.endl.xyz/api/v0/webhooks/subscriptions/{id}/send")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"eventId\": \"evt_9f1a4c7b2e08\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-api.endl.xyz/api/v0/webhooks/subscriptions/{id}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventId\": \"evt_9f1a4c7b2e08\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Event queued for delivery",
"status": "SUCCESS",
"data": {
"message": "queued for delivery — this does not guarantee immediate receipt at the endpoint",
"deliveryId": "4d2f6a11-8c73-4b90-9e21-5f0a2c8d1e44"
},
"errors": []
}Manually sends an already-recorded event to this subscription — useful for a subscription that did not exist when the event first occurred.
It queues a delivery rather than sending synchronously. A 200 means queued, not received: track the returned deliveryId to find out what actually happened.
POST
/
api
/
v0
/
webhooks
/
subscriptions
/
{id}
/
send
Send event to subscription
curl --request POST \
--url https://qa-api.endl.xyz/api/v0/webhooks/subscriptions/{id}/send \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"eventId": "evt_9f1a4c7b2e08"
}
'import requests
url = "https://qa-api.endl.xyz/api/v0/webhooks/subscriptions/{id}/send"
payload = { "eventId": "evt_9f1a4c7b2e08" }
headers = {
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({eventId: 'evt_9f1a4c7b2e08'})
};
fetch('https://qa-api.endl.xyz/api/v0/webhooks/subscriptions/{id}/send', 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://qa-api.endl.xyz/api/v0/webhooks/subscriptions/{id}/send",
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([
'eventId' => 'evt_9f1a4c7b2e08'
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"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://qa-api.endl.xyz/api/v0/webhooks/subscriptions/{id}/send"
payload := strings.NewReader("{\n \"eventId\": \"evt_9f1a4c7b2e08\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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://qa-api.endl.xyz/api/v0/webhooks/subscriptions/{id}/send")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"eventId\": \"evt_9f1a4c7b2e08\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-api.endl.xyz/api/v0/webhooks/subscriptions/{id}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventId\": \"evt_9f1a4c7b2e08\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Event queued for delivery",
"status": "SUCCESS",
"data": {
"message": "queued for delivery — this does not guarantee immediate receipt at the endpoint",
"deliveryId": "4d2f6a11-8c73-4b90-9e21-5f0a2c8d1e44"
},
"errors": []
}Authorizations
Your partner API key. Requires the webhooks permission, or events for the PULL feed.
Path Parameters
The subscription's UUID.
Body
application/json
The event id — the value delivered as X-WEBHOOK-EVENT-ID.
Maximum string length:
64Response
Queued for delivery.