Endpoints

Every endpoint of the PopCraft REST API, generated from the OpenAPI spec.

Endpoints

Generated from the OpenAPI spec (version 1.4.0). Do not edit by hand: run npx tsx scripts/gen-api-docs.ts.

All paths are relative to /api/v1. See the overview for authentication, scopes, rate limits and paging.

EndpointWhat it doesScope
GET /meThe token’s user and workspacesany token
GET /filesFiles you can openfiles:read
POST /filesCreate a filefiles:write
GET /files/{key}File metadata, your role and document JSONfiles:read
PUT /files/{key}Replace the documentfiles:write
POST /files/{key}/commandsRun editing commandsfiles:write
GET /files/{key}/nodesNodes with their subtreesfiles:read
GET /files/{key}/imagesThumbnail and media assets the file referencesfiles:read
GET /files/{key}/thumbnailPreview image bytesfiles:read
POST /files/{key}/mediaUpload media the file usesfiles:write
GET /files/{key}/media/{hash}Media asset bytesfiles:read
GET /projects/{id}/filesFiles in a projectfiles:read
GET /files/{key}/commentsComments (threads and replies), oldest firstcomments:read
POST /files/{key}/commentsPost a thread or replycomments:write
PATCH /files/{key}/comments/{id}Edit, resolve, react to or move a commentcomments:write
DELETE /files/{key}/comments/{id}Delete a commentcomments:write
GET /files/{key}/versionsVersions, newest firstversions:read
GET /files/{key}/versions/{id}A version’s document snapshotversions:read
GET /workspaces/{id}/integrationsA workspace's integrations and connected accountsintegrations:read
GET /workspaces/{id}/integrations/candidatesEvery place for one use, across connected accountsintegrations:read
GET /integrations/connections/{id}/resourcesWhat a connected account holds, one level at a timeintegrations:read
GET /files/{key}/site/destinationsWhere the site also goesfiles:read
POST /files/{key}/site/destinationsAdd a destinationsites:publish
POST /files/{key}/site/destinations/{id}/deploySend a published version to a destinationsites:publish
GET /files/{key}/site/databaseThe database behind the sitefiles:read
PUT /files/{key}/site/databaseAttach a databasesites:publish
DELETE /files/{key}/site/databaseDetach the databasesites:publish
GET /files/{key}/site/database/submissionsForm submissionsfiles:read
GET /files/{key}/siteThe file's published websitefiles:read
PATCH /files/{key}/siteRoll back, take offline or rename a sitesites:publish
POST /files/{key}/site/publishPublish a new version of the sitesites:publish
PUT /files/{key}/site/blobs/{hash}Upload one of the site's filessites:publish
GET /templatesTemplates you can usefiles:read
GET /templates/{id}A template with its payloadfiles:read
PUT /templates/{id}/preview/{file}Store a template's hover loop or detail stillmarketplace:publish
GET /templates/{id}/media/{hash}One of a template's own media filesfiles:read
PUT /templates/{id}/media/{hash}Upload one of a template's media filesmarketplace:publish
POST /templatesSave a templatemarketplace:publish
POST /pluginsPublish a plugin or theme pack versionmarketplace:publish
POST /packsPublish a brush or shader packmarketplace:publish
GET /marketplaceBrowse the public marketplacenone (public)
GET /marketplace/{kind}/{id}One marketplace item with its versionsnone (public)

Account

Who the token is

GET /me

The token’s user and workspaces

Scope: any token.

Response 200: Me.

Files

Files you can open, their documents, nodes and images; creating and editing them with a files:write token

GET /files

Files you can open Recent files across your workspaces, or one container. Filters combine. Sorted by last modified unless sort=name.

Scope: files:read.

ParameterInTypeDescription
workspacequerystringOnly this workspace
projectquerystringOnly this project (and its folders)
folderquerystringOnly this folder
trashquery1Trashed files instead of live ones
sharedquery1Only files shared with you from other workspaces
qquerystringSearch by name (up to 100 characters)
sortqueryupdated · name (default updated)Order
limitqueryinteger (default 60)Page size
cursorquerystringThe previous page’s nextCursor

