Create a delegation grant
curl --request POST \
--url https://api.visiqlabs.com/orchestrate/grants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"parent_agent_id": "orchestrator",
"child_agent_id": "emailer",
"tool_scope": [
"send_email"
],
"duration_seconds": 3600
}
'import requests
url = "https://api.visiqlabs.com/orchestrate/grants"
payload = {
"parent_agent_id": "orchestrator",
"child_agent_id": "emailer",
"tool_scope": ["send_email"],
"duration_seconds": 3600
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
parent_agent_id: 'orchestrator',
child_agent_id: 'emailer',
tool_scope: ['send_email'],
duration_seconds: 3600
})
};
fetch('https://api.visiqlabs.com/orchestrate/grants', 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/orchestrate/grants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'parent_agent_id' => 'orchestrator',
'child_agent_id' => 'emailer',
'tool_scope' => [
'send_email'
],
'duration_seconds' => 3600
]),
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/orchestrate/grants"
payload := strings.NewReader("{\n \"parent_agent_id\": \"orchestrator\",\n \"child_agent_id\": \"emailer\",\n \"tool_scope\": [\n \"send_email\"\n ],\n \"duration_seconds\": 3600\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.visiqlabs.com/orchestrate/grants")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"parent_agent_id\": \"orchestrator\",\n \"child_agent_id\": \"emailer\",\n \"tool_scope\": [\n \"send_email\"\n ],\n \"duration_seconds\": 3600\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/orchestrate/grants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"parent_agent_id\": \"orchestrator\",\n \"child_agent_id\": \"emailer\",\n \"tool_scope\": [\n \"send_email\"\n ],\n \"duration_seconds\": 3600\n}"
response = http.request(request)
puts response.read_body{
"grant_id": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
"status": "pending",
"effective_tool_scope": [
"send_email"
],
"effective_context_scope": null,
"accept_deadline": "2026-07-16T12:05:00Z"
}{
"error": "Invalid request body",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized"
}{
"error": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}{
"error": "Rule not found"
}{
"error": "<string>",
"detail": "<string>",
"code": "<string>",
"details": [
{}
]
}Delegation
Create a delegation grant
A parent agent creates a scoped, time-boxed delegation to a child agent. The grant starts pending and must be accepted within the accept window. Requires scope allow:write.
POST
/
orchestrate
/
grants
Create a delegation grant
curl --request POST \
--url https://api.visiqlabs.com/orchestrate/grants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"parent_agent_id": "orchestrator",
"child_agent_id": "emailer",
"tool_scope": [
"send_email"
],
"duration_seconds": 3600
}
'import requests
url = "https://api.visiqlabs.com/orchestrate/grants"
payload = {
"parent_agent_id": "orchestrator",
"child_agent_id": "emailer",
"tool_scope": ["send_email"],
"duration_seconds": 3600
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
parent_agent_id: 'orchestrator',
child_agent_id: 'emailer',
tool_scope: ['send_email'],
duration_seconds: 3600
})
};
fetch('https://api.visiqlabs.com/orchestrate/grants', 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/orchestrate/grants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'parent_agent_id' => 'orchestrator',
'child_agent_id' => 'emailer',
'tool_scope' => [
'send_email'
],
'duration_seconds' => 3600
]),
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/orchestrate/grants"
payload := strings.NewReader("{\n \"parent_agent_id\": \"orchestrator\",\n \"child_agent_id\": \"emailer\",\n \"tool_scope\": [\n \"send_email\"\n ],\n \"duration_seconds\": 3600\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.visiqlabs.com/orchestrate/grants")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"parent_agent_id\": \"orchestrator\",\n \"child_agent_id\": \"emailer\",\n \"tool_scope\": [\n \"send_email\"\n ],\n \"duration_seconds\": 3600\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/orchestrate/grants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"parent_agent_id\": \"orchestrator\",\n \"child_agent_id\": \"emailer\",\n \"tool_scope\": [\n \"send_email\"\n ],\n \"duration_seconds\": 3600\n}"
response = http.request(request)
puts response.read_body{
"grant_id": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
"status": "pending",
"effective_tool_scope": [
"send_email"
],
"effective_context_scope": null,
"accept_deadline": "2026-07-16T12:05:00Z"
}{
"error": "Invalid request body",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized"
}{
"error": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}{
"error": "Rule not found"
}{
"error": "<string>",
"detail": "<string>",
"code": "<string>",
"details": [
{}
]
}Authorizations
A VisIQ API key presented as Authorization: Bearer vq_prod_.... Mint keys under Connectors -> API Keys in the dashboard.
Body
application/json
Required string length:
1 - 255Required string length:
1 - 255Allowlist of tools the child may use. null = unrestricted; [] = deny-all.
Minimum string length:
1Minimum string length:
1Maximum string length:
2000Required range:
1 <= x <= 604800Required range:
1 <= x <= 16⌘I