Share Agent with Team Members
curl --request POST \
--url https://be.datagol.ai/noCo/api/v2/elementPermissions/bulk \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--data '
{
"permissions": [
{
"elementId": "7bf5f4d6-743d-414f-aa4a-96f7a20ce0fd",
"elementType": "CUSTOM_AGENT",
"userId": 935,
"permission": "CREATOR"
}
]
}
'import requests
url = "https://be.datagol.ai/noCo/api/v2/elementPermissions/bulk"
payload = { "permissions": [
{
"elementId": "7bf5f4d6-743d-414f-aa4a-96f7a20ce0fd",
"elementType": "CUSTOM_AGENT",
"userId": 935,
"permission": "CREATOR"
}
] }
headers = {
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-auth-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
permissions: [
{
elementId: '7bf5f4d6-743d-414f-aa4a-96f7a20ce0fd',
elementType: 'CUSTOM_AGENT',
userId: 935,
permission: 'CREATOR'
}
]
})
};
fetch('https://be.datagol.ai/noCo/api/v2/elementPermissions/bulk', 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://be.datagol.ai/noCo/api/v2/elementPermissions/bulk",
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([
'permissions' => [
[
'elementId' => '7bf5f4d6-743d-414f-aa4a-96f7a20ce0fd',
'elementType' => 'CUSTOM_AGENT',
'userId' => 935,
'permission' => 'CREATOR'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <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://be.datagol.ai/noCo/api/v2/elementPermissions/bulk"
payload := strings.NewReader("{\n \"permissions\": [\n {\n \"elementId\": \"7bf5f4d6-743d-414f-aa4a-96f7a20ce0fd\",\n \"elementType\": \"CUSTOM_AGENT\",\n \"userId\": 935,\n \"permission\": \"CREATOR\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-auth-token", "<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.post("https://be.datagol.ai/noCo/api/v2/elementPermissions/bulk")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"permissions\": [\n {\n \"elementId\": \"7bf5f4d6-743d-414f-aa4a-96f7a20ce0fd\",\n \"elementType\": \"CUSTOM_AGENT\",\n \"userId\": 935,\n \"permission\": \"CREATOR\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://be.datagol.ai/noCo/api/v2/elementPermissions/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissions\": [\n {\n \"elementId\": \"7bf5f4d6-743d-414f-aa4a-96f7a20ce0fd\",\n \"elementType\": \"CUSTOM_AGENT\",\n \"userId\": 935,\n \"permission\": \"CREATOR\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyShare Agent (Bulk Permissions)
Grants one or more users access to a Custom Agent in a single atomic operation. Supports VIEWER, EDITOR, and CREATOR permission levels.
POST
/
noCo
/
api
/
v2
/
elementPermissions
/
bulk
Share Agent with Team Members
curl --request POST \
--url https://be.datagol.ai/noCo/api/v2/elementPermissions/bulk \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--data '
{
"permissions": [
{
"elementId": "7bf5f4d6-743d-414f-aa4a-96f7a20ce0fd",
"elementType": "CUSTOM_AGENT",
"userId": 935,
"permission": "CREATOR"
}
]
}
'import requests
url = "https://be.datagol.ai/noCo/api/v2/elementPermissions/bulk"
payload = { "permissions": [
{
"elementId": "7bf5f4d6-743d-414f-aa4a-96f7a20ce0fd",
"elementType": "CUSTOM_AGENT",
"userId": 935,
"permission": "CREATOR"
}
] }
headers = {
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-auth-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
permissions: [
{
elementId: '7bf5f4d6-743d-414f-aa4a-96f7a20ce0fd',
elementType: 'CUSTOM_AGENT',
userId: 935,
permission: 'CREATOR'
}
]
})
};
fetch('https://be.datagol.ai/noCo/api/v2/elementPermissions/bulk', 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://be.datagol.ai/noCo/api/v2/elementPermissions/bulk",
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([
'permissions' => [
[
'elementId' => '7bf5f4d6-743d-414f-aa4a-96f7a20ce0fd',
'elementType' => 'CUSTOM_AGENT',
'userId' => 935,
'permission' => 'CREATOR'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <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://be.datagol.ai/noCo/api/v2/elementPermissions/bulk"
payload := strings.NewReader("{\n \"permissions\": [\n {\n \"elementId\": \"7bf5f4d6-743d-414f-aa4a-96f7a20ce0fd\",\n \"elementType\": \"CUSTOM_AGENT\",\n \"userId\": 935,\n \"permission\": \"CREATOR\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-auth-token", "<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.post("https://be.datagol.ai/noCo/api/v2/elementPermissions/bulk")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"permissions\": [\n {\n \"elementId\": \"7bf5f4d6-743d-414f-aa4a-96f7a20ce0fd\",\n \"elementType\": \"CUSTOM_AGENT\",\n \"userId\": 935,\n \"permission\": \"CREATOR\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://be.datagol.ai/noCo/api/v2/elementPermissions/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissions\": [\n {\n \"elementId\": \"7bf5f4d6-743d-414f-aa4a-96f7a20ce0fd\",\n \"elementType\": \"CUSTOM_AGENT\",\n \"userId\": 935,\n \"permission\": \"CREATOR\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
ServiceAccountAuthBearerAuth
For server-to-server or automated access, use a DataGOL Service Account key.
Pass it via the x-auth-token header instead of Authorization:
x-auth-token: <service-account-key>
Body
application/json
Show child attributes
Show child attributes
Response
Permissions applied successfully.
⌘I