Response 200: FileList.

POST /files

Create a file Optionally with its document. The plan’s team-workspace, page and cloud-file limits apply as in the app.

Scope: files:write.

Request body: FileCreate.

Response 201: FileCreated.

GET /files/{key}

File metadata, your role and document JSON

Scope: files:read.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)
depthquerymetadataOmit the document

Response 200: FileDetail.

PUT /files/{key}

Replace the document Body: a Document, { document } or a .popcraft export, and may be gzipped (Content-Encoding: gzip). Requests are capped at about 4.5 MB on the wire, so upload pictures, video and fonts first (POST /files/{key}/media) and send a document that names them as media://<hash>. A live file takes the difference as one edit in its collaborative log, so people editing it see the change merge in; private (PopCorn) layers are never written. Send If-Match: <revision> to write only if the file has not changed since you read it. Needs edit access.

Scope: files:write.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)
If-MatchheaderstringThe revision you read

Request body: Document.

Response 200: WriteResult.

POST /files/{key}/commands

Run editing commands Runs up to 100 commands in order on the current document and saves the result as one edit (conditional on the revision they ran against). Commands that need the canvas (exports, rendering), generate media, drive the editor’s screen or ask for confirmation are refused. A batch stops at the first failure and saves nothing (422) unless keepGoing. Read-only batches need view access, others edit access.

Scope: files:write.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)
If-MatchheaderstringRun only if the file is still at this revision

Request body: CommandBatch.

Response 200: CommandBatchResult.

GET /files/{key}/nodes

Nodes with their subtrees

Scope: files:read.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)
ids (required)querystringComma-separated node ids (≤ 200)
depthquery1Only the nodes themselves, no descendants

Response 200: NodeResult.

GET /files/{key}/images

Thumbnail and media assets the file references

Scope: files:read.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)

Response 200: Images.

GET /files/{key}/thumbnail

Preview image bytes

Scope: files:read.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)

Response 200: PNG or WebP bytes (image/*).

POST /files/{key}/media

Upload media the file uses The raw bytes of a picture, video, audio or font file, with x-media-hash set to their hash (SHA-256, the first 32 hex characters). The document, or a command such as font.add (src: "media://<hash>"), can then name them. A workspace stores the same bytes once. Needs edit access.

Scope: files:write.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)
x-media-hash (required)headerstringThe bytes' hash: the first 32 hex characters of their SHA-256

Response 201: Stored (application/json).

GET /files/{key}/media/{hash}

Media asset bytes

Scope: files:read.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)
hash (required)pathstringFrom /files/{key}/images

Response 200: The asset, with its own content type (*/*).

GET /projects/{id}/files

Files in a project Shorthand for /files?project={id}; takes the same paging parameters.

Scope: files:read.

ParameterInTypeDescription
id (required)pathstringProject id
limitqueryinteger (default 60)Page size
cursorquerystringThe previous page’s nextCursor

Response 200: FileList.

Comments

Threads and replies on a file

GET /files/{key}/comments

Comments (threads and replies), oldest first

Scope: comments:read.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)
limitqueryinteger (default 500)Page size
cursorquerystringThe previous page’s nextCursor

Response 200: CommentList.

POST /files/{key}/comments

Post a thread or reply

Scope: comments:write.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)

Request body: CommentCreate.

Response 201: Created (application/json).

PATCH /files/{key}/comments/{id}

Edit, resolve, react to or move a comment Send only the fields you change. body is the author’s to edit; anyone who can comment may resolve, react or move.

Scope: comments:write.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)
id (required)pathstringComment id

Request body: CommentPatch.

Response 200: OK (application/json).

DELETE /files/{key}/comments/{id}

Delete a comment

Scope: comments:write.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)
id (required)pathstringComment id

Response 200: OK (application/json).

Versions

Saved versions of a file

GET /files/{key}/versions

Versions, newest first Up to 200. Auto-saved versions older than the plan’s history window are not listed; named ones always are.

Scope: versions:read.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)

Response 200: VersionList.

GET /files/{key}/versions/{id}

A version’s document snapshot

Scope: versions:read.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)
id (required)pathstringVersion id

