Test trigger
curl --request POST \
--url https://api.engini.io/v1/triggers/{triggerId}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payload": "<unknown>"
}
'import requests
url = "https://api.engini.io/v1/triggers/{triggerId}/test"
payload = { "payload": "<unknown>" }
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({payload: '<unknown>'})
};
fetch('https://api.engini.io/v1/triggers/{triggerId}/test', 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.engini.io/v1/triggers/{triggerId}/test",
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([
'payload' => '<unknown>'
]),
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.engini.io/v1/triggers/{triggerId}/test"
payload := strings.NewReader("{\n \"payload\": \"<unknown>\"\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.engini.io/v1/triggers/{triggerId}/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/triggers/{triggerId}/test")
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 \"payload\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"delivered": true,
"destination": {
"id": 123,
"name": "<string>",
"url": "<string>",
"status": "active",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"environment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>"
},
"is_default": true,
"consecutive_failures": 123,
"max_consecutive_failures": 123,
"last_delivery_at": "2023-11-07T05:31:56Z",
"last_failure_at": "2023-11-07T05:31:56Z",
"last_failure": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"event_id": "<string>",
"trigger_id": "<string>",
"status_code": 123,
"duration_ms": 123,
"error": "<string>"
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Triggers
Test trigger
Builds an in-memory event, signs it with the resolved destination's secret exactly like a
real firing, and POSTs it synchronously - so the response carries what the destination actually
answered rather than "queued". NOTHING IS PERSISTED: no TriggerEvent, TriggerDelivery
or TriggerDedupe row is written, so a test never appears in GET .../events or the
live stream and never counts against dedupe.
The body carries "test": true and the event id is prefixed te_test_, both
covered by the signature - a receiver that checks either before parsing can tell a test from real
traffic without ambiguity. Omit payload to get a default
{"test":true,"trigger_id":"…","generated_at":"…"} body.
A RECEIVER ERROR IS A SUCCESSFUL TEST OF A BROKEN ENDPOINT: an unreachable or 5xx-answering
destination still returns 200 from this endpoint, with delivered: false and the
status code or connection error in error. This call is rate-limited to 10 per minute per
account - it is the only trigger endpoint that makes the server POST to a caller-chosen URL on
demand.
POST
/
v1
/
triggers
/
{triggerId}
/
test
Test trigger
curl --request POST \
--url https://api.engini.io/v1/triggers/{triggerId}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payload": "<unknown>"
}
'import requests
url = "https://api.engini.io/v1/triggers/{triggerId}/test"
payload = { "payload": "<unknown>" }
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({payload: '<unknown>'})
};
fetch('https://api.engini.io/v1/triggers/{triggerId}/test', 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.engini.io/v1/triggers/{triggerId}/test",
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([
'payload' => '<unknown>'
]),
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.engini.io/v1/triggers/{triggerId}/test"
payload := strings.NewReader("{\n \"payload\": \"<unknown>\"\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.engini.io/v1/triggers/{triggerId}/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/triggers/{triggerId}/test")
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 \"payload\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"delivered": true,
"destination": {
"id": 123,
"name": "<string>",
"url": "<string>",
"status": "active",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"environment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>"
},
"is_default": true,
"consecutive_failures": 123,
"max_consecutive_failures": 123,
"last_delivery_at": "2023-11-07T05:31:56Z",
"last_failure_at": "2023-11-07T05:31:56Z",
"last_failure": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"event_id": "<string>",
"trigger_id": "<string>",
"status_code": 123,
"duration_ms": 123,
"error": "<string>"
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Body
application/json
Optional free-form payload for the synthetic event. Defaulted when omitted.
Response
What the destination answered - never a record of anything, since nothing is stored.
The result of one synthetic delivery attempt - never persisted, so there is no id to read this back by. Reflects exactly what the destination answered, including a receiver error (delivered: false with a status code), which is a SUCCESSFUL test of a broken endpoint, not a failed call.