Skip to main content
A deleted memory is hidden from every read at once and stays restorable until its purge date, the end of the instance’s deletion period (0 to 30 days, 30 by default). That date is fixed when the memory is deleted, so changing the period later never shortens it. After it, the memory is purged for good and cannot be restored. This covers memories removed by memories.delete, by data.delete, and by memories.forget, including a forget approved in the dashboard. A document hidden by a data.delete call comes back with its memories when you restore that call’s deletion_id. A permanent delete has no restore. Restoring needs the same key permissions as deleting, and reaches only the memories of your key’s instance.

Parameters

string[]
Up to 200 memory ids. Send this or deletion_id, not both.
string
The deletion_id of a data.delete result: restores every memory that call hid. Conversations, their turns and summaries, the profile and source text that call removed do not come back.

Returns

string[]
Live again; served by the next fetch.
string[]
Not found in this instance, not deleted, or past the purge date. This is a result, not an error.
string[]
A store that could not be brought back in line (for example graph). The memory is restored either way.
integer
Only when you restore by deletion_id and that delete also hid documents: how many documents came back, with the memories made from them (document_memories_restored). If a document could not be restored, still_missing_in names documents.
boolean
True when still_missing_in is empty.

Raises

  • InvalidInputError: neither or both of memory_ids and deletion_id, an empty list, more than 200 ids, or an empty id. Checked before any request is sent.
  • AuthenticationError: the key is missing or invalid (401), or not allowed to delete (403).

See also