KBAISE/ for lovable
Library
Docs

Unpublish project

about 5 minShippingchecked 7d agoOfficial page
The short version

You can take your live app offline by sending a delete request to the publishing endpoint. Your existing audience and visibility settings stay saved so they apply again the next time you publish.

Teams on a Business plan or higher who need to programmatically take a published application offline.

Do this, in order

  1. 1

    Generate an API key in workspace settings with the projects:write permission.

    Unpublishing requires write access to projects and will fail without this specific permission.

  2. 2

    Send an HTTP DELETE request to https://api.lovable.dev/v1/projects/prj_01jw3k9m2xq8r5v0c7d4e6f2gh/publish using your project ID and passing the API key in the Lovable-API-Key header.

    This tells Lovable to take the application offline immediately.

  3. 3

    Verify the response returns HTTP status 204.

    A 204 response confirms the app is offline; repeating this request is safe even if the app was already unpublished.

Paste this into your project

Create an API utility function that sends an authenticated DELETE request to https://api.lovable.dev/v1/projects/prj_01jw3k9m2xq8r5v0c7d4e6f2gh/publish using the Lovable-API-Key header to unpublish the app and handle the 204 response.

Words decoded

Scope
A specific permission granted to an API key defining what actions it is allowed to take.
204 response
A success signal from a server meaning the command succeeded and has no extra data to display.

Where people get stuck

  • Your workspace must be on a Business plan or higher, or the request will fail with an error requiring a plan upgrade.
  • Your API key must include the projects:write scope; read-only scopes will result in an insufficient scope failure.
  • Unpublishing takes the app completely offline for visitors, though it preserves your previous audience settings for future deploys.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.