CodePen POST to Prefill API

HTTP POST endpoint that accepts JSON-encoded code and configuration and opens a new (unsaved) Pen in the CodePen editor pre-populated with that content. Supports HTML, CSS, and JS content fields, preprocessor choices, external resources, and editor layout. No authentication is required.

API entry from apis.yml

apis.yml Raw ↑
aid: codepen:post-to-prefill
name: CodePen POST to Prefill API
description: HTTP POST endpoint that accepts JSON-encoded code and configuration and opens a new (unsaved)
  Pen in the CodePen editor pre-populated with that content. Supports HTML, CSS, and JS content fields,
  preprocessor choices, external resources, and editor layout. No authentication is required.
humanURL: https://blog.codepen.io/documentation/prefill/
baseURL: https://codepen.io/pen/define/
tags:
- Front-End Development
- Developer Tools
properties:
- type: Documentation
  url: https://blog.codepen.io/documentation/prefill/