Replace agent scoped permissions atomically
curl --request PUT \
--url https://atollhq.com/api/orgs/{id}/agents/{agentId}/permissions \
--header 'Content-Type: application/json' \
--cookie sb-%3Cproject-ref%3E-auth-token= \
--data '
{
"expected_revision": 2,
"follow_owner_projects": true,
"projects": [
{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"grants": [
{
"capability": "<string>",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "https://atollhq.com/api/orgs/{id}/agents/{agentId}/permissions"
payload = {
"expected_revision": 2,
"follow_owner_projects": True,
"projects": [{ "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }],
"grants": [
{
"capability": "<string>",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
headers = {
"cookie": "sb-%3Cproject-ref%3E-auth-token=",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {cookie: 'sb-%3Cproject-ref%3E-auth-token=', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_revision: 2,
follow_owner_projects: true,
projects: [{project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}],
grants: [{capability: '<string>', target_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}]
})
};
fetch('https://atollhq.com/api/orgs/{id}/agents/{agentId}/permissions', 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://atollhq.com/api/orgs/{id}/agents/{agentId}/permissions",
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([
'expected_revision' => 2,
'follow_owner_projects' => true,
'projects' => [
[
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'grants' => [
[
'capability' => '<string>',
'target_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
CURLOPT_COOKIE => "sb-%3Cproject-ref%3E-auth-token=",
CURLOPT_HTTPHEADER => [
"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://atollhq.com/api/orgs/{id}/agents/{agentId}/permissions"
payload := strings.NewReader("{\n \"expected_revision\": 2,\n \"follow_owner_projects\": true,\n \"projects\": [\n {\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"grants\": [\n {\n \"capability\": \"<string>\",\n \"target_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("cookie", "sb-%3Cproject-ref%3E-auth-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://atollhq.com/api/orgs/{id}/agents/{agentId}/permissions")
.header("cookie", "sb-%3Cproject-ref%3E-auth-token=")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": 2,\n \"follow_owner_projects\": true,\n \"projects\": [\n {\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"grants\": [\n {\n \"capability\": \"<string>\",\n \"target_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://atollhq.com/api/orgs/{id}/agents/{agentId}/permissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["cookie"] = 'sb-%3Cproject-ref%3E-auth-token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_revision\": 2,\n \"follow_owner_projects\": true,\n \"projects\": [\n {\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"grants\": [\n {\n \"capability\": \"<string>\",\n \"target_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyAPI Reference
Replace agent scoped permissions atomically
Verified human session and current management authority required. Agents cannot administer grants. PUT uses expected_revision and rejects stale versions or active execution conflicts with 409. No project webhook egress runtime is enabled by these grant contracts.
PUT
/
api
/
orgs
/
{id}
/
agents
/
{agentId}
/
permissions
Replace agent scoped permissions atomically
curl --request PUT \
--url https://atollhq.com/api/orgs/{id}/agents/{agentId}/permissions \
--header 'Content-Type: application/json' \
--cookie sb-%3Cproject-ref%3E-auth-token= \
--data '
{
"expected_revision": 2,
"follow_owner_projects": true,
"projects": [
{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"grants": [
{
"capability": "<string>",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "https://atollhq.com/api/orgs/{id}/agents/{agentId}/permissions"
payload = {
"expected_revision": 2,
"follow_owner_projects": True,
"projects": [{ "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }],
"grants": [
{
"capability": "<string>",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
headers = {
"cookie": "sb-%3Cproject-ref%3E-auth-token=",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {cookie: 'sb-%3Cproject-ref%3E-auth-token=', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_revision: 2,
follow_owner_projects: true,
projects: [{project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}],
grants: [{capability: '<string>', target_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}]
})
};
fetch('https://atollhq.com/api/orgs/{id}/agents/{agentId}/permissions', 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://atollhq.com/api/orgs/{id}/agents/{agentId}/permissions",
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([
'expected_revision' => 2,
'follow_owner_projects' => true,
'projects' => [
[
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'grants' => [
[
'capability' => '<string>',
'target_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
CURLOPT_COOKIE => "sb-%3Cproject-ref%3E-auth-token=",
CURLOPT_HTTPHEADER => [
"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://atollhq.com/api/orgs/{id}/agents/{agentId}/permissions"
payload := strings.NewReader("{\n \"expected_revision\": 2,\n \"follow_owner_projects\": true,\n \"projects\": [\n {\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"grants\": [\n {\n \"capability\": \"<string>\",\n \"target_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("cookie", "sb-%3Cproject-ref%3E-auth-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://atollhq.com/api/orgs/{id}/agents/{agentId}/permissions")
.header("cookie", "sb-%3Cproject-ref%3E-auth-token=")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": 2,\n \"follow_owner_projects\": true,\n \"projects\": [\n {\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"grants\": [\n {\n \"capability\": \"<string>\",\n \"target_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://atollhq.com/api/orgs/{id}/agents/{agentId}/permissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["cookie"] = 'sb-%3Cproject-ref%3E-auth-token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_revision\": 2,\n \"follow_owner_projects\": true,\n \"projects\": [\n {\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"grants\": [\n {\n \"capability\": \"<string>\",\n \"target_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Authenticated Supabase web session for a human Atoll user. The cookie name includes the deployment's Supabase project reference and may be chunked.
Body
application/json
Response
Current explicit grants, owner project following, effective project sources, revision and edit capabilities

