KBAISE/ for lovable
Library
Docs

Connect your app to the Lovable API

about 5 minBuildingchecked 12h agoOfficial page
The short version

You can connect your Lovable app to the Lovable API to manage your Lovable projects and workspaces from within your own custom tools. This lets you build dashboards, admin tools, or automations that interact with your Lovable account.

This is for teams who use Lovable for their work and want to build custom tools to manage their projects and workspace.

Do this, in order

  1. 1

    Go to the 'Connectors' section in your Lovable dashboard and choose 'Lovable API'.

    This is where you start the process of setting up a new connection to the Lovable API.

  2. 2

    Click 'Add connection'.

    This initiates the creation of a new connection to the Lovable API.

  3. 3

    Give your connection a 'Display name', like 'Acme workspace'.

    This helps you easily identify this specific connection later within Lovable.

  4. 4

    Under 'Create API key', enter a 'Key name' (e.g., 'Automation') and a 'Monthly credit cap', then click 'Create key'.

    This generates a new API key that your app will use to access your Lovable workspace. The credit cap helps manage usage.

  5. 5

    If you want others in your workspace to use this connection, click 'Share with others' and add them by email or invite the entire workspace.

    By default, the connection is private. Sharing it allows team members to use it in their own projects.

  6. 6

    Click 'Connect'.

    This finalizes the setup, and Lovable will check if the API key works before saving the connection.

Paste this into your project

I need to connect my app to the Lovable API. Can you help me set up a connection to manage my Lovable projects and workspace? I want to create a new API key for this connection.

Words decoded

API
API stands for Application Programming Interface. It's a set of rules and tools that lets different software programs talk to each other. In this case, it lets your custom app talk to Lovable's services.
Programmatic access
This means you can control or interact with something using code or automated instructions, rather than manually clicking buttons in a user interface.
Workspace
In Lovable, a workspace is like a shared digital office where your team collaborates on projects. It contains all your projects, members, and settings.
Connector
A connector is a built-in tool in Lovable that helps your app communicate with other services, like the Lovable API itself, without you having to write all the complex code for that communication.
API key
An API key is a secret code that acts like a password, allowing your app to prove its identity and gain access to the Lovable API. It's important to keep it secure.
Scopes
Scopes define what an API key is allowed to do. For example, a key might have 'read-only' scope, meaning it can only view information, not change it.
Deployment status
This refers to the current state of your project when it's being published or updated, indicating if it's live, in progress, or failed.

Where people get stuck

  • You need a Lovable workspace on a Business or Enterprise plan to use this feature.
  • You must have admin or owner roles in the target workspace to create an API key, or ask an admin to create one for you.
  • You need permission to create connections in the workspace where you are building your app.
  • Your API key is like a password; never share it publicly or embed it directly in client-side code.
  • This connector cannot send chat messages to the Lovable agent, create new projects, or work with code files or databases.
  • If an API key expires or is deleted, your connection will stop working until you update it with a new key.

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.