Update an AI memory
curl --request PATCH \
--url https://app.hookie.ai/admin/api/projects/{project_id}/memories/{memory_id} \
--header 'Content-Type: application/json' \
--data '
{
"revision": 2,
"title": "<string>",
"content": "<string>",
"tags": [
"<string>"
],
"project_id": "<string>",
"superseded_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
revision: 2,
title: '<string>',
content: '<string>',
tags: ['<string>'],
project_id: '<string>',
superseded_by: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expires_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/memories/{memory_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/projects/{project_id}/memories/{memory_id}"
payload = {
"revision": 2,
"title": "<string>",
"content": "<string>",
"tags": ["<string>"],
"project_id": "<string>",
"superseded_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2023-11-07T05:31:56Z"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){}{
"error": "<string>",
"code": "storage_rule_violation",
"violations": [
{
"rule": "<string>",
"message": "<string>",
"limit": "<unknown>",
"actual": "<unknown>"
}
],
"project_id": "<string>",
"refused_by_rules": [
{
"title": "<string>",
"rule": "<string>",
"message": "<string>"
}
]
}Projects
Update an AI memory
A project’s brain (#663), on every plan; a project hidden from the caller answers 404. Only a memory of this project, or one shared to the workspace when the Workspace Brain is included, is found here. Author only (403 otherwise), at the current revision (409 when stale). Changes title, content, tags, the linked project (null to unlink), or visibility (team shares it; private un-shares it). superseded_by marks it as replaced by another memory (null restores it), and expires_at sets or removes an expiry (#687). A PATCH of only those two fields is also allowed for a project manager on a shared, active memory.
PATCH
/
admin
/
api
/
projects
/
{project_id}
/
memories
/
{memory_id}
Update an AI memory
curl --request PATCH \
--url https://app.hookie.ai/admin/api/projects/{project_id}/memories/{memory_id} \
--header 'Content-Type: application/json' \
--data '
{
"revision": 2,
"title": "<string>",
"content": "<string>",
"tags": [
"<string>"
],
"project_id": "<string>",
"superseded_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
revision: 2,
title: '<string>',
content: '<string>',
tags: ['<string>'],
project_id: '<string>',
superseded_by: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expires_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/memories/{memory_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/projects/{project_id}/memories/{memory_id}"
payload = {
"revision": 2,
"title": "<string>",
"content": "<string>",
"tags": ["<string>"],
"project_id": "<string>",
"superseded_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expires_at": "2023-11-07T05:31:56Z"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){}{
"error": "<string>",
"code": "storage_rule_violation",
"violations": [
{
"rule": "<string>",
"message": "<string>",
"limit": "<unknown>",
"actual": "<unknown>"
}
],
"project_id": "<string>",
"refused_by_rules": [
{
"title": "<string>",
"rule": "<string>",
"message": "<string>"
}
]
}Path Parameters
Body
application/json
Response
Successful operation
The response is of type object.