Response 200: VersionSnapshot.

Integrations

A workspace's own accounts at GitHub, Vercel, Neon and Supabase

GET /workspaces/{id}/integrations

A workspace's integrations and connected accounts Every integration, how it can be connected, and the accounts this workspace has connected. Credentials are never returned. Accounts are connected by a person in the app (the Integrations dialog), never through the API.

Scope: integrations:read.

ParameterInTypeDescription
id (required)pathstringWorkspace id (from GET /me)

Response 200: IntegrationList.

GET /workspaces/{id}/integrations/candidates

Every place for one use, across connected accounts Every database, repository or hosting project the workspace's connected accounts hold, as one list (each a complete target inside a connection, ready for attaching or adding). The last-used account's come first; a large account is cut short, and the list is cached for a minute.

Scope: integrations:read.

ParameterInTypeDescription
id (required)pathstringWorkspace id (from GET /me)
capability (required)queryrepo · deploy · databaseWhat the place is for

Response 200: OK (application/json).

GET /integrations/connections/{id}/resources

What a connected account holds, one level at a time A connection is an account: it holds several repositories, projects or databases. Lists the level after path (omit path for the outermost).

Scope: integrations:read.

ParameterInTypeDescription
id (required)pathstringConnection id
capability (required)queryrepo · deploy · database · authWhat the place is for
pathquerystringJSON array of the resources chosen so far: [{"id":"acme","name":"acme"}]

Response 200: ResourceLevel.

Sites

A file published as a website: publish a version, roll back, take it offline

GET /files/{key}/site/destinations

Where the site also goes The repositories and hosting projects this file's site is sent to, with what was last sent.

Scope: files:read.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)

Response 200: OK (application/json).

POST /files/{key}/site/destinations

Add a destination Choose a repository (repo) or a hosting project (deploy) inside one of the workspace's connected accounts. Every level of target is checked against the account. Or send create: true with capability (and provider or connectionId) to make a new one named after the site.

Scope: sites:publish.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)

Request body: DestinationCreate.

Response 201: Added (application/json).

POST /files/{key}/site/destinations/{id}/deploy

Send a published version to a destination A repository gets one commit on its default branch (files PopCraft did not write are left alone); a hosting project gets a production deployment. Sends the version online unless version is given.

Scope: sites:publish.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)
id (required)pathstringDestination id

Request body: object.

Response 200: OK (application/json).

GET /files/{key}/site/database

The database behind the site Which database of the user's own the site keeps its form submissions in. The connection string is never returned.

Scope: files:read.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)

Response 200: SiteDatabase.

PUT /files/{key}/site/database

Attach a database Use a database inside one of the workspace's connected accounts (target: the levels its integration lists, e.g. organization, project, database for Neon; organization, project for Supabase). Or send create: true (with provider or connectionId, else the account last used) to make a new one named after the site. The site's tables are made there if they are not.

Scope: sites:publish.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)

Request body: object.

Response 200: SiteDatabase.

DELETE /files/{key}/site/database

Detach the database The site stops keeping submissions. What is in the database stays.

Scope: sites:publish.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)

Response 200: SiteDatabase.

GET /files/{key}/site/database/submissions

Form submissions What visitors sent through the site's forms, newest first, read from the attached database.

Scope: files:read.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)
formquerystringOnly this form (its name)
limitqueryinteger (default 100)How many

Response 200: OK (application/json).

GET /files/{key}/site

The file's published website Its address, the version online and the versions so far (newest first). site is null until the file is published.

Scope: files:read.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)

Response 200: Site.

PATCH /files/{key}/site

Roll back, take offline or rename a site currentVersion serves that version (an earlier one is a rollback); null takes the site offline. slug changes its address.

Scope: sites:publish.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)

Request body: SitePatch.

Response 200: Site.

POST /files/{key}/site/publish

Publish a new version of the site Two calls. First send the manifest (every file's path, SHA-256 and size): the reply lists the hashes the server does not have (missing). Upload those with PUT /files/{key}/site/blobs/{hash}, then send the same manifest with commit: true: that makes the version and puts it online (201, with version, url and versionUrl). The files are the ones a static website export writes (popcraft site publish builds and uploads them in one go).

Scope: sites:publish.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)

