curl --request PATCH \
--url https://api.example.com/api/v1/teams/{team_id}/cycle/loops/{loop_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"agent_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phase": "<string>",
"parent_loop_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cadence": {
"every_n_days": 2,
"days": [
123
],
"time": "09:00"
},
"task_type": "<string>",
"task_template": {},
"sort_order": 123,
"is_active": true,
"content_source": {
"source_url": "<string>",
"source_type": "<string>",
"include_tags": [
"<string>"
],
"exclude_tags": [
"<string>"
],
"max_age_days": 2
}
}
'import requests
url = "https://api.example.com/api/v1/teams/{team_id}/cycle/loops/{loop_id}"
payload = {
"name": "<string>",
"agent_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phase": "<string>",
"parent_loop_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cadence": {
"every_n_days": 2,
"days": [123],
"time": "09:00"
},
"task_type": "<string>",
"task_template": {},
"sort_order": 123,
"is_active": True,
"content_source": {
"source_url": "<string>",
"source_type": "<string>",
"include_tags": ["<string>"],
"exclude_tags": ["<string>"],
"max_age_days": 2
}
}
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({
name: '<string>',
agent_member_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
phase: '<string>',
parent_loop_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cadence: {every_n_days: 2, days: [123], time: '09:00'},
task_type: '<string>',
task_template: {},
sort_order: 123,
is_active: true,
content_source: {
source_url: '<string>',
source_type: '<string>',
include_tags: ['<string>'],
exclude_tags: ['<string>'],
max_age_days: 2
}
})
};
fetch('https://api.example.com/api/v1/teams/{team_id}/cycle/loops/{loop_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://api.example.com/api/v1/teams/{team_id}/cycle/loops/{loop_id}",
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([
'name' => '<string>',
'agent_member_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'phase' => '<string>',
'parent_loop_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cadence' => [
'every_n_days' => 2,
'days' => [
123
],
'time' => '09:00'
],
'task_type' => '<string>',
'task_template' => [
],
'sort_order' => 123,
'is_active' => true,
'content_source' => [
'source_url' => '<string>',
'source_type' => '<string>',
'include_tags' => [
'<string>'
],
'exclude_tags' => [
'<string>'
],
'max_age_days' => 2
]
]),
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.example.com/api/v1/teams/{team_id}/cycle/loops/{loop_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"agent_member_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"phase\": \"<string>\",\n \"parent_loop_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cadence\": {\n \"every_n_days\": 2,\n \"days\": [\n 123\n ],\n \"time\": \"09:00\"\n },\n \"task_type\": \"<string>\",\n \"task_template\": {},\n \"sort_order\": 123,\n \"is_active\": true,\n \"content_source\": {\n \"source_url\": \"<string>\",\n \"source_type\": \"<string>\",\n \"include_tags\": [\n \"<string>\"\n ],\n \"exclude_tags\": [\n \"<string>\"\n ],\n \"max_age_days\": 2\n }\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.example.com/api/v1/teams/{team_id}/cycle/loops/{loop_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"agent_member_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"phase\": \"<string>\",\n \"parent_loop_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cadence\": {\n \"every_n_days\": 2,\n \"days\": [\n 123\n ],\n \"time\": \"09:00\"\n },\n \"task_type\": \"<string>\",\n \"task_template\": {},\n \"sort_order\": 123,\n \"is_active\": true,\n \"content_source\": {\n \"source_url\": \"<string>\",\n \"source_type\": \"<string>\",\n \"include_tags\": [\n \"<string>\"\n ],\n \"exclude_tags\": [\n \"<string>\"\n ],\n \"max_age_days\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/teams/{team_id}/cycle/loops/{loop_id}")
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 \"name\": \"<string>\",\n \"agent_member_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"phase\": \"<string>\",\n \"parent_loop_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cadence\": {\n \"every_n_days\": 2,\n \"days\": [\n 123\n ],\n \"time\": \"09:00\"\n },\n \"task_type\": \"<string>\",\n \"task_template\": {},\n \"sort_order\": 123,\n \"is_active\": true,\n \"content_source\": {\n \"source_url\": \"<string>\",\n \"source_type\": \"<string>\",\n \"include_tags\": [\n \"<string>\"\n ],\n \"exclude_tags\": [\n \"<string>\"\n ],\n \"max_age_days\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cycle_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_loop_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"agent_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phase": "<string>",
"schedule_type": "<string>",
"cadence": {},
"task_type": "<string>",
"task_template": {},
"priority": "<string>",
"sort_order": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"content_source": {
"source_url": "<string>",
"source_type": "<string>",
"include_tags": [
"<string>"
],
"exclude_tags": [
"<string>"
],
"max_age_days": 2
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Update Loop
curl --request PATCH \
--url https://api.example.com/api/v1/teams/{team_id}/cycle/loops/{loop_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"agent_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phase": "<string>",
"parent_loop_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cadence": {
"every_n_days": 2,
"days": [
123
],
"time": "09:00"
},
"task_type": "<string>",
"task_template": {},
"sort_order": 123,
"is_active": true,
"content_source": {
"source_url": "<string>",
"source_type": "<string>",
"include_tags": [
"<string>"
],
"exclude_tags": [
"<string>"
],
"max_age_days": 2
}
}
'import requests
url = "https://api.example.com/api/v1/teams/{team_id}/cycle/loops/{loop_id}"
payload = {
"name": "<string>",
"agent_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phase": "<string>",
"parent_loop_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cadence": {
"every_n_days": 2,
"days": [123],
"time": "09:00"
},
"task_type": "<string>",
"task_template": {},
"sort_order": 123,
"is_active": True,
"content_source": {
"source_url": "<string>",
"source_type": "<string>",
"include_tags": ["<string>"],
"exclude_tags": ["<string>"],
"max_age_days": 2
}
}
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({
name: '<string>',
agent_member_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
phase: '<string>',
parent_loop_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cadence: {every_n_days: 2, days: [123], time: '09:00'},
task_type: '<string>',
task_template: {},
sort_order: 123,
is_active: true,
content_source: {
source_url: '<string>',
source_type: '<string>',
include_tags: ['<string>'],
exclude_tags: ['<string>'],
max_age_days: 2
}
})
};
fetch('https://api.example.com/api/v1/teams/{team_id}/cycle/loops/{loop_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://api.example.com/api/v1/teams/{team_id}/cycle/loops/{loop_id}",
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([
'name' => '<string>',
'agent_member_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'phase' => '<string>',
'parent_loop_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cadence' => [
'every_n_days' => 2,
'days' => [
123
],
'time' => '09:00'
],
'task_type' => '<string>',
'task_template' => [
],
'sort_order' => 123,
'is_active' => true,
'content_source' => [
'source_url' => '<string>',
'source_type' => '<string>',
'include_tags' => [
'<string>'
],
'exclude_tags' => [
'<string>'
],
'max_age_days' => 2
]
]),
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.example.com/api/v1/teams/{team_id}/cycle/loops/{loop_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"agent_member_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"phase\": \"<string>\",\n \"parent_loop_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cadence\": {\n \"every_n_days\": 2,\n \"days\": [\n 123\n ],\n \"time\": \"09:00\"\n },\n \"task_type\": \"<string>\",\n \"task_template\": {},\n \"sort_order\": 123,\n \"is_active\": true,\n \"content_source\": {\n \"source_url\": \"<string>\",\n \"source_type\": \"<string>\",\n \"include_tags\": [\n \"<string>\"\n ],\n \"exclude_tags\": [\n \"<string>\"\n ],\n \"max_age_days\": 2\n }\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.example.com/api/v1/teams/{team_id}/cycle/loops/{loop_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"agent_member_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"phase\": \"<string>\",\n \"parent_loop_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cadence\": {\n \"every_n_days\": 2,\n \"days\": [\n 123\n ],\n \"time\": \"09:00\"\n },\n \"task_type\": \"<string>\",\n \"task_template\": {},\n \"sort_order\": 123,\n \"is_active\": true,\n \"content_source\": {\n \"source_url\": \"<string>\",\n \"source_type\": \"<string>\",\n \"include_tags\": [\n \"<string>\"\n ],\n \"exclude_tags\": [\n \"<string>\"\n ],\n \"max_age_days\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/teams/{team_id}/cycle/loops/{loop_id}")
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 \"name\": \"<string>\",\n \"agent_member_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"phase\": \"<string>\",\n \"parent_loop_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cadence\": {\n \"every_n_days\": 2,\n \"days\": [\n 123\n ],\n \"time\": \"09:00\"\n },\n \"task_type\": \"<string>\",\n \"task_template\": {},\n \"sort_order\": 123,\n \"is_active\": true,\n \"content_source\": {\n \"source_url\": \"<string>\",\n \"source_type\": \"<string>\",\n \"include_tags\": [\n \"<string>\"\n ],\n \"exclude_tags\": [\n \"<string>\"\n ],\n \"max_age_days\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cycle_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_loop_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"agent_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phase": "<string>",
"schedule_type": "<string>",
"cadence": {},
"task_type": "<string>",
"task_template": {},
"priority": "<string>",
"sort_order": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"content_source": {
"source_url": "<string>",
"source_type": "<string>",
"include_tags": [
"<string>"
],
"exclude_tags": [
"<string>"
],
"max_age_days": 2
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
1 - 255cadence, specific_days, signal_triggered Show child attributes
Show child attributes
critical, high, medium, low Per-loop content-driven source config (SMMT content-driven distribution).
Typed (not a raw dict) so malformed payloads are rejected at the API
boundary with a 422 rather than persisting silently and never dispatching:
cycle_scheduler._loop_content_source() only treats a loop as
content-driven when content_source is a dict carrying a non-blank
source_url, so an invalid value would look "saved" but quietly stop
distribution. source_type is auto-detected at scan time; tag/recency
rules are consumed by content_source_scanner.pick_next_item.
Show child attributes
Show child attributes
Response
Successful Response
Per-loop content-driven source config (SMMT content-driven distribution).
Typed (not a raw dict) so malformed payloads are rejected at the API
boundary with a 422 rather than persisting silently and never dispatching:
cycle_scheduler._loop_content_source() only treats a loop as
content-driven when content_source is a dict carrying a non-blank
source_url, so an invalid value would look "saved" but quietly stop
distribution. source_type is auto-detected at scan time; tag/recency
rules are consumed by content_source_scanner.pick_next_item.
Show child attributes
Show child attributes
Was this page helpful?