document_id.
Added in Python SDK 0.9.0 and JavaScript and TypeScript SDK 0.9.0. In TypeScript, pass the
document_key as a string, or an options object; every option is accepted in snake_case or camelCase (documentId or document_id). The result is returned as the server sends it, with snake_case fields, typed as Record<string, unknown>.documents.delete: its versions and the memories made from it are visible to reads again. A version that was still processing when it was deleted is processed again. A permanent delete cannot be restored.
Parameters
Address the document one way: pass eitherdocument_key or document_id, as in documents.get. A deleted document is no longer found by document_id, so keep the document_key that delete returned.
Returns
Example
Raises
ContextNotFoundError: when the document does not exist, belongs to another instance, or was purged after its purge date.DocumentIdInUseError: when a newer document now holds the samedocument_idin that scope, so this one cannot come back.MissingScopeError: when the key is not allowed to restore documents. Playground keys cannot.InvalidInputError: when you pass both or neither ofdocument_keyanddocument_id.