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  Using The Local Timezone With Cloud SQL For SQL Server

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

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
IBM and Ferrari Premium Partner
View Post
  • Data
  • Engineering

IBM Selected as Official Fan Engagement and Data Analytics Partner for Scuderia Ferrari HP

  • November 7, 2024
View Post
  • Engineering

Transforming the Developer Experience for Every Engineering Role

  • July 14, 2024

Stay Connected!
LATEST
  • Gemma 3n 1
    Announcing Gemma 3n preview: powerful, efficient, mobile-first AI
    • May 22, 2025
  • oracle-ibm 2
    Google Cloud and Philips Collaborate to Drive Consumer Marketing Innovation and Transform Digital Asset Management with AI
    • May 20, 2025
  • notta-ai-header 3
    Notta vs Fireflies: Which AI Transcription Tool Deserves Your Attention in 2025?
    • May 16, 2025
  • college-of-cardinals-2025 4
    The Definitive Who’s Who of the 2025 Papal Conclave
    • May 7, 2025
  • conclave-poster-black-smoke 5
    The World Is Revalidating Itself
    • May 6, 2025
  • oracle-ibm 6
    IBM and Oracle Expand Partnership to Advance Agentic AI and Hybrid Cloud
    • May 6, 2025
  • 7
    Conclave: How A New Pope Is Chosen
    • April 25, 2025
  • Getting things done makes her feel amazing 8
    Nurturing Minds in the Digital Revolution
    • April 25, 2025
  • 9
    AI is automating our jobs – but values need to change if we are to be liberated by it
    • April 17, 2025
  • 10
    Canonical Releases Ubuntu 25.04 Plucky Puffin
    • April 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
  • 1
    United States Army Enterprise Cloud Management Agency Expands its Oracle Defense Cloud Services
    • April 15, 2025
  • 2
    Tokyo Electron and IBM Renew Collaboration for Advanced Semiconductor Technology
    • April 2, 2025
  • 3
    IBM Accelerates Momentum in the as a Service Space with Growing Portfolio of Tools Simplifying Infrastructure Management
    • March 27, 2025
  • 4
    Tariffs, Trump, and Other Things That Start With T – They’re Not The Problem, It’s How We Use Them
    • March 25, 2025
  • 5
    IBM contributes key open-source projects to Linux Foundation to advance AI community participation
    • March 22, 2025
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.