Request body: SiteManifest.

Response 201: SitePublished.

PUT /files/{key}/site/blobs/{hash}

Upload one of the site's files The raw bytes of a file the publish call said was missing. path says what kind of file it is; the bytes must hash to {hash}.

Scope: sites:publish.

ParameterInTypeDescription
key (required)pathstringFile key (the id in /pop/)
hash (required)pathstringSHA-256 of the bytes, hex
path (required)querystringThe file's path in the site (index.html, assets/photo.png)

Response 201: Stored (application/json).

Marketplace

Public plugins, theme packs and libraries (no token needed)

GET /marketplace

Browse the public marketplace

Scope: none (public).

ParameterInTypeDescription
qquerystringSearch name, description and author
kindqueryall · plugin · theme · template · library · brush · shader (default all)One kind
categoryqueryproductivity · design-systems · ui-kits · icons · themes · ai · import-export · prototyping · motion · widgets · accessibility · data · funOne topic (plugins, libraries, brush and shader packs)
groupqueryprint · comic · social · slides · web · app · game · email · motion · boardOne template group (templates only), the same groups New file uses
limitqueryintegerPage size (default 48). Without limit or cursor, the whole listing in one answer
cursorquerystringThe previous page's nextCursor

Response 200: MarketplaceList.

GET /marketplace/{kind}/{id}

One marketplace item with its versions

Scope: none (public).

ParameterInTypeDescription
kind (required)pathplugin · theme · template · library · brush · shader
id (required)pathstringPlugin, library or template id

Response 200: MarketplaceDetail.

Publishing

Publish marketplace items from CI with a marketplace:publish token

POST /templates

Save a template Body: { meta: { localId, name, kind, category, … }, payload: { mode, nodes, variants, … } }. A localId seen before updates that template. Starts private.

Scope: marketplace:publish.

Request body: object.

Response 201: Created (application/json).

POST /plugins

Publish a plugin or theme pack version Body: a .zip package or a JSON bundle { manifest, main?, ui?, themes? }, as the editor uploads it. The version goes into review; a version that is not greater than the latest returns 409.

Scope: marketplace:publish.

Request body: object.

Response 201: Published (pending review) (application/json).

POST /packs

Publish a brush or shader pack Body: { meta: { localId, kind, name, … }, payload }. A localId seen before updates that pack. New packs start private: the owner lists them from the editor.

Scope: marketplace:publish.

Request body: object.

Response 201: Created (application/json).

Commands

What POST /files/{key}/commands runs: name a step by its id or its agent tool name. Commands that need the canvas, generate media, drive the editor’s screen or ask for confirmation are not here; the CLI runs the canvas ones in a headless editor. popcraft commands <id> prints a command’s parameters.

