Change what a connected agent may do
curl --request PATCH \
--url https://app.hookie.ai/admin/api/agents/{grant_id} \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '{
"scopes": []
}'const options = {
method: 'PATCH',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({scopes: []})
};
fetch('https://app.hookie.ai/admin/api/agents/{grant_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/agents/{grant_id}"
payload = { "scopes": [] }
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"scopes": [
"<string>"
]
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}Connected agents
Change what a connected agent may do
PATCH
/
admin
/
api
/
agents
/
{grant_id}
Change what a connected agent may do
curl --request PATCH \
--url https://app.hookie.ai/admin/api/agents/{grant_id} \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '{
"scopes": []
}'const options = {
method: 'PATCH',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({scopes: []})
};
fetch('https://app.hookie.ai/admin/api/agents/{grant_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/agents/{grant_id}"
payload = { "scopes": [] }
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"scopes": [
"<string>"
]
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}Authorizations
The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.
Path Parameters
Grant id from listConnectedAgents.
Body
application/json
Full replacement. Any unknown scope is REJECTED rather than silently dropped. An empty array leaves the agent with no Hookie scope, so its next admin-API request fails. hookie:manage clips to at most the admin role — billing is out of reach at every scope.
Available options:
hookie:read, hookie:write, hookie:manage