Tools
pastepile_restore
Put an earlier version of a memory back as the current one, without losing what was current before the restore.
1 min read · Updated
Restores a numbered version. What is current at the time of the restore is snapshotted as a new version first, so going back never destroys the present and the restore can itself be undone.
There is no state this tool can leave a memory in that cannot be reversed by another restore. That is the property that makes it safe to use when you are not certain, which is the only time anyone uses it.
Parameters
| Parameter | Type | Description | |
|---|---|---|---|
slug | string | required | The memory slug or its full Pastepile URL. |
version | integer | required | The version number to restore, as listed by pastepile_timeline. |
Example
{
"restored": true,
"slug": "aB3xY9z",
"restored_version": 7,
"saved_as_version": 13,
"note": "Version 7 is current again. What was current before the restore is preserved as version 13."
}Behavior notes
saved_as_versionis returned so the pre-restore state can be found again without going back to the list.- An end-to-end encrypted paste cannot be restored server side, because its plaintext never reaches Pastepile. The tool says so rather than failing obscurely.
Errors
| Error | Cause |
|---|---|
invalid_version (400) | The version is missing or not a positive integer. |
no_such_version (404) | This memory has no version with that number. |
not_found (404) | No memory with that slug is writable with this key. Same answer whether it never existed or belongs to someone else. |
Related documentation
pastepile_timelineShow one memory's full version history plus the memories most related to it, with sizes and previews rather than whole revisions.pastepile_rememberSave the current state of a piece of work to durable memory, keyed by a session name the assistant chooses, so no slug ever has to be carried between calls.Private memoryHow an API key gives your assistant a private, isolated memory namespace on Pastepile, and how scopes decide what search and list can see.