Class responsible for communicating with ConvertKit
Composer:
composer require ebrahimpleite/convertkit
For details on how to use class, see the example folder with details in the component directory
<?php
require __DIR__ . "/../vendor/autoload.php";
$api_key = '';
$convertkit = new \EbrahimPLeite\ConvertKit\ConvertKit($api_key);
$subscribe = $convertkit->addSubscribe(
"123", //required (form_id)
"email@example.com", //required (email)
"Ebrahim", //required (first_name)
[123, 1234], //optional array separate tags ids with commas (tags)
"P. Leite" //optional (last_name)
);
var_dump($subscribe);
object(stdClass)#4 (1){
[
"subscription"
]=> object(stdClass)#2 (8){
[
"id"
]=> int(2899486245)[
"state"
]=> string(6)"active"[
"created_at"
]=> string(24)"2020-12-26T02:10:41.000Z"[
"source"
]=> string(43)"API::V3::SubscriptionsController (external)"[
"referrer"
]"=> NULL"[
"subscribable_id"
]=> int(1890238)[
"subscribable_type"
]=> string(4)"form"[
"subscriber"
]=> object(stdClass)#3 (1){
[
"id"
]=> int(1116010157)
}
}
}
Please see CONTRIBUTING for details.
Thank you
The MIT License (MIT). Please see License File for more information.