deploy-domains

Update publish settings

Changed on

Plan: 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.

patch/v1/projects/{project_id}/publish

Request

  • Base URL
    https://api.lovable.dev
  • Auth
    • API key in header Lovable-API-Key
    • or HTTP bearer

Path parameters

project_idstring required

Project ID.

Example:prj_01jw3k9m2xq8r5v0c7d4e6f2gh

Headers

Lovable-Versionstring

Stable API version to serve, as a YYYY-MM-DD date. Omit for the oldest supported stable version, currently 2026-09-11.

Lovable-Betastring

Comma-separated beta revision strings to enable on top of the stable version.

Request body

audience'public' | 'workspace' | 'custom'

Who can open the published app; project reads report this value as publish_audience. A custom audience can include existing grants managed in the UI. Omit to leave the audience unchanged, including while the app is unpublished.

Example request

{
  "audience": "custom",
  "audience_targets": [
    {
      "id": "grp_01jw3k9m2xq8r5v0c7d4e6f2gh",
      "type": "group"
    }
  ]
}

Response

OK

audience'public' | 'workspace' | 'custom' required

Who can open the published app; project reads report this value as publish_audience. More values may be added; clients must tolerate unknown values.

Example response

{
  "audience": "custom",
  "audience_targets": [
    {
      "id": "grp_01jw3k9m2xq8r5v0c7d4e6f2gh",
      "type": "group"
    }
  ]
}

Changes

    • breaking

      the request property became not nullable

    • info

      for the header request parameter Lovable-Version, the format was generalized from date to no format

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status