PHPackages                             examinecom/convertkit - 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. examinecom/convertkit

ActiveLibrary[API Development](/categories/api)

examinecom/convertkit
=====================

An API wrapper for ConvertKit

1.3(8y ago)04.7kGPL-2.0+PHPPHP &gt;=5.3.3

Since Sep 25Pushed 8y ago1 watchersCompare

[ Source](https://github.com/examinecom/convertkit)[ Packagist](https://packagist.org/packages/examinecom/convertkit)[ RSS](/packages/examinecom-convertkit/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (9)Used By (0)

Developed for [Examine.com](https://examine.com)

ConvertKit API Wrapper
======================

[](#convertkit-api-wrapper)

SDK for the [ConvertKit V3 API](http://kb.convertkit.com/article/api-documentation-v3/)

Based on original documentation located here:

[**composer**](https://getcomposer.org/) is the recommended way to install the SDK.

It is available at [https://packagist.org](https://packagist.org/packages/examinecom/convertkit). To use it in your project, you need to include it as a dependency in your project composer.json file.

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

[](#installation)

1. Download [Composer](https://getcomposer.org/download/) if not already installed
2. Go to your project directory. If you do not have one, just create a directory and `cd` in.

    ```
    mkdir project
    cd project
    ```
3. Execute `composer require "examinecom/convertkit:*" ` on command line. Replace composer with composer.phar if required. It should show something like this:

    ```
    > composer require "examinecom/convertkit:*"

    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    - Installing examinecom/convertkit (0.1)
    Loading from cache

    Writing lock file
    Generating autoload files
    ```

How to use
----------

[](#how-to-use)

1. Make sure you are auto-loading Composer in your bootstrap file or main php file:

    ```
    require_once __DIR__ . '/vendor/autoload.php';
    ```
2. In your class or PHP file, include the namespace of the class:

    ```
    use \Examinecom\ConvertKit\ConvertKit;
    ```
3. In your constructor or wherever you want to instantiate / use the API, create a new instance of the class and use your **APP\_ID** and **API\_KEY** as the parameters:

    ```
    $this->client = new ConvertKit("{API_KEY}", "{API_SECRET}");
    ```
4. Call one of the methods to access the API:

    ```
    $response = $this->client->tags()->all();
    var_dump($response);
    ```

Sample code
-----------

[](#sample-code)

```
