Connect your app to Klaviyo
Connect your Lovable app to Klaviyo to sync customer profiles, collect newsletter signups with consent, track purchase events, and view campaigns. You connect once using a private API key from Klaviyo and then use it across your app projects.
Anyone who wants their app to manage email or SMS marketing subscribers, log customer events, or view marketing data in Klaviyo.
Do this, in order
- 1
Log in to Klaviyo as an Owner or Admin, open Settings, and go to API keys.
You need an administrator account to generate the private credential required for the connection.
- 2
Click Create Private API Key, select your permissions (making sure to include accounts:read), and copy the key starting with pk_.
Lovable needs this secret key to authenticate, and Klaviyo only displays it once.
- 3
In your Lovable dashboard, open Connectors and select Klaviyo.
This is where you set up and manage shared integrations for your workspace.
- 4
Click Connect, paste your private API key, choose whether to share it with your workspace, and save.
Lovable verifies your key with Klaviyo and makes the connection available to your projects.
- 5
Open your project chat and ask Lovable to link your Klaviyo connection and build your desired feature.
This gives your app code permission to interact with Klaviyo and triggers Lovable to generate the necessary forms and sync actions.
Paste this into your project
Use Klaviyo and build a newsletter signup form that subscribes an email address to our list after the visitor checks a consent box.
Words decoded
- Private API key
- A secret password-like code that lets Lovable securely read and write data in your Klaviyo account.
- Scope
- The specific permission levels assigned to an API key, determining whether it can only read data or also make changes like adding subscribers.
Where people get stuck
- Do not paste your public API key or site ID; the connector requires a private key that begins with pk_.
- Do not create a custom key without the accounts:read permission, or Lovable will fail to verify the connection.
- Creating a profile in Klaviyo does not subscribe the user to marketing emails; your form must collect explicit consent and send a subscribe request.
- Klaviyo does not allow editing permissions on existing keys; if you need different scopes later, you must create a new key and update the connection.
- The connector uses a single shared company account; it does not support having your app's end-users log into their own personal Klaviyo accounts.
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.