Versions

Get a version

One version with its files, and its build with output files. A dry run's unsaved version (saved: false) is readable here for 36 hours.

get/v2/versions/{id}

Request

  • Base URL
    https://api.codepen.io
  • Auth
    • HTTP bearer
    • or API key in header X-API-Key

Response

The version.

created_atstring date-time required
deployedboolean required
hashstring required
idstring required
labelstring nullable required
pen_idstring required
preview_urlstring uri nullable required

Null for a dry run's version, or when the key cannot read the Pen.

savedboolean required

False only for a dry run's unsaved version.

Example response

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