Partially update a sub-agent
curl --request PATCH \
--url https://api.starleads.co/SubAgent/{subAgentId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"displayName": "<string>",
"description": "<string>",
"avatar": "<string>",
"systemPrompt": "<string>",
"model": "<string>",
"toolIds": [
"<string>"
],
"params": {},
"timeout": 300,
"maxDurationS": 300,
"inactivityExpirationMin": 5040,
"hardDeadlineUtc": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
]
}
'import requests
url = "https://api.starleads.co/SubAgent/{subAgentId}"
payload = {
"name": "<string>",
"displayName": "<string>",
"description": "<string>",
"avatar": "<string>",
"systemPrompt": "<string>",
"model": "<string>",
"toolIds": ["<string>"],
"params": {},
"timeout": 300,
"maxDurationS": 300,
"inactivityExpirationMin": 5040,
"hardDeadlineUtc": "2023-11-07T05:31:56Z",
"tags": ["<string>"]
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
displayName: '<string>',
description: '<string>',
avatar: '<string>',
systemPrompt: '<string>',
model: '<string>',
toolIds: ['<string>'],
params: {},
timeout: 300,
maxDurationS: 300,
inactivityExpirationMin: 5040,
hardDeadlineUtc: '2023-11-07T05:31:56Z',
tags: ['<string>']
})
};
fetch('https://api.starleads.co/SubAgent/{subAgentId}', 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.starleads.co/SubAgent/{subAgentId}",
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>',
'displayName' => '<string>',
'description' => '<string>',
'avatar' => '<string>',
'systemPrompt' => '<string>',
'model' => '<string>',
'toolIds' => [
'<string>'
],
'params' => [
],
'timeout' => 300,
'maxDurationS' => 300,
'inactivityExpirationMin' => 5040,
'hardDeadlineUtc' => '2023-11-07T05:31:56Z',
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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.starleads.co/SubAgent/{subAgentId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"displayName\": \"<string>\",\n \"description\": \"<string>\",\n \"avatar\": \"<string>\",\n \"systemPrompt\": \"<string>\",\n \"model\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"params\": {},\n \"timeout\": 300,\n \"maxDurationS\": 300,\n \"inactivityExpirationMin\": 5040,\n \"hardDeadlineUtc\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.starleads.co/SubAgent/{subAgentId}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"displayName\": \"<string>\",\n \"description\": \"<string>\",\n \"avatar\": \"<string>\",\n \"systemPrompt\": \"<string>\",\n \"model\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"params\": {},\n \"timeout\": 300,\n \"maxDurationS\": 300,\n \"inactivityExpirationMin\": 5040,\n \"hardDeadlineUtc\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.starleads.co/SubAgent/{subAgentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"displayName\": \"<string>\",\n \"description\": \"<string>\",\n \"avatar\": \"<string>\",\n \"systemPrompt\": \"<string>\",\n \"model\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"params\": {},\n \"timeout\": 300,\n \"maxDurationS\": 300,\n \"inactivityExpirationMin\": 5040,\n \"hardDeadlineUtc\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"displayName": "<string>",
"description": "<string>",
"avatar": "<string>",
"systemPrompt": "<string>",
"model": "<string>",
"toolIds": [
"<string>"
],
"params": {},
"timeout": 123,
"maxDurationS": 123,
"inactivityExpirationMin": 123,
"hardDeadlineUtc": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Sub-agents
Partially update a sub-agent
Changes only the fields sent in the body; the others keep their current value. Typical use: update the system prompt without touching the tools. Send an empty string to clear avatar or model. Lists and dictionaries (toolIds, params, tags) are replaced as a whole. A body with no field is refused with 400.
PATCH
/
SubAgent
/
{subAgentId}
Partially update a sub-agent
curl --request PATCH \
--url https://api.starleads.co/SubAgent/{subAgentId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"displayName": "<string>",
"description": "<string>",
"avatar": "<string>",
"systemPrompt": "<string>",
"model": "<string>",
"toolIds": [
"<string>"
],
"params": {},
"timeout": 300,
"maxDurationS": 300,
"inactivityExpirationMin": 5040,
"hardDeadlineUtc": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
]
}
'import requests
url = "https://api.starleads.co/SubAgent/{subAgentId}"
payload = {
"name": "<string>",
"displayName": "<string>",
"description": "<string>",
"avatar": "<string>",
"systemPrompt": "<string>",
"model": "<string>",
"toolIds": ["<string>"],
"params": {},
"timeout": 300,
"maxDurationS": 300,
"inactivityExpirationMin": 5040,
"hardDeadlineUtc": "2023-11-07T05:31:56Z",
"tags": ["<string>"]
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
displayName: '<string>',
description: '<string>',
avatar: '<string>',
systemPrompt: '<string>',
model: '<string>',
toolIds: ['<string>'],
params: {},
timeout: 300,
maxDurationS: 300,
inactivityExpirationMin: 5040,
hardDeadlineUtc: '2023-11-07T05:31:56Z',
tags: ['<string>']
})
};
fetch('https://api.starleads.co/SubAgent/{subAgentId}', 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.starleads.co/SubAgent/{subAgentId}",
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>',
'displayName' => '<string>',
'description' => '<string>',
'avatar' => '<string>',
'systemPrompt' => '<string>',
'model' => '<string>',
'toolIds' => [
'<string>'
],
'params' => [
],
'timeout' => 300,
'maxDurationS' => 300,
'inactivityExpirationMin' => 5040,
'hardDeadlineUtc' => '2023-11-07T05:31:56Z',
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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.starleads.co/SubAgent/{subAgentId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"displayName\": \"<string>\",\n \"description\": \"<string>\",\n \"avatar\": \"<string>\",\n \"systemPrompt\": \"<string>\",\n \"model\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"params\": {},\n \"timeout\": 300,\n \"maxDurationS\": 300,\n \"inactivityExpirationMin\": 5040,\n \"hardDeadlineUtc\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.starleads.co/SubAgent/{subAgentId}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"displayName\": \"<string>\",\n \"description\": \"<string>\",\n \"avatar\": \"<string>\",\n \"systemPrompt\": \"<string>\",\n \"model\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"params\": {},\n \"timeout\": 300,\n \"maxDurationS\": 300,\n \"inactivityExpirationMin\": 5040,\n \"hardDeadlineUtc\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.starleads.co/SubAgent/{subAgentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"displayName\": \"<string>\",\n \"description\": \"<string>\",\n \"avatar\": \"<string>\",\n \"systemPrompt\": \"<string>\",\n \"model\": \"<string>\",\n \"toolIds\": [\n \"<string>\"\n ],\n \"params\": {},\n \"timeout\": 300,\n \"maxDurationS\": 300,\n \"inactivityExpirationMin\": 5040,\n \"hardDeadlineUtc\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"displayName": "<string>",
"description": "<string>",
"avatar": "<string>",
"systemPrompt": "<string>",
"model": "<string>",
"toolIds": [
"<string>"
],
"params": {},
"timeout": 123,
"maxDurationS": 123,
"inactivityExpirationMin": 123,
"hardDeadlineUtc": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Body
application/jsontext/jsonapplication/*+json
Partial update of a sub-agent. Only the fields provided are changed, the others keep their current value. Send an empty string to clear avatar or model. Lists and dictionaries are replaced as a whole.
Response
Success
Full configuration of a sub-agent. Workspace files, code execution and the per-message command are managed from the Starleads interface and are not exposed here.

