projects

Create embed URL

Changed on

Plan: Business or higher

Scope: projects:write

Creates a preview URL valid for one hour that can be loaded in an iframe on one exact HTTPS origin. Visitors do not need a Lovable login. It shows the project's built preview; it does not grant access to the editor or the published app.

post/v1/projects/{project_id}/embed-url

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

parent_originstring required

HTTPS origin allowed to embed the preview, using a lowercase hostname with no port, trailing slash, path, query, or fragment. The preview URL only loads in an iframe on this origin.

Example request

{
  "parent_origin": "https://acme.com"
}

Response

Embed URL created. The token expires after one hour.

embed_urlstring required

Preview URL for an iframe on parent_origin. It allows visitors to view the built preview without a Lovable login until expires_at.

expires_atstring date-time required

When the embed URL token expires and stops loading the preview.

Example response

{
  "embed_url": "https://acme-landing-page.lovable.app/?__lovable_token=eyJhbGciOiJIUzI1NiJ9",
  "expires_at": "2026-01-15T09:30:00Z"
}

Changes

    • 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