Roll Back an Edit
Restores a presentation to the state it was in before an earlier edit, undoing that edit.
The endpoint returns a task_id; poll /task_status/{task_id} until SUCCESS, then use the returned request_id with /presentation/download/{id} to obtain a short-lived download URL.
How it works
Section titled “How it works”Before an edit changes anything, we save a copy of the presentation. Every
/presentation/edit/slide call returns the id of that copy as
previous_version_id in its task result. Send the id here and the presentation goes back to how it
looked before the edit.
A rollback saves a copy first too, so it returns a previous_version_id of its own. That id points at
the presentation as it looked after the edit you just undid, so sending it back re-applies the edit.
The same field means undo when it came from an edit, and redo when it came from a rollback. Keep that in mind before you put it behind one button.
You only need the newest id for a presentation. Older ids keep working until they expire, though a single step back never needs them.
Sending the same version_id twice is safe. The presentation ends up in the state that id points at,
so a retry or a duplicate request changes nothing.
Headers
Section titled “Headers”application/json
The API key to use for the request.
<YOUR_API_KEY>
Body Parameters
Section titled “Body Parameters”The previous_version_id returned by an earlier edit or rollback of this presentation. The
presentation to restore is derived from it, so no presentation_id is needed.
Code Examples
Section titled “Code Examples”curl -X POST "https://api.slidespeak.co/api/v1/presentation/edit/rollback" -H "Content-Type: application/json" -H "X-API-Key: YOUR_API_KEY" -d '{ "version_id": "cmqf2lohi00017wlp3du979zt" }'fetch('https://api.slidespeak.co/api/v1/presentation/edit/rollback', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': 'YOUR_API_KEY' }, body: JSON.stringify({ version_id: 'cmqf2lohi00017wlp3du979zt' }),}) .then(response => response.json()) .then(data => { console.log('Response:', data); }) .catch(error => { console.error('Error:', error); });import requests
url = "https://api.slidespeak.co/api/v1/presentation/edit/rollback"headers = { "Content-Type": "application/json", "X-API-Key": "YOUR_API_KEY"}payload = { "version_id": "cmqf2lohi00017wlp3du979zt"}
response = requests.post(url, headers=headers, json=payload)print(response.json())<?phprequire 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client();
$response = $client->post('https://api.slidespeak.co/api/v1/presentation/edit/rollback', [ 'headers' => [ 'Content-Type' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY' ], 'json' => [ 'version_id' => 'cmqf2lohi00017wlp3du979zt' ]]);
$body = $response->getBody();$data = json_decode($body, true);
print_r($data);Example body
Section titled “Example body”{ "version_id": "cmqf2lohi00017wlp3du979zt"}Response
Section titled “Response”{ "task_id": "a5e371f2-9138-4d07-9f7a-8a9c9dcd0c21"}{ "detail": "Version not found", "error": { "code": "VERSION_NOT_FOUND", "status_code": 404, "retryable": false, "message": "Version not found", "details": {}, "request_id": "353509d6-8efe-401c-a8a9-53ca64b520a3" }}Example Task Result
Section titled “Example Task Result”{ "task_id": "a5e371f2-9138-4d07-9f7a-8a9c9dcd0c21", "task_status": "SUCCESS", "task_result": { "presentation_id": "cmgt32cut0000h3ovex8dbzmn", "previous_version_id": "cmqf3abcd00027wlp3du979zt", "request_id": "353509d6-8efe-401c-a8a9-53ca64b520a3" }}