Publish project
Changed onPlan: Business or higher
Scope: projects:write
Builds and deploys the project. When the workspace blocks publishing on critical security findings, the quick security scan runs on the version being published first, and unresolved findings fail the request with 400 security_critical_findings. Returns 202 with the Deployment representation, status running, and null url and error fields; poll GET /v1/projects/{project_id}/publish/{deployment_id} until deployment finishes. Optionally set audience to choose who can open the published app; project reads report it as publish_audience. Omit audience to keep the current setting. Audience changes apply to the currently published version immediately, before the new deployment finishes. To change access settings without rebuilding, use PATCH /v1/projects/{project_id}/publish. To take the app offline, use DELETE /v1/projects/{project_id}/publish.
Request
- Base URLhttps://api.lovable.dev
- Auth
- API key in header Lovable-API-Key
- or HTTP bearer
Path parameters
Project ID.
Headers
Stable API version to serve, as a YYYY-MM-DD date. Omit for the oldest supported stable version, currently 2026-09-11.
Comma-separated beta revision strings to enable on top of the stable version.
Request body
Example request
{
"audience": "custom",
"audience_targets": [
{
"id": "grp_01jw3k9m2xq8r5v0c7d4e6f2gh",
"type": "group"
}
],
"name": "acme-landing-page"
}Response
Deployment started. Poll GET /v1/projects/{project_id}/publish/{deployment_id} (the Location header) with the returned id until deployment finishes.
Example response
{
"error_class": "configuration",
"error_message": "Missing environment variable VITE_API_URL",
"id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"status": "completed",
"url": "https://acme-landing-page.lovable.app"
}Changes
- breaking
the request property
became not nullable - info
for the
headerrequest parameterLovable-Version, the format was generalized fromdateto no format - info
added the non-success response with the status
- breaking
- info
added the non-success response with the status
- info