Versions
Restore an older version
Copies the version to the head. The restored version keeps the build of the version it copies; it is not built again.
post/v2/pens/{id}/versions/{version_id}/restore
Request
- Base URLhttps://api.codepen.io
- Auth
- HTTP bearer
- or API key in header X-API-Key
Query parameters
labelstring
Names the new saved version (at most 80 characters).
Response
The Pen, whose saved_version is the new head.
Example response
{
"build": {
"files": [
{
"name": "app.js",
"path": "/src/app.js"
}
]
},
"saved_version": {
"build": {
"files": [
{
"name": "app.js",
"path": "/src/app.js"
}
]
},
"files": [
{
"name": "app.js",
"path": "/src/app.js"
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.