Fetch a scheduled agent (+ planBlocked, last run)
curl --request GET \
--url https://origami.chat/api/v2/scheduled-agents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://origami.chat/api/v2/scheduled-agents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://origami.chat/api/v2/scheduled-agents/{id}', 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://origami.chat/api/v2/scheduled-agents/{id}",
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://origami.chat/api/v2/scheduled-agents/{id}"
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://origami.chat/api/v2/scheduled-agents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://origami.chat/api/v2/scheduled-agents/{id}")
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{
"object": "scheduled_agent",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"prompt": "<string>",
"cron": "<string>",
"model": "<string>",
"enabled": true,
"budgetCredits": 2,
"planBlocked": true,
"nextRunAt": "2023-11-07T05:31:56Z",
"lastRunAt": "2023-11-07T05:31:56Z",
"url": "<string>",
"handoff": {}
}Scheduled agents
Fetch a scheduled agent (+ planBlocked, last run)
GET
/
scheduled-agents
/
{id}
Fetch a scheduled agent (+ planBlocked, last run)
curl --request GET \
--url https://origami.chat/api/v2/scheduled-agents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://origami.chat/api/v2/scheduled-agents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://origami.chat/api/v2/scheduled-agents/{id}', 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://origami.chat/api/v2/scheduled-agents/{id}",
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://origami.chat/api/v2/scheduled-agents/{id}"
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://origami.chat/api/v2/scheduled-agents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://origami.chat/api/v2/scheduled-agents/{id}")
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{
"object": "scheduled_agent",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"prompt": "<string>",
"cron": "<string>",
"model": "<string>",
"enabled": true,
"budgetCredits": 2,
"planBlocked": true,
"nextRunAt": "2023-11-07T05:31:56Z",
"lastRunAt": "2023-11-07T05:31:56Z",
"url": "<string>",
"handoff": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
The scheduled agent.
Allowed value:
"scheduled_agent"Deprecated container anchor - the legacy workspace, else the origin chat session whose links seed each run; null for container-less agents.
Hard per-run credit budget (whole credits). Each run of this agent is capped at this many credits and stops spending once it hits it. Null means no cap. Size it to comfortably cover the leads a run is expected to fetch (cost-per-lead × expected leads, plus margin).
Required range:
x >= 1True when the org cannot currently run scheduled tasks (gated at dispatch).
Present when planBlocked; points the caller at the upgrade flow.