Skip to content

Publishing

Declare files, upload the missing ones, finalize the version and follow long operations.

On this page

Concepts: Publishing

Endpoint summaries come from the OpenAPI document.

POST/v1/publish

Declare files for a new version; returns upload URLs for missing files. Without credentials a new ownerless project is created and its project key is returned once

Operation (MCP tool)
publish
Authentication
API key (pfa_…)Project key (pfc_…)No credentials

Parameters

Parameters
NameInTypeDescription
Idempotency-KeyOptionalheaderstringReplays the first response for 24 hourslength 8–128

Request body

application/jsonPublishRequestRequired

Request body
NameTypeDescription
projectOptionalstring
nameOptionalstring
titleOptionalstring
filesRequiredFile[]min items 1
modeOptional"snapshot" | "additive"
targetOptional"live" | "preview"
noteOptionalstringmax length 500
accessOptional"private" | "public"First access of a project this publish creates (not for an existing project or without an account). Public in a team that keeps new sites private needs sharing permission and a full-access key (403 access_change_forbidden)
sourceOptional"api" | "cli" | "mcp" | "drop" | "agent" | "git"
gitOptionalobjectFrom CI: the branch decides live or preview (production branch) and the branch preview address when target is not given
git.branchRequiredstringmax length 255
git.commitOptionalstringpattern ^[0-9a-fA-F]{7,64}$
git.messageOptionalstringmax length 10000
git.authorOptionalstringmax length 200

Responses

Responses
StatusDescriptionBody
200No change (noop)PublishResponse
201Version createdPublishResponse
400ProblemProblem (RFC 9457)
401ProblemProblem (RFC 9457)
402ProblemProblem (RFC 9457)
403ProblemProblem (RFC 9457)
404ProblemProblem (RFC 9457)
409ProblemProblem (RFC 9457)
413ProblemProblem (RFC 9457)
422ProblemProblem (RFC 9457)
429ProblemProblem (RFC 9457)
451ProblemProblem (RFC 9457)
503ProblemProblem (RFC 9457)

PUT/v1/uploads/{token}

Upload one file's bytes to a signed upload URL

Operation (MCP tool)
uploadFile
Authentication
Signed URL from an earlier response

Parameters

Parameters
NameInTypeDescription
tokenRequiredpathstringSigned upload token from `publish`

Request body

application/octet-streamstringRequired

Responses

Responses
StatusDescriptionBody
204Stored (or already stored)No content
401ProblemProblem (RFC 9457)
409ProblemProblem (RFC 9457)
413ProblemProblem (RFC 9457)
422ProblemProblem (RFC 9457)

Related error codes

Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.

POST/v1/versions/{version}/finalize

Finalize uploads and deploy; waits until ready (up to `wait` seconds)

Operation (MCP tool)
finalizeVersion
Authentication
API key (pfa_…)OAuth token (pfo_…)Project key (pfc_…)

Parameters

Parameters
NameInTypeDescription
versionRequiredpathstringVersion id (`ver_…`)
Idempotency-KeyOptionalheaderstringReplays the first response for 24 hourslength 8–128
waitOptionalqueryintegermin 0, max 60, default 30
asyncOptionalquery"1"

Responses

Responses
StatusDescriptionBody
200Version finished (ready or failed)VersionResult
202Still deployingVersionResult
401ProblemProblem (RFC 9457)
403ProblemProblem (RFC 9457)
404ProblemProblem (RFC 9457)
409ProblemProblem (RFC 9457)
422ProblemProblem (RFC 9457)
429ProblemProblem (RFC 9457)
503ProblemProblem (RFC 9457)

GET/v1/operations/{operation}

Status of a long-running operation

Operation (MCP tool)
getOperation
Authentication
API key (pfa_…)OAuth token (pfo_…)Project key (pfc_…)

Parameters

Parameters
NameInTypeDescription
operationRequiredpathstringOperation id (`opr_…`)

Responses

Responses
StatusDescriptionBody
200OKOperation
401ProblemProblem (RFC 9457)
403ProblemProblem (RFC 9457)
404ProblemProblem (RFC 9457)

Related error codes

Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.