Skip to content

Roll Back an Edit

POST https://api.slidespeak.co/api/v1/presentation/edit/rollback

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.


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.


Content-Type: string

application/json

X-API-Key: string

The API key to use for the request.


<YOUR_API_KEY>


version_id: string

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.


Terminal window
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"
}'

{
"version_id": "cmqf2lohi00017wlp3du979zt"
}

{
"task_id": "a5e371f2-9138-4d07-9f7a-8a9c9dcd0c21"
}

{
"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"
}
}