curl --request POST \
--url https://api.atako.ai/agents/{agentId}/integration-grants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allowedTools": [
"<string>"
],
"scope": "read",
"expiresAt": "2023-11-07T05:31:56Z",
"constraints": {}
}
'import requests
url = "https://api.atako.ai/agents/{agentId}/integration-grants"
payload = {
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allowedTools": ["<string>"],
"scope": "read",
"expiresAt": "2023-11-07T05:31:56Z",
"constraints": {}
}
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({
connectionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
allowedTools: ['<string>'],
scope: 'read',
expiresAt: '2023-11-07T05:31:56Z',
constraints: {}
})
};
fetch('https://api.atako.ai/agents/{agentId}/integration-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.atako.ai/agents/{agentId}/integration-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([
'connectionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'allowedTools' => [
'<string>'
],
'scope' => 'read',
'expiresAt' => '2023-11-07T05:31:56Z',
'constraints' => [
]
]),
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.atako.ai/agents/{agentId}/integration-grants"
payload := strings.NewReader("{\n \"connectionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowedTools\": [\n \"<string>\"\n ],\n \"scope\": \"read\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"constraints\": {}\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.atako.ai/agents/{agentId}/integration-grants")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connectionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowedTools\": [\n \"<string>\"\n ],\n \"scope\": \"read\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"constraints\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atako.ai/agents/{agentId}/integration-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 \"connectionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowedTools\": [\n \"<string>\"\n ],\n \"scope\": \"read\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"constraints\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scope": "read",
"createdAt": "2023-11-07T05:31:56Z",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allowedTools": [
"<string>"
],
"constraints": {},
"grantedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiresAt": "2023-11-07T05:31:56Z",
"connection": {
"providerKey": "<string>",
"displayName": "<string>",
"status": "active",
"visibility": "company"
},
"masked": true,
"ownerName": "<string>",
"isDefault": true
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Grant (or update) an agent's access to an integration connection
Upsert on (agentId, connectionId). Allowed for the agent’s owner or an admin of the owner’s company. A PERSONAL connection can only be granted by its creator, to an agent they own (403 personal_grant_owner_only).
curl --request POST \
--url https://api.atako.ai/agents/{agentId}/integration-grants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allowedTools": [
"<string>"
],
"scope": "read",
"expiresAt": "2023-11-07T05:31:56Z",
"constraints": {}
}
'import requests
url = "https://api.atako.ai/agents/{agentId}/integration-grants"
payload = {
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allowedTools": ["<string>"],
"scope": "read",
"expiresAt": "2023-11-07T05:31:56Z",
"constraints": {}
}
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({
connectionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
allowedTools: ['<string>'],
scope: 'read',
expiresAt: '2023-11-07T05:31:56Z',
constraints: {}
})
};
fetch('https://api.atako.ai/agents/{agentId}/integration-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.atako.ai/agents/{agentId}/integration-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([
'connectionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'allowedTools' => [
'<string>'
],
'scope' => 'read',
'expiresAt' => '2023-11-07T05:31:56Z',
'constraints' => [
]
]),
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.atako.ai/agents/{agentId}/integration-grants"
payload := strings.NewReader("{\n \"connectionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowedTools\": [\n \"<string>\"\n ],\n \"scope\": \"read\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"constraints\": {}\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.atako.ai/agents/{agentId}/integration-grants")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connectionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowedTools\": [\n \"<string>\"\n ],\n \"scope\": \"read\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"constraints\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atako.ai/agents/{agentId}/integration-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 \"connectionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"allowedTools\": [\n \"<string>\"\n ],\n \"scope\": \"read\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"constraints\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scope": "read",
"createdAt": "2023-11-07T05:31:56Z",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"allowedTools": [
"<string>"
],
"constraints": {},
"grantedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiresAt": "2023-11-07T05:31:56Z",
"connection": {
"providerKey": "<string>",
"displayName": "<string>",
"status": "active",
"visibility": "company"
},
"masked": true,
"ownerName": "<string>",
"isDefault": true
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
An aik_… programmatic API key (app.atako.ai → Settings → API keys) or a Supabase session JWT.
Path Parameters
Agent id
Body
Response
read, write, read_write Only present on the list endpoint (joined).
Show child attributes
Show child attributes
List endpoint only: true for another user's PERSONAL connection (an admin viewing a colleague's agent) — no connection name, only ownerName. Revocable, not editable.
Masked rows only: the personal connection owner's first name.
Present (true) ONLY on a SYNTHETIC row the list endpoint fabricates for a companyWide+defaultGranted connector (e.g. 'projects') when this agent has no explicit integration_grants row yet — it already has full access by default; this row lets the UI show that instead of "no access". id/connectionId both equal the connection's own id on a synthetic row (no real grant row exists) — DELETE on that id persists an opt-out (a real row with allowedTools:[]) instead of a no-op. Absent (never false) on a real row.