Grant (or update) an agent's access to an integration connection
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",
"providerKey": "<string>",
"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",
"providerKey": "<string>",
"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',
providerKey: '<string>',
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',
'providerKey' => '<string>',
'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 \"providerKey\": \"<string>\",\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 \"providerKey\": \"<string>\",\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 \"providerKey\": \"<string>\",\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",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scope": "read",
"createdAt": "2023-11-07T05:31:56Z",
"allowedTools": [
"<string>"
],
"constraints": {},
"grantedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiresAt": "2023-11-07T05:31:56Z",
"connection": {
"providerKey": "<string>",
"displayName": "<string>",
"status": "active"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Integrations
Grant (or update) an agent's access to an integration connection
Upsert on (agentId, connectionId). providerKey: "code" substitutes for connectionId for the internal code capability.
POST
/
agents
/
{agentId}
/
integration-grants
Grant (or update) an agent's access to an integration connection
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",
"providerKey": "<string>",
"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",
"providerKey": "<string>",
"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',
providerKey: '<string>',
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',
'providerKey' => '<string>',
'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 \"providerKey\": \"<string>\",\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 \"providerKey\": \"<string>\",\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 \"providerKey\": \"<string>\",\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",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scope": "read",
"createdAt": "2023-11-07T05:31:56Z",
"allowedTools": [
"<string>"
],
"constraints": {},
"grantedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiresAt": "2023-11-07T05:31:56Z",
"connection": {
"providerKey": "<string>",
"displayName": "<string>",
"status": "active"
}
}{
"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
application/json
"code" is the one value that substitutes for connectionId.
Filtered server-side to valid connector actions.
Available options:
read, write, read_write Response
Available options:
read, write, read_write Only present on the list endpoint (joined).
Show child attributes
Show child attributes