Update agent settings
curl --request PATCH \
--url https://api.whirl.sh/api/v1/agents/{agentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"workspaceId": "<string>"
}
'import requests
url = "https://api.whirl.sh/api/v1/agents/{agentId}"
payload = {
"name": "<string>",
"workspaceId": "<string>"
}
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>', workspaceId: '<string>'})
};
fetch('https://api.whirl.sh/api/v1/agents/{agentId}', 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.whirl.sh/api/v1/agents/{agentId}",
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>',
'workspaceId' => '<string>'
]),
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.whirl.sh/api/v1/agents/{agentId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"workspaceId\": \"<string>\"\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.whirl.sh/api/v1/agents/{agentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"workspaceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whirl.sh/api/v1/agents/{agentId}")
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 \"workspaceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"agentId": "<string>",
"saved": true
}{
"title": "<string>",
"status": 123,
"code": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"title": "<string>",
"status": 123,
"code": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"title": "<string>",
"status": 123,
"code": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"title": "<string>",
"status": 123,
"code": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"title": "<string>",
"status": 123,
"code": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"title": "<string>",
"status": 123,
"code": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"title": "<string>",
"status": 123,
"code": "<string>",
"type": "<string>",
"detail": "<string>"
}Agent settings
Update agent settings
Change an agent’s name, icon or workspace.
PATCH
/
agents
/
{agentId}
Update agent settings
curl --request PATCH \
--url https://api.whirl.sh/api/v1/agents/{agentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"workspaceId": "<string>"
}
'import requests
url = "https://api.whirl.sh/api/v1/agents/{agentId}"
payload = {
"name": "<string>",
"workspaceId": "<string>"
}
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>', workspaceId: '<string>'})
};
fetch('https://api.whirl.sh/api/v1/agents/{agentId}', 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.whirl.sh/api/v1/agents/{agentId}",
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>',
'workspaceId' => '<string>'
]),
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.whirl.sh/api/v1/agents/{agentId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"workspaceId\": \"<string>\"\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.whirl.sh/api/v1/agents/{agentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"workspaceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whirl.sh/api/v1/agents/{agentId}")
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 \"workspaceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"agentId": "<string>",
"saved": true
}{
"title": "<string>",
"status": 123,
"code": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"title": "<string>",
"status": 123,
"code": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"title": "<string>",
"status": 123,
"code": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"title": "<string>",
"status": 123,
"code": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"title": "<string>",
"status": 123,
"code": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"title": "<string>",
"status": 123,
"code": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"title": "<string>",
"status": 123,
"code": "<string>",
"type": "<string>",
"detail": "<string>"
}Authorizations
Scopes
Body
application/json
Choose a supported icon name, not an emoji or description. Use an empty string to restore the default icon.
Available options:
brain, bot, sparkles, zap, rocket, wand, lightbulb, star, target, compass, message, mail, inbox, send, phone, headphones, lifebuoy, calendar, clipboard, file, search, chart, briefcase, wrench, bug, shield, cpu, bell, flame, heart, leaf, bird, ghost, user, users, handshake, smile, crown, graduation, stethoscope, chef, hardhat, building, store, globe, pin, home, hotel, landmark, plane, car, truck, package, hammer, palette, camera, mic, code, terminal, database, key, lock, sun, moon, cloud, snowflake, flower, paw, cat, dog, fish, gift, trophy, flag, gem, puzzle, coffee, book, megaphone, scale, piggy, 
