curl --request PATCH \
--url https://api.engini.io/v1/triggers/destinations/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"is_default": true,
"max_consecutive_failures": 123
}
'import requests
url = "https://api.engini.io/v1/triggers/destinations/{name}"
payload = {
"url": "<string>",
"is_default": True,
"max_consecutive_failures": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', is_default: true, max_consecutive_failures: 123})
};
fetch('https://api.engini.io/v1/triggers/destinations/{name}', 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/destinations/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'is_default' => true,
'max_consecutive_failures' => 123
]),
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/destinations/{name}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"is_default\": true,\n \"max_consecutive_failures\": 123\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.engini.io/v1/triggers/destinations/{name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"is_default\": true,\n \"max_consecutive_failures\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/triggers/destinations/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"is_default\": true,\n \"max_consecutive_failures\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"url": "<string>",
"status": "active",
"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"
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Update destination
Every field is optional; an absent field is left alone. Re-pointing the url does NOT change the signing secret, so an existing receiver keeps verifying.
Setting status to active is how an auto-disabled destination is re-enabled; it also resets the consecutive-failure counter, without which the next single failure would immediately disable it again. is_default: false is rejected - promote the replacement instead, which demotes this one.
curl --request PATCH \
--url https://api.engini.io/v1/triggers/destinations/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"is_default": true,
"max_consecutive_failures": 123
}
'import requests
url = "https://api.engini.io/v1/triggers/destinations/{name}"
payload = {
"url": "<string>",
"is_default": True,
"max_consecutive_failures": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', is_default: true, max_consecutive_failures: 123})
};
fetch('https://api.engini.io/v1/triggers/destinations/{name}', 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/destinations/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'is_default' => true,
'max_consecutive_failures' => 123
]),
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/destinations/{name}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"is_default\": true,\n \"max_consecutive_failures\": 123\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.engini.io/v1/triggers/destinations/{name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"is_default\": true,\n \"max_consecutive_failures\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/triggers/destinations/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"is_default\": true,\n \"max_consecutive_failures\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"url": "<string>",
"status": "active",
"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"
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Authorizations
Enter your JWT token
Path Parameters
The destination's name.
Body
The fields to change. Absent fields are left alone.
PATCH /v1/triggers/destinations/{name} - every field optional, absent means "leave alone".
Re-point the endpoint. Re-validated by the SSRF guard; the signing secret is unchanged.
Promote to the account default. false is REJECTED rather than demoting: an account must always have exactly one default, and demoting without naming a replacement would leave none. Promote the intended replacement instead.
Set to active to re-enable an auto-disabled endpoint. This also resets consecutive_failures to zero - without that the counter would still be at its maximum and the very next failure would re-disable the destination, which reads as "re-enabling does not work". auto_disabled is not settable by hand.
active, auto_disabled Response
The updated destination.
A named HTTP endpoint Engini delivers trigger events to. The signing secret is never included here - it is shown once, when the destination is created or its secret is rotated.
The numeric id, which is what POST /v1/triggers's destination_id takes. Routes address destinations by Name; this is here so a caller can bind a trigger to one without a second lookup.
Slug, unique per account among live destinations.
Whether a destination is currently accepting deliveries. Engini disables one automatically after too many consecutive failures; updating the destination enables it again.
active, auto_disabled True on the one destination that receives events from triggers naming no destination.
Consecutive DEAD-LETTERED events, not failed attempts. Reset to zero by any successful delivery and by re-enabling the destination.
How many consecutive dead-letters auto-disable this endpoint.
Why the last delivery failed, sanitised for a tenant to read - a status code and reason, never a stack trace or an internal host.