CommandTool nameWhat it does
code.editModuleedit_codeEdit code module
code.getModulesget_codeGet code modules
component.createcreate_componentCreate component
component.createInstancecreate_instancePlace instance
component.setCodeset_component_codeDraw component with code
data.editCollectionedit_collectionEdit collection
data.editRecordsedit_recordsEdit records
data.getRecordsget_recordsGet records
design.readReferenceread_design_referenceRead design reference
doc.outlineget_document_outlineDocument outline
font.addadd_fontAdd font to file
font.listlist_fontsList fonts
font.removeremove_fontRemove font from file
meta.notifynotifyNotify
motion.applyPresetapply_motion_presetApply a motion preset
motion.createComponentcreate_motion_componentCreate motion component
motion.cutToBeatcut_to_beatCut scenes to the beat
motion.edit3Dedit_3d_sceneEdit a 3D scene
motion.editBehaviouredit_behavioursEdit a behaviour
motion.editComponentPropertyedit_component_propertyEdit a component property
motion.editCompositionedit_compositionEdit a composition
motion.editFrameAudioedit_frame_audioEdit a frame's audio
motion.editStateMachineedit_state_machineEdit a state machine
motion.editTextAnimationedit_text_animationEdit text animation
motion.editVideoedit_video_clipEdit a video clip
motion.getAnimationget_animationRead a layer's animation
motion.getCompositionsget_compositionsRead compositions
motion.getStateMachineget_state_machineRead a state machine
motion.newCompositioncreate_compositionNew composition from frames
motion.setKeysset_keyframesSet keyframes
motion.setLayerTimingset_layer_timingSet layer timing
motion.setPlaybackset_instance_playbackSet instance playback
motion.setShaderFillset_shader_fillSet a shader fill
motion.setTimelineset_timelineSet a timeline
motion.staggerstagger_motionStagger animations
node.alignalignAlign layers
node.applyAutoLayoutapply_auto_layoutApply auto layout
node.bindFieldbind_fieldBind to a field
node.createcreate_nodeCreate layer
node.deletedelete_nodesDelete layers
node.distributedistributeDistribute layers
node.duplicateduplicate_nodesDuplicate layers
node.findfind_nodesFind layers
node.flipflipFlip layers
node.getget_nodeRead layer properties
node.groupgroupGroup layers
node.importSvgimport_svgImport SVG
node.measuremeasureMeasure layers
node.movemove_nodesMove layers
node.orderorderReorder layers
node.renamerename_nodesRename layers
node.reparentreparentReparent layers
node.resizeresize_nodesResize layers
node.rotaterotateRotate layers
node.setControlset_controlSet form control
node.setLockset_lockLock layers
node.setRecordset_recordShow a record
node.setRepeatset_repeatRepeat for each record
node.setResponsiveset_responsiveSet breakpoint overrides
node.setSemanticsset_semanticsSet web semantics
node.setVisibilityset_visibilityShow or hide layers
node.ungroupungroupUngroup layers
node.updateupdate_nodesUpdate layers
page.createcreate_pageCreate page
page.listlist_pagesList pages
page.renamerename_pageRename page
page.setCurrentset_current_pageSwitch page
paint.replaceColorreplace_colorReplace color
paint.setEffectsset_effectsSet effects
paint.setFillsset_fillsSet fills
paint.setStrokesset_strokesSet strokes
prototype.editedit_prototypeEdit prototype
shader.editGraphedit_shader_graphEdit a shader graph
show.setAdvanceset_show_advanceSet how the show advances
site.getBreakpointsget_breakpointsGet breakpoints
site.getEnvironmentget_site_environmentGet site environment
site.setBreakpointsset_breakpointsSet breakpoints
site.setEnvironmentset_site_environmentSet site environment
site.setGpuTransitionsset_gpu_transitionsDraw 3D transitions with WebGPU
site.setRouteset_routeSet page address
site.setShareImageset_share_imageSet share image
style.applyset_node_styleApply style
style.createcreate_styleCreate style
style.listget_stylesList styles
style.setVariableset_variableSet variable
text.detachdetach_textDetach text
text.flowIntoShapeflow_text_into_shapeFlow text into shape
text.searchFontssearch_fontsSearch fonts
text.setset_textSet text
text.setEffectset_text_effectSet text effect
text.setFitset_text_fitAuto-size text
text.setPathset_text_pathSet text path
text.setTypographyset_typographySet typography
vector.setMaskTypeset_mask_typeMask type

Schemas

Object shapes referenced above. null means the field may be null.

Error

FieldTypeDescription
errorobject

User

FieldTypeDescription
idstring
emailstring
namestring

Author

A person as others see them: never the email.

FieldTypeDescription
idstring
namestring
image (optional)`stringnull`

Workspace

FieldTypeDescription
idstring
namestring
personalbooleanThe user’s own workspace (one per account)
tier (optional)stringPlan tier, when plans are on
pastDue (optional)boolean

Me

FieldTypeDescription
userUser
personalWorkspaceIdstring
workspacesWorkspace[]

File

FieldTypeDescription
keystring
namestring
workspaceIdstring
projectId (optional)`stringnull`
folderId (optional)`stringnull`
updatedAtstring (date-time)
createdAt (optional)string (date-time)
trashedAt (optional)`stringnull` (date-time)
thumbnailUrl (optional)`stringnull`
version (optional)integerSnapshot version; increases on every save

FileCounts

