cURL
curl --request DELETE \
--url 'https://api.entendre.finance/v1/memory/file?path=knowledge/vendors.md&reason=Superseded' \
--header 'X-API-Key: <api-key>'
const response = await fetch(
'https://api.entendre.finance/v1/memory/file?path=knowledge/vendors.md&reason=Superseded',
{
method: 'DELETE',
headers: {
'X-API-Key': '<api-key>',
},
},
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());
import requests
response = requests.delete(
"https://api.entendre.finance/v1/memory/file",
params={
"path": "knowledge/vendors.md",
"reason": "Superseded"
},
headers={"X-API-Key": "<api-key>"},
timeout=30,
)
response.raise_for_status()
print(response.json())
{
"deleted": true,
"path": "knowledge/vendors.md",
"purged": false,
"trash_path": ".trash/vendors-example.md"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid path, query or request body.",
"request_id": "req_example"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"request_id": "req_example"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Insufficient access to organization",
"request_id": "req_example"
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "The file to delete was not found.",
"request_id": "req_example"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 30s.",
"request_id": "req_example"
}
}{
"error": {
"code": "PROVIDER_ERROR",
"message": "The memory service is temporarily unavailable.",
"request_id": "req_example"
}
}Memory
Delete memory
Moves a memory document to trash, or deletes an operational rule.
DELETE
/
v1
/
memory
/
file
cURL
curl --request DELETE \
--url 'https://api.entendre.finance/v1/memory/file?path=knowledge/vendors.md&reason=Superseded' \
--header 'X-API-Key: <api-key>'
const response = await fetch(
'https://api.entendre.finance/v1/memory/file?path=knowledge/vendors.md&reason=Superseded',
{
method: 'DELETE',
headers: {
'X-API-Key': '<api-key>',
},
},
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());
import requests
response = requests.delete(
"https://api.entendre.finance/v1/memory/file",
params={
"path": "knowledge/vendors.md",
"reason": "Superseded"
},
headers={"X-API-Key": "<api-key>"},
timeout=30,
)
response.raise_for_status()
print(response.json())
{
"deleted": true,
"path": "knowledge/vendors.md",
"purged": false,
"trash_path": ".trash/vendors-example.md"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid path, query or request body.",
"request_id": "req_example"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"request_id": "req_example"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Insufficient access to organization",
"request_id": "req_example"
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "The file to delete was not found.",
"request_id": "req_example"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 30s.",
"request_id": "req_example"
}
}{
"error": {
"code": "PROVIDER_ERROR",
"message": "The memory service is temporarily unavailable.",
"request_id": "req_example"
}
}Requires write:memory for documents, or write:operational-rules and an API key with an owner for rules.
For a document,
reason is required. Set purge=true to delete an eligible file permanently. Policy, journal and artifact files cannot be purged.
With kind=rule, send rule_id instead of path; reason and purge do not apply. Deleting a rule does not change earlier classifications or journals.
cURL
curl --request DELETE \
--url 'https://api.entendre.finance/v1/memory/file?path=knowledge/vendors.md&reason=Superseded' \
--header 'X-API-Key: <api-key>'
const response = await fetch(
'https://api.entendre.finance/v1/memory/file?path=knowledge/vendors.md&reason=Superseded',
{
method: 'DELETE',
headers: {
'X-API-Key': '<api-key>',
},
},
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());
import requests
response = requests.delete(
"https://api.entendre.finance/v1/memory/file",
params={
"path": "knowledge/vendors.md",
"reason": "Superseded"
},
headers={"X-API-Key": "<api-key>"},
timeout=30,
)
response.raise_for_status()
print(response.json())
Authorizations
Your organization API key. Some operations also need a key that is associated with a user; their pages say so.
Query Parameters
document (the default) for a memory document, or rule for an operational rule.
Available options:
document, rule Document only, and required for documents. Relative file path, such as knowledge/vendors.md.
Minimum string length:
1Document only, and required for documents. Why the document is deleted.
Minimum string length:
1Document only. Delete permanently instead of moving to .trash/. Refused for policy/, journal/ and artifacts/.
Rule only. Limits the lookup to one rule domain.
Available options:
classification, cash_application Rule only, and required for rules. Get it from List memory with kind=rule.
Required string length:
1 - 128Response
The document was deleted.