curl --request PUT \
--url https://api.engini.io/v1/triggers/destination \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"name": "<string>",
"max_consecutive_failures": 123
}
'import requests
url = "https://api.engini.io/v1/triggers/destination"
payload = {
"url": "<string>",
"name": "<string>",
"max_consecutive_failures": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', name: '<string>', max_consecutive_failures: 123})
};
fetch('https://api.engini.io/v1/triggers/destination', 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/destination",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'name' => '<string>',
'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/destination"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"name\": \"<string>\",\n \"max_consecutive_failures\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.engini.io/v1/triggers/destination")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"name\": \"<string>\",\n \"max_consecutive_failures\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/triggers/destination")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"name\": \"<string>\",\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"
}{
"destination": {
"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"
},
"signing_secret": "<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>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Set default destination
Creates the default destination if the account has none, and otherwise re-points the existing default at the new URL.
A SIGNING SECRET IS RETURNED ONLY WHEN THIS CALL CREATES THE DESTINATION. Repeating the call to re-point an existing default returns the destination WITHOUT a secret, and that is deliberate, not an omission: minting a fresh secret on every re-point would silently invalidate the receiver the customer already has verifying signatures. Call rotate-secret when a new secret is what you actually want. This is what keeps “the secret is returned exactly once” literally true.
curl --request PUT \
--url https://api.engini.io/v1/triggers/destination \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"name": "<string>",
"max_consecutive_failures": 123
}
'import requests
url = "https://api.engini.io/v1/triggers/destination"
payload = {
"url": "<string>",
"name": "<string>",
"max_consecutive_failures": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', name: '<string>', max_consecutive_failures: 123})
};
fetch('https://api.engini.io/v1/triggers/destination', 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/destination",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'name' => '<string>',
'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/destination"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"name\": \"<string>\",\n \"max_consecutive_failures\": 123\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.engini.io/v1/triggers/destination")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"name\": \"<string>\",\n \"max_consecutive_failures\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/triggers/destination")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"name\": \"<string>\",\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"
}{
"destination": {
"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"
},
"signing_secret": "<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>"
}
]
}{
"errorCode": "<string>",
"message": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"path": "<string>",
"details": [
{
"field": "<string>",
"issue": "<string>"
}
]
}Authorizations
Enter your JWT token
Body
The url to point the default destination at.
PUT /v1/triggers/destination - the single-destination convenience alias.
Response
The destination. A signing secret is included only when this call created it (201); a re-point returns the destination alone (200).
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.