curl --request PUT \
--url https://api.visiqlabs.com/allow/agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"mode_by_operation": {},
"owner_email": "jsmith@example.com",
"trust_tier": "<string>",
"categories": [
"<string>"
],
"business_function": "<string>",
"business_functions": [
"<string>"
]
}
'import requests
url = "https://api.visiqlabs.com/allow/agents/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"mode_by_operation": {},
"owner_email": "jsmith@example.com",
"trust_tier": "<string>",
"categories": ["<string>"],
"business_function": "<string>",
"business_functions": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
mode_by_operation: {},
owner_email: 'jsmith@example.com',
trust_tier: '<string>',
categories: ['<string>'],
business_function: '<string>',
business_functions: ['<string>']
})
};
fetch('https://api.visiqlabs.com/allow/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://api.visiqlabs.com/allow/agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'mode_by_operation' => [
],
'owner_email' => 'jsmith@example.com',
'trust_tier' => '<string>',
'categories' => [
'<string>'
],
'business_function' => '<string>',
'business_functions' => [
'<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.visiqlabs.com/allow/agents/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"mode_by_operation\": {},\n \"owner_email\": \"jsmith@example.com\",\n \"trust_tier\": \"<string>\",\n \"categories\": [\n \"<string>\"\n ],\n \"business_function\": \"<string>\",\n \"business_functions\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.visiqlabs.com/allow/agents/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"mode_by_operation\": {},\n \"owner_email\": \"jsmith@example.com\",\n \"trust_tier\": \"<string>\",\n \"categories\": [\n \"<string>\"\n ],\n \"business_function\": \"<string>\",\n \"business_functions\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/allow/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"mode_by_operation\": {},\n \"owner_email\": \"jsmith@example.com\",\n \"trust_tier\": \"<string>\",\n \"categories\": [\n \"<string>\"\n ],\n \"business_function\": \"<string>\",\n \"business_functions\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "<string>",
"name": "<string>",
"description": "<string>",
"mode": "enforce",
"mode_by_operation": {
"action": "enforce",
"retrieval": "enforce",
"delegation": "enforce"
},
"owner_email": "<string>",
"hitl_pathway": "<string>",
"agent_os": "<string>",
"agent_hostname": "<string>",
"agent_ip": "<string>",
"agent_username": "<string>",
"trust_tier": "<string>",
"categories": [
"<string>"
],
"business_function": "<string>",
"business_functions": [
"<string>"
],
"business_function_source": "<string>",
"no_coverage": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Invalid request body",
"code": "invalid_request",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized",
"code": "unauthenticated"
}{
"error": "insufficient_scope",
"code": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}{
"error": "Rule not found",
"code": "not_found"
}{
"error": "<string>",
"code": "<string>",
"detail": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"detail": "<string>",
"details": [
{}
]
}{
"error": "rate_limiter_unavailable",
"code": "rate_limiter_unavailable",
"detail": "Rate limiter unavailable, please retry."
}Update an agent
Partially update an agent. Setting mode to null clears the per-agent override so it inherits the account default. At least one field is required. Requires permission allow_agents:update.
curl --request PUT \
--url https://api.visiqlabs.com/allow/agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"mode_by_operation": {},
"owner_email": "jsmith@example.com",
"trust_tier": "<string>",
"categories": [
"<string>"
],
"business_function": "<string>",
"business_functions": [
"<string>"
]
}
'import requests
url = "https://api.visiqlabs.com/allow/agents/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"mode_by_operation": {},
"owner_email": "jsmith@example.com",
"trust_tier": "<string>",
"categories": ["<string>"],
"business_function": "<string>",
"business_functions": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
mode_by_operation: {},
owner_email: 'jsmith@example.com',
trust_tier: '<string>',
categories: ['<string>'],
business_function: '<string>',
business_functions: ['<string>']
})
};
fetch('https://api.visiqlabs.com/allow/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://api.visiqlabs.com/allow/agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'mode_by_operation' => [
],
'owner_email' => 'jsmith@example.com',
'trust_tier' => '<string>',
'categories' => [
'<string>'
],
'business_function' => '<string>',
'business_functions' => [
'<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.visiqlabs.com/allow/agents/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"mode_by_operation\": {},\n \"owner_email\": \"jsmith@example.com\",\n \"trust_tier\": \"<string>\",\n \"categories\": [\n \"<string>\"\n ],\n \"business_function\": \"<string>\",\n \"business_functions\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.visiqlabs.com/allow/agents/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"mode_by_operation\": {},\n \"owner_email\": \"jsmith@example.com\",\n \"trust_tier\": \"<string>\",\n \"categories\": [\n \"<string>\"\n ],\n \"business_function\": \"<string>\",\n \"business_functions\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/allow/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"mode_by_operation\": {},\n \"owner_email\": \"jsmith@example.com\",\n \"trust_tier\": \"<string>\",\n \"categories\": [\n \"<string>\"\n ],\n \"business_function\": \"<string>\",\n \"business_functions\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "<string>",
"name": "<string>",
"description": "<string>",
"mode": "enforce",
"mode_by_operation": {
"action": "enforce",
"retrieval": "enforce",
"delegation": "enforce"
},
"owner_email": "<string>",
"hitl_pathway": "<string>",
"agent_os": "<string>",
"agent_hostname": "<string>",
"agent_ip": "<string>",
"agent_username": "<string>",
"trust_tier": "<string>",
"categories": [
"<string>"
],
"business_function": "<string>",
"business_functions": [
"<string>"
],
"business_function_source": "<string>",
"no_coverage": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Invalid request body",
"code": "invalid_request",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized",
"code": "unauthenticated"
}{
"error": "insufficient_scope",
"code": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}{
"error": "Rule not found",
"code": "not_found"
}{
"error": "<string>",
"code": "<string>",
"detail": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"detail": "<string>",
"details": [
{}
]
}{
"error": "rate_limiter_unavailable",
"code": "rate_limiter_unavailable",
"detail": "Rate limiter unavailable, please retry."
}Authorizations
A VisIQ API key presented as Authorization: Bearer vq_prod_.... Mint harness keys under Settings → Harness Keys and API keys under Settings → API Keys in the dashboard.
Headers
Optional. Makes this write safe to retry: a repeat with the same key, method, path (including its query string) and body within 24 hours returns the stored response with X-Idempotent-Replayed: true instead of running again. Reusing the key with a different request is a 422; a repeat while the first is still running is a 409, until the first request's 2-minute processing lease expires, after which the repeat runs. See REST conventions.
1 - 256^[A-Za-z0-9_-]+$The legacy spelling of Idempotency-Key, accepted with the same behaviour. Sending both with different values is a 400.
1 - 256^[A-Za-z0-9_-]+$Path Parameters
The agent's row UUID (not the human-readable agent_id).
Body
1 - 2551000enforce, monitor, off, null Per-operation mode overrides (any subset of the three keys).
Show child attributes
Show child attributes
320slack, teams, email, null One of the closed business-function ids.
ai, user open, closed, null Per-agent override of what happens when the engine cannot decide. null uses the organization default.
open, closed, null Response
The updated agent.
enforce, monitor, off, null Per-operation mode overrides (any subset of the three keys).
Show child attributes
Show child attributes