cURL
curl 'https://api.gumloop.com/api/v1/agents/abc123DEFghiJKL/triggers' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'from gumloop import Gumloop
client = Gumloop(access_token="YOUR_ACCESS_TOKEN")
response = client.agents.list_triggers("abc123DEFghiJKL")
for trigger in response.triggers:
print(trigger.type, trigger.name, trigger.enabled)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gumloop.com/api/v1/agents/{agent_id}/triggers', 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.gumloop.com/api/v1/agents/{agent_id}/triggers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gumloop.com/api/v1/agents/{agent_id}/triggers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gumloop.com/api/v1/agents/{agent_id}/triggers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gumloop.com/api/v1/agents/{agent_id}/triggers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"agent_id": "<string>",
"triggers": [
{
"id": "trg_7f1a2b",
"agent_id": "abc123DEFghiJKL",
"type": "schedule",
"name": "<string>",
"prompt": "<string>",
"cron_expression": "0 9 * * 1-5",
"run_at": "2023-11-07T05:31:56Z",
"timezone": "America/Los_Angeles",
"pass_raw_data": true,
"enabled": true,
"status": "<string>",
"max_failures": 123,
"webhook_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_run_at": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<string>"
}List agent triggers
Triggers on the agent, newest first, using the shared cursor contract (page_size, cursor, next_cursor). Every trigger type is listed; only schedule and webhook can be created or edited through the API.
Webhook URLs are not included. Fetch one with GET /agents/{agent_id}/triggers/{trigger_id}/webhook-url.
GET
/
agents
/
{agent_id}
/
triggers
cURL
curl 'https://api.gumloop.com/api/v1/agents/abc123DEFghiJKL/triggers' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'from gumloop import Gumloop
client = Gumloop(access_token="YOUR_ACCESS_TOKEN")
response = client.agents.list_triggers("abc123DEFghiJKL")
for trigger in response.triggers:
print(trigger.type, trigger.name, trigger.enabled)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gumloop.com/api/v1/agents/{agent_id}/triggers', 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.gumloop.com/api/v1/agents/{agent_id}/triggers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gumloop.com/api/v1/agents/{agent_id}/triggers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gumloop.com/api/v1/agents/{agent_id}/triggers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gumloop.com/api/v1/agents/{agent_id}/triggers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"agent_id": "<string>",
"triggers": [
{
"id": "trg_7f1a2b",
"agent_id": "abc123DEFghiJKL",
"type": "schedule",
"name": "<string>",
"prompt": "<string>",
"cron_expression": "0 9 * * 1-5",
"run_at": "2023-11-07T05:31:56Z",
"timezone": "America/Los_Angeles",
"pass_raw_data": true,
"enabled": true,
"status": "<string>",
"max_failures": 123,
"webhook_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_run_at": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<string>"
}Authorizations
Path Parameters
ID of the agent. Also accepts the reserved aliases gumball and analytics.
Was this page helpful?