Set a team's agent permissions
curl --request PUT \
--url https://api.openworklabs.com/v1/agent-permissions/teams/{teamId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"settings": {
"commands": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"fileEdits": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"websites": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"webSearch": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localSkills": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localMcpServers": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
}
}
}
'import requests
url = "https://api.openworklabs.com/v1/agent-permissions/teams/{teamId}"
payload = { "settings": {
"commands": {
"allow": ["<string>"],
"block": ["<string>"]
},
"fileEdits": {
"allow": ["<string>"],
"block": ["<string>"]
},
"websites": {
"allow": ["<string>"],
"block": ["<string>"]
},
"webSearch": {
"allow": ["<string>"],
"block": ["<string>"]
},
"localSkills": {
"allow": ["<string>"],
"block": ["<string>"]
},
"localMcpServers": {
"allow": ["<string>"],
"block": ["<string>"]
}
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
settings: {
commands: {allow: ['<string>'], block: ['<string>']},
fileEdits: {allow: ['<string>'], block: ['<string>']},
websites: {allow: ['<string>'], block: ['<string>']},
webSearch: {allow: ['<string>'], block: ['<string>']},
localSkills: {allow: ['<string>'], block: ['<string>']},
localMcpServers: {allow: ['<string>'], block: ['<string>']}
}
})
};
fetch('https://api.openworklabs.com/v1/agent-permissions/teams/{teamId}', 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.openworklabs.com/v1/agent-permissions/teams/{teamId}",
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([
'settings' => [
'commands' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'fileEdits' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'websites' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'webSearch' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'localSkills' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'localMcpServers' => [
'allow' => [
'<string>'
],
'block' => [
'<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.openworklabs.com/v1/agent-permissions/teams/{teamId}"
payload := strings.NewReader("{\n \"settings\": {\n \"commands\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileEdits\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"websites\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"webSearch\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localSkills\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localMcpServers\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.openworklabs.com/v1/agent-permissions/teams/{teamId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {\n \"commands\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileEdits\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"websites\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"webSearch\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localSkills\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localMcpServers\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/agent-permissions/teams/{teamId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"settings\": {\n \"commands\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileEdits\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"websites\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"webSearch\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localSkills\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localMcpServers\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"policy": {
"teamId": "<string>",
"name": "<string>",
"memberCount": 0,
"settings": {
"commands": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"fileEdits": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"websites": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"webSearch": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localSkills": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localMcpServers": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
}
},
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Agent Permissions
Set a team's agent permissions
Replaces one team’s overrides. A team’s decision replaces everyone’s for its members (the strictest wins when a member is in several teams that set one), and its allowed and blocked patterns add to everyone’s. A permission left out inherits everyone’s; saving no permissions removes the team’s overrides. Requires the agent_permissions.manage permission with a recent sign-in and the Agent permissions feature.
PUT
/
v1
/
agent-permissions
/
teams
/
{teamId}
Set a team's agent permissions
curl --request PUT \
--url https://api.openworklabs.com/v1/agent-permissions/teams/{teamId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"settings": {
"commands": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"fileEdits": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"websites": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"webSearch": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localSkills": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localMcpServers": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
}
}
}
'import requests
url = "https://api.openworklabs.com/v1/agent-permissions/teams/{teamId}"
payload = { "settings": {
"commands": {
"allow": ["<string>"],
"block": ["<string>"]
},
"fileEdits": {
"allow": ["<string>"],
"block": ["<string>"]
},
"websites": {
"allow": ["<string>"],
"block": ["<string>"]
},
"webSearch": {
"allow": ["<string>"],
"block": ["<string>"]
},
"localSkills": {
"allow": ["<string>"],
"block": ["<string>"]
},
"localMcpServers": {
"allow": ["<string>"],
"block": ["<string>"]
}
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
settings: {
commands: {allow: ['<string>'], block: ['<string>']},
fileEdits: {allow: ['<string>'], block: ['<string>']},
websites: {allow: ['<string>'], block: ['<string>']},
webSearch: {allow: ['<string>'], block: ['<string>']},
localSkills: {allow: ['<string>'], block: ['<string>']},
localMcpServers: {allow: ['<string>'], block: ['<string>']}
}
})
};
fetch('https://api.openworklabs.com/v1/agent-permissions/teams/{teamId}', 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.openworklabs.com/v1/agent-permissions/teams/{teamId}",
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([
'settings' => [
'commands' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'fileEdits' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'websites' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'webSearch' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'localSkills' => [
'allow' => [
'<string>'
],
'block' => [
'<string>'
]
],
'localMcpServers' => [
'allow' => [
'<string>'
],
'block' => [
'<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.openworklabs.com/v1/agent-permissions/teams/{teamId}"
payload := strings.NewReader("{\n \"settings\": {\n \"commands\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileEdits\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"websites\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"webSearch\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localSkills\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localMcpServers\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.openworklabs.com/v1/agent-permissions/teams/{teamId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {\n \"commands\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileEdits\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"websites\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"webSearch\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localSkills\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localMcpServers\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/agent-permissions/teams/{teamId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"settings\": {\n \"commands\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"fileEdits\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"websites\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"webSearch\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localSkills\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n },\n \"localMcpServers\": {\n \"allow\": [\n \"<string>\"\n ],\n \"block\": [\n \"<string>\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"policy": {
"teamId": "<string>",
"name": "<string>",
"memberCount": 0,
"settings": {
"commands": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"fileEdits": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"websites": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"webSearch": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localSkills": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"localMcpServers": {
"decision": "allow",
"allow": [
"<string>"
],
"block": [
"<string>"
]
}
},
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
denApiKeybearerAuth
Organization API key passed as the x-api-key header. The raw key is the header value; do not prefix it with Bearer.
Path Parameters
Den TypeID with 'tem_' prefix and a 26-character base32 suffix.
Required string length:
30Body
application/json
Show child attributes
Show child attributes
Response
The team's agent permissions saved.
Show child attributes
Show child attributes
Was this page helpful?