aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • Engineering

How To Get Started With Klaviyo – A Developer’s Guide

  • Dean Marc
  • January 27, 2024
  • 3 minute read

Klaviyo is a software service that provides marketing capability to clients. It is designed for email automation, promotion, marketing campaigns and more. Its default form of communication is email while SMS is available also in selected locations. It also has integration with ecommerce platforms such as Shopify, WooCommerce, Wix and others.

This guide is intended mainly for developers. Klaviyo provides an API capability to integrate with existing or new softwares through the use of REST endpoints. The full documentation can be found here. Their models or data objects are Profiles, Metrics and Events, Catalogs and Web feeds.


Partner with aster.cloud
for your next big idea.
Let us know here.



From our partners:

CITI.IO :: Business. Institutions. Society. Global Political Economy.
CYBERPOGO.COM :: For the Arts, Sciences, and Technology.
DADAHACKS.COM :: Parenting For The Rest Of Us.
ZEDISTA.COM :: Entertainment. Sports. Culture. Escape.
TAKUMAKU.COM :: For The Hearth And Home.
ASTER.CLOUD :: From The Cloud And Beyond.
LIWAIWAI.COM :: Intelligence, Inside and Outside.
GLOBALCLOUDPLATFORMS.COM :: For The World's Computing Needs.
FIREGULAMAN.COM :: For The Fire In The Belly Of The Coder.
ASTERCASTER.COM :: Supra Astra. Beyond The Stars.
BARTDAY.COM :: Prosperity For Everyone.

In the following example, we will take you through the creation of an Account, creating a private access key and testing it through cURL.

Create a new Account

01: Create a Klaviyo account. Open Klaviyo in a browser: https://www.klaviyo.com, and click the “Sign up” button on the upper-right corner of the page. 

Klaviyo Homepage Signup

02: Enter the required information and click on the “Create Account” button.

  • Email address
  • Password
  • Company name
  • Company website
  • Phone number
  • Use case for Klaviyo

03: Answer a series of questions, mainly how you intend to use Klaviyo and the nature of your business/clients. Select the appropriate answers and continue.

Nature of Business

04: Main focus of business

05: Business platform. You can opt to not select any by using the “I don’t use a platform” option at the bottom.

06: Number of contacts. These are the number of clients or contacts you have. 

07: Set the business address

08: Sender information

09: How to contact subscribers

Read More  Top Recommendations For Building Real-Time Intelligence On Google Cloud

10: A confirmation message will be sent to your email. Confirm the account by opening your mailbox.

11: Confirm the email

12: Upon opening the link, you will be redirected to the login page with a notification that the email address and account has been confirmed.

13: Login to your account. On your first login to a device, a confirmation code will be required.

14: You will now see the home page or the dashboard of your Klaviyo account. 


Klaviyo Private Access Key

01: Once logged in to the Klaviyo Dashboard. Select the Account name on the lower right. This will open a sub-menu, then select the “Settings” menu.

02: Select the “API keys” under the “Account” tab.

03: Then select the “Create Private API Key” button.

04: Set the name for the key and the appropriate access control. In this example, only the “Profiles” scope will be enabled. 

It is good practice to select the minimum account of credentials needed.

05: The Private API key has now been created. This will be used by the CRM API to call the Klaviyo API.


Testing the API Access Key

In this example we will be adding a Profile.

Path: https://a.klaviyo.com/api/profiles/

HTTP method: POST

Example request:

curl --request POST \
     --url https://a.klaviyo.com/api/profiles/ \
     --header 'Authorization: Klaviyo-API-Key {private-api-key-here}' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'revision: 2023-12-15' \
     --data '
{
  "data": {
    "type": "profile",
    "attributes": {
      "email": "[email protected]",
      "phone_number": "+12345678999",
      "first_name": "John",
      "last_name": "Reese",
      "properties": {
        "date_of_birth": "2011-09-22"
      }
    }
  }
}

An example result if the record is added. Note that some output have been omitted or masked.

