Update publish settings
Changed onPlan: Business or higher
Scope: projects:write
Changes published app access without rebuilding the app. Set audience to public, workspace, or custom; project reads report it as publish_audience. With a custom audience, audience_targets replaces group and user grants and removes workspace-wide access; organization access and email invitations managed in the UI are preserved. Changes take effect immediately. Where an enforced workspace publishing policy decides publishes, a published app that is not public becomes public only through a publish, which also ships the latest saved version: set audience public on POST /v1/projects/{project_id}/publish, since this route answers 409 publish_visibility_requires_publish. Returns the resolved audience and its targets. Read GET /v1/projects/{project_id} for is_published, publish_audience, and publish_audience_targets. To build and publish a new version, use POST /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"
}
]
}Response
OK
Example response
{
"audience": "custom",
"audience_targets": [
{
"id": "grp_01jw3k9m2xq8r5v0c7d4e6f2gh",
"type": "group"
}
]
}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