API basics
The Lovable API lets you manage and deploy existing projects programmatically from your backend systems. You authenticate calls using a private key and target versioned endpoints.
Workspace admins and developers on Business or Enterprise plans who want to automate project management or deployment from external tools.
Do this, in order
- 1
Verify your Lovable account email address.
The API blocks requests until your workspace account email is verified.
- 2
Navigate to Workspace settings, select API keys & OAuth, and create a new key under Workspace access tokens.
Every request requires this key in the Lovable-API-Key header to authenticate.
- 3
Store the key securely in your server environment variables or backend secrets.
Lovable API keys must never be exposed to browser code or public repositories.
- 4
Send your requests to https://api.lovable.dev/v1 with the Lovable-API-Key header and a pinned Lovable-Version header.
Pinning the version prevents your integration from breaking when older API versions retire.
- 5
Follow pagination by passing the next_cursor value into the cursor query parameter on subsequent calls.
Large collections return paginated batches and only include next steps when more results remain.
Paste this into your project
Create a secure backend Supabase Edge Function to communicate with the Lovable API. Read the LOVABLE_API_KEY from environment variables, attach the Lovable-Version header set to 2026-09-11, and provide an endpoint that fetches and returns our workspace project list with cursor pagination support.
Words decoded
- API key
- A long, secret passcode that lets another computer program speak to your Lovable account on your behalf.
- Endpoint
- A specific web address on a server that performs an action or returns a specific set of data.
- Cursor-based pagination
- A way of loading large lists in small batches by using a bookmark token from the previous batch to fetch the next set.
- Rate limit
- A speed limit on how many requests you can send in a given time period before the server temporarily blocks you.
Where people get stuck
- Never use Lovable API keys in browser or front-end client code; calls must come from secure backend environments.
- Do not send unexpected fields in request bodies; the API strictly rejects unrecognized properties with a 400 Bad Request error.
- Do not expect to generate or edit project code via this REST API; automated AI creation and editing require the Lovable MCP server instead.
- Forgetting to set the Lovable-Version header forces your requests to use the oldest supported version, which may automatically change when older versions retire.
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.