Get up and running quickly with our developer tools and resources
Now that you understand Klaviyo’s data model and are familiar with how to push data in and out of Klaviyo using our APIs, it’s time to start developing. Follow the steps below to set up the basic infrastructure you’ll need to test and build your custom solution.
Create a test account
If you want to test custom integrations and applications without any risk of impacting your production account, create an additional Klaviyo account (for free) to use for testing. This is an optional step, but may offer peace of mind when testing your code. Once created, you can easily switch between multiple accounts when logged in.
To do this:
- Log out of your existing Klaviyo account.
- Head to Klaviyo and click Sign Up.
- Create a new account using the same email and password as your existing account, but choose a different business name for your test account.
- Once you complete the setup wizard, you will be able to toggle between accounts using the account button in the lower-left of your Klaviyo account.
Generate sample data
Klaviyo’s Sample Data Generation Tool will populate your test account with sample data for testing purposes. Three types of data are available: marketing data, ecommerce data, and catalog data.
To generate sample data:
- Be sure you are in your test account.
- Click Integrations > Developer tools (upper-right corner) > Sample data.
- Select the types of data you want to populate in your account.
- Click Add Data.
Data will populate in your account shortly. A green success message will appear when generation is complete. Rarely, the tool may fail to generate all or part of the data requested. If you receive an error message, refresh the page and re-attempt generating data following the steps above.
Install an SDK library
Klaviyo offers SDKs in Python, PHP, Ruby, and Node (with more on the horizon), as well as iOS, Android, and React Native mobile SDKs to help you build quickly. You do not have to use an SDK, but it is highly recommended since it makes the development process much more efficient.
Obtain your API credentials
Locate your public and private API keys under Account name > Settings > API keys. Remember, to manage API keys, you must have an Owner, Admin, or Manager user role.
Authenticate requests to Klaviyo
All of our API endpoints use private API keys to authenticate requests. If you do not use a private API key for your requests, or you use a key from the wrong account, your call will return a 400 error.
Make a test API request
Test your connection to confirm your authentication is working and that your application can connect with Klaviyo’s servers. Use Klaviyo's Postman collections to easily test using pre-built API requests.
Build, test, and go live
Build the technical requirements needed for your design to work with Klaviyo. Think through the tradeoffs between different technical considerations, decide on how you will build your end-to-end experience, and start your dev work. Check out our course on mapping your data into Klaviyo for tips on how to design your custom solutions.
Once your code is in place, you should run a variety of tests to feel confident about what you’ve built before you ship it. It’s a good idea to conduct unit tests on the smaller components of your code as you build, in addition to end-to-end testing. Use your test account and the sample data you’ve generated to ensure that data is populating in the UI the way you expect.
Follow this guide for a detailed breakdown of tests to run before going live.
Deploy your code quickly using Napkin.io
If you’re looking to get started quickly with no overhead, Napkin.io is a fast way to build and deploy APIs. This serverless online environment allows you to prototype, deploy, and share cloud functions right from your browser, for free. You can write code in JavaScript or Python, and deploy it instantly. This tool is excellent for building automations, bots, or connecting to webhooks. Try Napkin.io for yourself.