PHPackages                             siro/php-klaviyo-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. siro/php-klaviyo-api

ActiveLibrary[API Development](/categories/api)

siro/php-klaviyo-api
====================

Low level but elegant Klaviyo full API wrapper for PHP with asynchronous track event support

1.6.0(5y ago)16115.4k↓40.5%7MITPHPPHP ^7.1 || ^8.0CI failing

Since Apr 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/SiroDiaz/php-klaviyo-api)[ Packagist](https://packagist.org/packages/siro/php-klaviyo-api)[ RSS](/packages/siro-php-klaviyo-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (13)Used By (0)

php-klaviyo-api
===============

[](#php-klaviyo-api)

[![Build Status](https://camo.githubusercontent.com/670a64f261efd5e8e27f1613c9234223fe88ab5e7562bd0d2d08985861ab4af4/68747470733a2f2f7472617669732d63692e6f72672f5369726f4469617a2f7068702d6b6c617669796f2d6170692e7376673f6272616e63683d646576)](https://travis-ci.org/SiroDiaz/php-klaviyo-api)[![paypal](https://camo.githubusercontent.com/e1ff554a09e8e92bef25abc553ff05b88f45afd695877cf12f3a46558ef65b2e/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f656e5f55532f692f62746e2f62746e5f646f6e61746543435f4c472e676966)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3XKLA6VTYVSKW&source=url)

Klaviyo API wrapper for PHP. It allows to consume the Klaviyo v1 API using a clear and simple PHP class format for make the usage user-friendly. Stuff like delete a list is as logic as doing: `$klaviyo->list->delete('asdD2e2')`. Easy, isn't it?

Installation
------------

[](#installation)

Installing php-klaviyo-api is simple. You just need Composer installed and added to the path. For install the current last version run:

`composer require siro/php-klaviyo-api:"^1.6.0"`

Usage
-----

[](#usage)

### API organization and usage

[](#api-organization-and-usage)

The php-klaviyo-api is organized as the official Klaviyo API, really. If you want to access to event API you must do as follow:

```
// klaviyo Event API
$klaviyo->event->track($event, $customerProperties, $properties);
$klaviyo->event->trackAsync($event, $customerProperties, $properties);

// email template API
$klaviyo->template->getAll();
$klaviyo->template->create('newuser', $htmlString);

// lists API
$klaviyo->list->getLists();
$klaviyo->list->create('premium');
```

A real example would be as i show here:

```
