diff --git a/src/ConvertKit_API.php b/src/ConvertKit_API.php index a816750..b2cf385 100644 --- a/src/ConvertKit_API.php +++ b/src/ConvertKit_API.php @@ -19,6 +19,13 @@ */ class ConvertKit_API { + /** + * The SDK version. + * + * @var string + */ + public const VERSION = '1.0.0'; + /** * ConvertKit API Key * @@ -95,7 +102,15 @@ public function __construct(string $api_key, string $api_secret, bool $debug = f $this->api_key = $api_key; $this->api_secret = $api_secret; $this->debug = $debug; - $this->client = new Client(); + + // Specify a User-Agent for API requests. + $this->client = new Client( + [ + 'headers' => [ + 'User-Agent' => 'ConvertKitPHPSDK/' . self::VERSION . ';PHP/' . phpversion(), + ], + ] + ); if ($debug) { $this->debug_logger = new Logger('ck-debug');