Skip to content

Publish the app: merge to main, build, and deploy

POST
/api/workspaces/{workspaceId}/apps-v2/{id}/publish

Merges branch (defaulting to the caller’s own branch) into main, builds from main in the sandbox, uploads the output as an immutable deployment keyed by commit sha, and points the app at it. A failed build leaves the previous deployment serving. Re-publishing an unchanged sha reuses the existing deployment instead of rebuilding.

workspaceId
required
string
id
required
string
object
branch
string

Successful response

object
success

Whether the request succeeded.

boolean
data

Endpoint-specific response payload.

message
string
Example
Operation completed
error
string
Example
Error message

Invalid request

object
success
boolean
error
string
Example
Error message

Internal server error

object
success
boolean
error
string
Example
Error message