How many files match the query in each container (before paging).

FieldTypeDescription
totalinteger
workspaces (optional)object
projects (optional)object
folders (optional)object

FileList

FieldTypeDescription
filesFile[]
countsFileCounts
nextCursor`stringnull`

FileDetail

FieldTypeDescription
fileobject
roleowner · editor · commenter · viewerYour role on the file
document (optional)DocumentThe current document, live edits included. Omitted with ?depth=metadata; null before the file has one

Document

The document JSON: id, name, pages (page node ids, in order), nodes (a map of node id → node; pages are PAGE nodes), styles and variables. See the file-format docs.

FieldTypeDescription
id (optional)string
name (optional)string
pages (optional)string[]
nodes (optional)object

Node

A layer. type is FRAME, RECTANGLE, ELLIPSE, TEXT, VECTOR, IMAGE, GROUP, COMPONENT, INSTANCE, … Geometry is in the parent’s coordinate space.

FieldTypeDescription
idstring
typestring
namestring
parentId (optional)`stringnull`
childIds (optional)string[]
x (optional)number
y (optional)number
width (optional)number
height (optional)number
rotation (optional)number
visible (optional)boolean
locked (optional)boolean
opacity (optional)number

NodeResult

FieldTypeDescription
nodesobjectKeyed by requested id; null when the id does not exist

Images

FieldTypeDescription
thumbnail`stringnull` (uri)
mediaobject[]

Comment

FieldTypeDescription
idstring
parentId`stringnull`
authorIdstring
author (optional)undefined
bodystring
pageId (optional)`stringnull`
x (optional)`numbernull`
y (optional)`numbernull`
nodeId (optional)`stringnull`
offsetX (optional)`numbernull`
offsetY (optional)`numbernull`
reactionsobjectEmoji → user ids
resolvedAt (optional)`stringnull` (date-time)
resolvedBy (optional)`stringnull`
createdAtstring (date-time)
updatedAtstring (date-time)

CommentList

FieldTypeDescription
commentsComment[]
nextCursor`stringnull`

CommentCreate

FieldTypeDescription
bodystringText; mention people as @[Name](userId)
parentId (optional)stringReply to this thread
x (optional)number
y (optional)number
pageId (optional)string
nodeId (optional)stringPin to a layer (with offsetX/offsetY inside it)
offsetX (optional)number
offsetY (optional)number

CommentPatch

FieldTypeDescription
body (optional)stringNew text (author only)
resolved (optional)booleanResolve or reopen the thread
reaction (optional)stringToggle an emoji reaction for the caller
x (optional)number
y (optional)number
pageId (optional)string
nodeId (optional)`stringnull`
offsetX (optional)number
offsetY (optional)number

Version

FieldTypeDescription
idstring
kindauto · named
name (optional)`stringnull`
description (optional)`stringnull`
createdAtstring (date-time)
author (optional)undefined

VersionList

FieldTypeDescription
versionsVersion[]

Integration

FieldTypeDescription
manifestobject
availablestring[]The ways it can be connected on this server
connectionsobject[]

Resource

FieldTypeDescription
idstring
namestring
detail (optional)string

Candidate

FieldTypeDescription
connectionIdstring
providerstring
accountstring
targetResource[]

ResourceLevel

FieldTypeDescription
levelundefinedThe level these are: owner, repo, team, project. null when the path is complete
resourcesResource[]
canCreateboolean

DestinationDeploy

FieldTypeDescription
versioninteger
atstring (date-time)
urlstring
refstringA commit sha or a deployment id
statusready · building · failed
error (optional)string

Destination

FieldTypeDescription
idstring
capabilityrepo · deploy
targetobject[]
lastDeployundefined
createdAt (optional)string (date-time)
connectionobject

DestinationCreate

FieldTypeDescription
connectionId (optional)string
capabilityrepo · deploy
target (optional)object[]One resource per level, outermost first: [owner, repository] or [team, project]. Leave out with create
create (optional)trueMake a new one named after the site instead of choosing target
provider (optional)stringWith create: whose account (github, vercel), when connectionId is not given

SiteDatabase

FieldTypeDescription
databaseundefinednull when the site has no database

