from engini import Engini
client = Engini() # reads ENGINI_API_KEY
client.triggers.update("ti_DG9q7IlQO0MeghC4IEzP19", poll_interval_minutes=15)import { Engini } from "@engini/sdk";
const client = new Engini(); // reads ENGINI_API_KEY
await client.triggers.update("ti_DG9q7IlQO0MeghC4IEzP19", { pollIntervalMinutes: 15 });curl --request PATCH \
--url https://api.engini.io/v1/triggers/{triggerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": 123,
"connection_name": "<string>",
"config": null,
"schedule": {
"interval": 123,
"start_date": "2023-11-07T05:31:56Z",
"start_time": "<string>",
"week_days": [
123
],
"time_frames": [
{
"start_hour": "<string>",
"end_hour": "<string>",
"every_minutes": 123
}
],
"effective": {
"interval": 123,
"clamped": true,
"min_interval_minutes": 123
}
},
"poll_interval_minutes": 123,
"listen_columns": [
"<string>"
],
"destination_id": 123,
"dedupe_window_hours": 123
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connection_id: 123,
connection_name: '<string>',
config: null,
schedule: {
interval: 123,
start_date: '2023-11-07T05:31:56Z',
start_time: '<string>',
week_days: [123],
time_frames: [{start_hour: '<string>', end_hour: '<string>', every_minutes: 123}],
effective: {interval: 123, clamped: true, min_interval_minutes: 123}
},
poll_interval_minutes: 123,
listen_columns: ['<string>'],
destination_id: 123,
dedupe_window_hours: 123
})
};
fetch('https://api.engini.io/v1/triggers/{triggerId}', 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}",
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([
'connection_id' => 123,
'connection_name' => '<string>',
'config' => null,
'schedule' => [
'interval' => 123,
'start_date' => '2023-11-07T05:31:56Z',
'start_time' => '<string>',
'week_days' => [
123
],
'time_frames' => [
[
'start_hour' => '<string>',
'end_hour' => '<string>',
'every_minutes' => 123
]
],
'effective' => [
'interval' => 123,
'clamped' => true,
'min_interval_minutes' => 123
]
],
'poll_interval_minutes' => 123,
'listen_columns' => [
'<string>'
],
'destination_id' => 123,
'dedupe_window_hours' => 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/{triggerId}"
payload := strings.NewReader("{\n \"connection_id\": 123,\n \"connection_name\": \"<string>\",\n \"config\": null,\n \"schedule\": {\n \"interval\": 123,\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"<string>\",\n \"week_days\": [\n 123\n ],\n \"time_frames\": [\n {\n \"start_hour\": \"<string>\",\n \"end_hour\": \"<string>\",\n \"every_minutes\": 123\n }\n ],\n \"effective\": {\n \"interval\": 123,\n \"clamped\": true,\n \"min_interval_minutes\": 123\n }\n },\n \"poll_interval_minutes\": 123,\n \"listen_columns\": [\n \"<string>\"\n ],\n \"destination_id\": 123,\n \"dedupe_window_hours\": 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/{triggerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": 123,\n \"connection_name\": \"<string>\",\n \"config\": null,\n \"schedule\": {\n \"interval\": 123,\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"<string>\",\n \"week_days\": [\n 123\n ],\n \"time_frames\": [\n {\n \"start_hour\": \"<string>\",\n \"end_hour\": \"<string>\",\n \"every_minutes\": 123\n }\n ],\n \"effective\": {\n \"interval\": 123,\n \"clamped\": true,\n \"min_interval_minutes\": 123\n }\n },\n \"poll_interval_minutes\": 123,\n \"listen_columns\": [\n \"<string>\"\n ],\n \"destination_id\": 123,\n \"dedupe_window_hours\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/triggers/{triggerId}")
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 \"connection_id\": 123,\n \"connection_name\": \"<string>\",\n \"config\": null,\n \"schedule\": {\n \"interval\": 123,\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"<string>\",\n \"week_days\": [\n 123\n ],\n \"time_frames\": [\n {\n \"start_hour\": \"<string>\",\n \"end_hour\": \"<string>\",\n \"every_minutes\": 123\n }\n ],\n \"effective\": {\n \"interval\": 123,\n \"clamped\": true,\n \"min_interval_minutes\": 123\n }\n },\n \"poll_interval_minutes\": 123,\n \"listen_columns\": [\n \"<string>\"\n ],\n \"destination_id\": 123,\n \"dedupe_window_hours\": 123\n}"
response = http.request(request)
puts response.read_body{
"kind": "api",
"status": "enabled",
"id": "<string>",
"workspace": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"environment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>"
},
"trigger_slug": "<string>",
"connection_id": 123,
"activity_id": 123,
"destination_id": 123,
"dedupe_window_hours": 123,
"status_reason": "max_consecutive_failures",
"blocked_since": "2023-11-07T05:31:56Z",
"last_event_at": "2023-11-07T05:31:56Z",
"last_error_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"next_run_at": "2023-11-07T05:31:56Z",
"subscription_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"config": "<unknown>",
"schedule": {
"frequency": "seconds",
"interval": 123,
"start_date": "2023-11-07T05:31:56Z",
"start_time": "<string>",
"week_days": [
123
],
"time_frames": [
{
"start_hour": "<string>",
"end_hour": "<string>",
"every_minutes": 123
}
],
"effective": {
"frequency": "seconds",
"interval": 123,
"clamped": true,
"min_interval_minutes": 123
}
},
"listen_columns": [
"<string>"
],
"webhook_url": "<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>"
}
]
}Update trigger
An omitted field is left alone, never cleared. A change to config (which carries eventtype), listen_columns or connection_id/connection_name moves the provider subscription key, so the trigger is unsubscribed and re-subscribed; a change to only destination_id or dedupe_window_hours is delivery-side and touches nothing at the provider.
connection_id RE-POINTS WITHIN THE SAME APPLICATION ONLY. Across applications there is no such thing as “the same trigger” - trigger_slug is not portable between them - so a cross-application connection is rejected; DELETE + POST is the correct path there, and losing the ti_ id is right because it genuinely is a new subscription. This is the same application-ownership rule create itself enforces, applied to a second entry point, not a new one.
THIS CLEARS NEITHER status: errored NOR its status_reason - it only says WHERE to point. A prior block (including connection_deleted and trigger_type_removed) is only cleared by a subsequent enable, which is also the only place quota is re-checked. Recovering from connection_deleted is deliberately two calls: PATCH a new connection, then enable. Between them the response is honestly stale - it already carries the new connection_id next to the old status_reason, since the two describe different moments in the same recovery. Call enable next.
from engini import Engini
client = Engini() # reads ENGINI_API_KEY
client.triggers.update("ti_DG9q7IlQO0MeghC4IEzP19", poll_interval_minutes=15)import { Engini } from "@engini/sdk";
const client = new Engini(); // reads ENGINI_API_KEY
await client.triggers.update("ti_DG9q7IlQO0MeghC4IEzP19", { pollIntervalMinutes: 15 });curl --request PATCH \
--url https://api.engini.io/v1/triggers/{triggerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": 123,
"connection_name": "<string>",
"config": null,
"schedule": {
"interval": 123,
"start_date": "2023-11-07T05:31:56Z",
"start_time": "<string>",
"week_days": [
123
],
"time_frames": [
{
"start_hour": "<string>",
"end_hour": "<string>",
"every_minutes": 123
}
],
"effective": {
"interval": 123,
"clamped": true,
"min_interval_minutes": 123
}
},
"poll_interval_minutes": 123,
"listen_columns": [
"<string>"
],
"destination_id": 123,
"dedupe_window_hours": 123
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connection_id: 123,
connection_name: '<string>',
config: null,
schedule: {
interval: 123,
start_date: '2023-11-07T05:31:56Z',
start_time: '<string>',
week_days: [123],
time_frames: [{start_hour: '<string>', end_hour: '<string>', every_minutes: 123}],
effective: {interval: 123, clamped: true, min_interval_minutes: 123}
},
poll_interval_minutes: 123,
listen_columns: ['<string>'],
destination_id: 123,
dedupe_window_hours: 123
})
};
fetch('https://api.engini.io/v1/triggers/{triggerId}', 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}",
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([
'connection_id' => 123,
'connection_name' => '<string>',
'config' => null,
'schedule' => [
'interval' => 123,
'start_date' => '2023-11-07T05:31:56Z',
'start_time' => '<string>',
'week_days' => [
123
],
'time_frames' => [
[
'start_hour' => '<string>',
'end_hour' => '<string>',
'every_minutes' => 123
]
],
'effective' => [
'interval' => 123,
'clamped' => true,
'min_interval_minutes' => 123
]
],
'poll_interval_minutes' => 123,
'listen_columns' => [
'<string>'
],
'destination_id' => 123,
'dedupe_window_hours' => 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/{triggerId}"
payload := strings.NewReader("{\n \"connection_id\": 123,\n \"connection_name\": \"<string>\",\n \"config\": null,\n \"schedule\": {\n \"interval\": 123,\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"<string>\",\n \"week_days\": [\n 123\n ],\n \"time_frames\": [\n {\n \"start_hour\": \"<string>\",\n \"end_hour\": \"<string>\",\n \"every_minutes\": 123\n }\n ],\n \"effective\": {\n \"interval\": 123,\n \"clamped\": true,\n \"min_interval_minutes\": 123\n }\n },\n \"poll_interval_minutes\": 123,\n \"listen_columns\": [\n \"<string>\"\n ],\n \"destination_id\": 123,\n \"dedupe_window_hours\": 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/{triggerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": 123,\n \"connection_name\": \"<string>\",\n \"config\": null,\n \"schedule\": {\n \"interval\": 123,\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"<string>\",\n \"week_days\": [\n 123\n ],\n \"time_frames\": [\n {\n \"start_hour\": \"<string>\",\n \"end_hour\": \"<string>\",\n \"every_minutes\": 123\n }\n ],\n \"effective\": {\n \"interval\": 123,\n \"clamped\": true,\n \"min_interval_minutes\": 123\n }\n },\n \"poll_interval_minutes\": 123,\n \"listen_columns\": [\n \"<string>\"\n ],\n \"destination_id\": 123,\n \"dedupe_window_hours\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engini.io/v1/triggers/{triggerId}")
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 \"connection_id\": 123,\n \"connection_name\": \"<string>\",\n \"config\": null,\n \"schedule\": {\n \"interval\": 123,\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"<string>\",\n \"week_days\": [\n 123\n ],\n \"time_frames\": [\n {\n \"start_hour\": \"<string>\",\n \"end_hour\": \"<string>\",\n \"every_minutes\": 123\n }\n ],\n \"effective\": {\n \"interval\": 123,\n \"clamped\": true,\n \"min_interval_minutes\": 123\n }\n },\n \"poll_interval_minutes\": 123,\n \"listen_columns\": [\n \"<string>\"\n ],\n \"destination_id\": 123,\n \"dedupe_window_hours\": 123\n}"
response = http.request(request)
puts response.read_body{
"kind": "api",
"status": "enabled",
"id": "<string>",
"workspace": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"environment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>"
},
"trigger_slug": "<string>",
"connection_id": 123,
"activity_id": 123,
"destination_id": 123,
"dedupe_window_hours": 123,
"status_reason": "max_consecutive_failures",
"blocked_since": "2023-11-07T05:31:56Z",
"last_event_at": "2023-11-07T05:31:56Z",
"last_error_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"next_run_at": "2023-11-07T05:31:56Z",
"subscription_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"config": "<unknown>",
"schedule": {
"frequency": "seconds",
"interval": 123,
"start_date": "2023-11-07T05:31:56Z",
"start_time": "<string>",
"week_days": [
123
],
"time_frames": [
{
"start_hour": "<string>",
"end_hour": "<string>",
"every_minutes": 123
}
],
"effective": {
"frequency": "seconds",
"interval": 123,
"clamped": true,
"min_interval_minutes": 123
}
},
"listen_columns": [
"<string>"
],
"webhook_url": "<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
The fields to change. Omitted fields are left alone.
The wire body of PATCH /v1/triggers/{triggerId}. Every field is optional; an omitted field is left alone rather than cleared.
Response
The updated trigger instance.
A trigger instance as the API returns it. status is derived on every read, so it reflects whether the trigger is really capturing right now rather than what was last written.
Why the instance is errored. Null whenever the instance is not blocked - see TriggerStatusReason for the frozen vocabulary and the derivation ORDER.
max_consecutive_failures, activity_limit, manual, subscribe_failed, connection_deleted, trigger_type_removed Where a manual_webhook trigger's caller must POST events - the only delivery flavour with no provider subscription, so without this the caller has no way to learn the endpoint. Null for every other delivery flavour, and null until the trigger's webhook endpoint has been provisioned.