Pens
Fork a Pen
Copies one of the key owner's Pens. The copy keeps the original's title, description, tags and access unless given; a fork of a Protected Pen needs a password.
post/v2/pens/{id}/fork
Request
- Base URLhttps://api.codepen.io
- Auth
- HTTP bearer
- or API key in header X-API-Key
Query parameters
waitinteger
Seconds to wait for the build (default 45, at most 75; 0 answers as soon as the files are saved). A wait in the JSON body takes precedence.
Request body
Response
The new Pen, with build.
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.