Submission

FieldTypeDescription
idstring
formstringThe form's name
dataobjectThe fields as sent
createdAtstring (date-time)

IntegrationList

FieldTypeDescription
integrationsIntegration[]
managesbooleanWhether you can connect and disconnect accounts (workspace owners and admins)

SiteVersion

FieldTypeDescription
versioninteger
pagesinteger
bytesinteger
createdAtstring (date-time)
urlstring

Site

FieldTypeDescription
configuredbooleanWhether this server publishes websites at all
host (optional)stringThe domain sites are served under
siteundefinednull until the file is published

SitePatch

FieldTypeDescription
currentVersion (optional)`integernull`
slug (optional)stringA new address: 3 to 40 letters, digits and dashes

SiteManifest

FieldTypeDescription
slug (optional)stringThe address for a first publish (default: from the file's name)
commit (optional)booleanMake the version once every file is uploaded
filesobjectEvery file of the site by its path (index.html is required)

SitePublished

FieldTypeDescription
slugstring
missing (optional)string[]
version (optional)integer
url (optional)string
versionUrl (optional)string

VersionSnapshot

FieldTypeDescription
documentDocument

MarketplaceItem

FieldTypeDescription
kindplugin · theme · template · library · brush · shader
idstring
namestring
description (optional)`stringnull`
author (optional)`stringnull`
versionstringPlugins: semver. Libraries: the version number
installsinteger
updatedAtstring (date-time)
permissionsstring[]Plugins: permissions the latest approved version asks for
themesintegerTheme packs: how many themes
counts (optional)object
icon (optional)`stringnull`
screenshotsstring[]
category (optional)productivity · design-systems · ui-kits · icons · themes · ai · import-export · prototyping · motion · widgets · accessibility · data · fun · null
tagsstring[]
homepage (optional)`stringnull`

MarketplaceList

FieldTypeDescription
itemsMarketplaceItem[]
nextCursor (optional)`stringnull`
counts (optional)objectPer-kind totals for the search and topic/group, whatever kind is, plus all

Template

FieldTypeDescription
idstring
namestring
description (optional)`stringnull`
kindCANVAS · PRINT · SOCIAL · PRESENTATION · WEB · APP · BOARD · EMAIL
categorystring
tagsstring[]
sizes (optional)string[]
fonts (optional)string[]
media (optional)string[]
thumbnail (optional)`stringnull`
workspaceId (optional)`stringnull`
ownerId (optional)string
publicboolean
installs (optional)integer
source (optional)workspace · marketplace
createdAtstring (date-time)
updatedAtstring (date-time)

TemplateList

FieldTypeDescription
templatesTemplate[]

TemplateDetail

FieldTypeDescription
templateTemplate
payloadobject

FileCreate

FieldTypeDescription
name (optional)stringDefaults to the document’s name, else Untitled
workspaceId (optional)stringDefaults to your personal workspace
projectId (optional)string
folderId (optional)stringA folder of projectId
document (optional)DocumentThe initial document (or a .popcraft export); the file starts empty without one

FileCreated

FieldTypeDescription
keystring
revisionstring

WriteResult

FieldTypeDescription
revisionstringThe file’s revision after the write
livebooleanWritten as one edit to the live log (open sessions merged it) rather than as a new snapshot
changedbooleanFalse when the document already matched

CommandStep

FieldTypeDescription
commandstringCommand id (node.create), agent tool name (create_node) or plugin method (createNode); see Commands
params (optional)objectThe command’s parameters (popcraft commands <id> prints them)

CommandBatch

FieldTypeDescription
commandsCommandStep[]
page (optional)stringPage id or name the commands act on (default: the first page)
selection (optional)string[]Node ids selected when the batch starts
keepGoing (optional)booleanRun every step even after one fails, and save what succeeded
dryRun (optional)booleanRun the batch and return the results without saving

CommandBatchResult

FieldTypeDescription
resultsobject[]
savedbooleanThe document changed and was saved
revisionstring
notices (optional)object[]

MarketplaceDetail

Everything in MarketplaceItem, plus versions: a list of { version, notes, createdAt }.