Delete a fact
const url = 'https://example.com/v1/memory/facts/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/v1/memory/facts/example \ --header 'Authorization: Bearer <token>'Closes the current revision (invalidationReason: deleted): the fact is no longer listed, fetched or retrieved, and its history stays readable until the retention sweep removes it. A key or session limited to a project writes only in that project or one of its conversations: any other scope is 403 permission-denied, facts about its own person included.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”The closed revision.
object
Example
{ "source": { "kind": "http-api", "refresh": { "strategy": "on-read" } }, "trust": "verified", "attributedTo": { "kind": "user" }, "subjects": [ { "kind": "participant" } ], "invalidationReason": "superseded", "review": "pending"}expectVersion is not a revision number.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}permission-denied: the caller may not write in the fact’s scope. Without an authorization store, key-project-mismatch (details.keyProjectId): the API key or session is limited to a project, and this writes above it, to the workspace, an org or a team (with a store, that is permission-denied).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}No fact with that id the caller may see, or it was deleted.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}fact-changed: the current revision is not expectVersion; legal-hold: the fact is under legal hold.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”memory-operation-unsupported: this runtime’s memory can’t delete facts.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The authorization store couldn’t be reached (authz-backend-unavailable), or the database was too busy for the authorization check (database-busy), so the request wasn’t run; Retry-After (whole seconds) says when to try again.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”See also
GET /v1/memory/facts/{factId}: Fetch a factGET /v1/memory/facts: List factsPOST /v1/memory/facts: Write a factGET /v1/memory/facts/{factId}/revisions: List a fact's revisions- Error code
authz-backend-unavailable - Error code
database-busy - Error code
fact-changed - Error code
key-project-mismatch - Error code
legal-hold - Error code
memory-operation-unsupported - Error code
permission-denied - Error code
rate-limit-exceeded - Every error code