{
  "data": {
    "type": "profile",
    "id": "...",
    "attributes": {
      "email": "[email protected]",
      "phone_number": "+12345678999",
      "external_id": null,
      "anonymous_id": null,
      "first_name": "John",
      "last_name": "Reese",
      "organization": null,
      "title": null,
      "image": null,
      "created": "2024-01-22T21:43:58.511450+00:00",
      "updated": "2024-01-22T21:43:58.511494+00:00",
      "last_event_date": null,
      "location": {
        "address1": null,
        "address2": null,
        "city": null,
        "country": null,
        "latitude": null,
        "longitude": null,
        "region": null,
        "zip": null,
        "timezone": null,
        "ip": null
      },
      "properties": {
        "date_of_birth": "2011-09-22"
      }
    },
    "relationships": {
      "lists": {
        "links": {
          "self": "https://a.klaviyo.com/api/profiles/…/relationships/lists/",
          "related": "https://a.klaviyo.com/api/profiles/…/lists/"
        }
      },
      "segments": {
        "links": {
          "self": "https://a.klaviyo.com/api/profiles/…/relationships/segments/",
          "related": "https://a.klaviyo.com/api/profiles/…/segments/"
        }
      }
    },
    "links": {
      "self": "https://a.klaviyo.com/api/profiles/…/"
    }
  }
}

Another example if the profile already exists

{
  "errors": [
    {
      "id": "ABC…",
      "status": 409,
      "code": "duplicate_profile",
      "title": "Conflict.",
      "detail": "A profile already exists with one of these identifiers.",
      "source": {
        "pointer": "/data/attributes"
      },
      "meta": {
        "duplicate_profile_id": "XYZ…"
      }
    }
  ]
}

For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

Dean Marc

Part of the more nomadic tribe of humanity, Dean believes a boat anchored ashore, while safe, is a tragedy, as this denies the boat its purpose. Dean normally works as a strategist, advisor, operator, mentor, coder, and janitor for several technology companies, open-source communities, and startups. Otherwise, he's on a hunt for some good bean or leaf to enjoy a good read on some newly (re)discovered city or walking roads less taken with his little one.

Related Topics
  • API
  • Klaviyo
  • Tutorial
You May Also Like
View Post
  • Engineering
  • Technology

Apple supercharges its tools and technologies for developers to foster creativity, innovation, and design

  • June 9, 2025
View Post
  • Engineering

Just make it scale: An Aurora DSQL story

  • May 29, 2025
View Post
  • Engineering
  • Technology

Guide: Our top four AI Hypercomputer use cases, reference architectures and tutorials

  • March 9, 2025
View Post
  • Computing
  • Engineering

Why a decades old architecture decision is impeding the power of AI computing

  • February 19, 2025
View Post
  • Engineering
  • Software Engineering

This Month in Julia World

  • January 17, 2025
View Post
  • Engineering
  • Software Engineering

Google Summer of Code 2025 is here!

  • January 17, 2025
View Post
  • Data
  • Engineering

Hiding in Plain Site: Attackers Sneaking Malware into Images on Websites

  • January 16, 2025
View Post
  • Computing
  • Design
  • Engineering
  • Technology

Here’s why it’s important to build long-term cryptographic resilience

  • December 24, 2024

Stay Connected!
LATEST
  • Send SMS texts with Amazon’s SNS simple notification service
    • July 1, 2025
  • Camping 2
    The Summer Adventures : Camping Essentials
    • June 27, 2025
  • Host a static website on AWS with Amazon S3 and Route 53
    • June 27, 2025
  • Prioritize security from the edge to the cloud
    • June 25, 2025
  • 6 edge monitoring best practices in the cloud
    • June 25, 2025
  • Genome 6
    AlphaGenome: AI for better understanding the genome
    • June 25, 2025
  • 7
    Pure Accelerate 2025: All the news and updates live from Las Vegas
    • June 18, 2025
  • 8
    ‘This was a very purposeful strategy’: Pure Storage unveils Enterprise Data Cloud in bid to unify data storage, management
    • June 18, 2025
  • What is cloud bursting?
    • June 18, 2025
  • 10
    There’s a ‘cloud reset’ underway, and VMware Cloud Foundation 9.0 is a chance for Broadcom to pounce on it
    • June 17, 2025
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • Oracle adds xAI Grok models to OCI
    • June 17, 2025
  • What is confidential computing?
    • June 17, 2025
  • Fine-tune your storage-as-a-service approach
    • June 16, 2025
  • 4
    Advanced audio dialog and generation with Gemini 2.5
    • June 15, 2025
  • Google Cloud, Cloudflare struck by widespread outages
    • June 12, 2025
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.