curl --request PATCH \
--url 'https://api.lovable.dev/v1/projects/project-id/publish' \
--header 'Lovable-API-Key: lov_your-api-key' \
--header 'Lovable-Version: 2026-09-11' \
--header 'Content-Type: application/json' \
--data '{}'{
"audience": "public",
"audience_targets": [
{
"id": "grp_01jw3k9m2xq8r5v0c7d4e6f2gh",
"type": "group"
}
]
}{
"detail": "validation failed",
"errors": [
{
"location": "body.members",
"message": "expected array length >= 1"
}
],
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 400,
"title": "Bad Request",
"type": "invalid_request"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 401,
"title": "Authorization header required",
"type": "unauthorized"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 402,
"title": "You need to upgrade your plan to access this feature",
"type": "payment_required"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 403,
"title": "You don't have the permissions to perform this action",
"type": "forbidden"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 404,
"title": "Not Found",
"type": "project_not_found"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 406,
"title": "This endpoint produces application/json. Send a matching Accept header, */*, or omit the header.",
"type": "not_acceptable"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 429,
"title": "Too Many Requests",
"type": "rate_limited"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 503,
"title": "Request timed out",
"type": "request_timeout"
}{
"detail": "validation failed",
"errors": [
{
"location": "body.workspace_id",
"message": "expected string"
}
],
"props": {
"finding_refs": [
"supabase/finding-1"
]
},
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 429,
"title": "Too Many Requests",
"type": "rate_limited"
}Update publish settings
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. Returns the resolved audience and its targets. Read GET /v1/projects/ for is_published, publish_audience, and publish_audience_targets. To build and publish a new version, use POST /v1/projects//publish. To take the app offline, use DELETE /v1/projects//publish.
curl --request PATCH \
--url 'https://api.lovable.dev/v1/projects/project-id/publish' \
--header 'Lovable-API-Key: lov_your-api-key' \
--header 'Lovable-Version: 2026-09-11' \
--header 'Content-Type: application/json' \
--data '{}'{
"audience": "public",
"audience_targets": [
{
"id": "grp_01jw3k9m2xq8r5v0c7d4e6f2gh",
"type": "group"
}
]
}{
"detail": "validation failed",
"errors": [
{
"location": "body.members",
"message": "expected array length >= 1"
}
],
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 400,
"title": "Bad Request",
"type": "invalid_request"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 401,
"title": "Authorization header required",
"type": "unauthorized"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 402,
"title": "You need to upgrade your plan to access this feature",
"type": "payment_required"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 403,
"title": "You don't have the permissions to perform this action",
"type": "forbidden"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 404,
"title": "Not Found",
"type": "project_not_found"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 406,
"title": "This endpoint produces application/json. Send a matching Accept header, */*, or omit the header.",
"type": "not_acceptable"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 429,
"title": "Too Many Requests",
"type": "rate_limited"
}{
"detail": null,
"errors": null,
"props": null,
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 503,
"title": "Request timed out",
"type": "request_timeout"
}{
"detail": "validation failed",
"errors": [
{
"location": "body.workspace_id",
"message": "expected string"
}
],
"props": {
"finding_refs": [
"supabase/finding-1"
]
},
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"status": 429,
"title": "Too Many Requests",
"type": "rate_limited"
}Authorizations
Lovable API key. Send its value in the Lovable-API-Key header.
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.
Path Parameters
Project ID.
Body
Provide audience, audience_targets, or both. An empty object leaves settings unchanged.
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.
public, workspace, custom Groups who can open the app; allowed only when the supplied or current audience is custom. Providing a list replaces all group and user grants and removes workspace-wide access; an empty list removes those grants. Existing organization access and email invitations managed in the UI are preserved. Omit to preserve saved targets across audience changes. Targets are inactive outside custom mode. Null is not accepted.
100Show child attributes
Show child attributes
Response
OK
Who can open the published app; project reads report this value as publish_audience. More values may be added; clients must tolerate unknown values.
public, workspace, custom Saved groups and users, including while the app is offline or the audience is not custom. These targets grant access only in custom mode. Users granted through invitations or organization membership are included; organization-wide access and pending email invitations are not listed. This read projection is not a writable target list; only groups can be supplied in audience_targets.
Show child attributes
Show child attributes
Was this page helpful?