Skip to main content

Install

composer require leadpingai/sdk
Install the Kiota bundle in the application that will call Leadping:
composer require microsoft/kiota-bundle:^2.0.2

Create a client

The SDK exposes LeadpingOpenApiClient. Pass it a Kiota request adapter that attaches either Authorization: Bearer <token> or X-Leadping-Api-Key: <key>.
<?php

use Leadping\OpenApiClient\LeadpingOpenApiClient;

$requestAdapter = createLeadpingRequestAdapter();
$client = new LeadpingOpenApiClient($requestAdapter);

$me = $client->users()->me()->get()->wait();
createLeadpingRequestAdapter is your application code. The generated SDK does not own token storage or API key handling.

Common calls

$source = $client->sources()->byId("source-id")->get()->wait();
$lead = $client->leads()->byId("lead-id")->get()->wait();
$currentUser = $client->users()->me()->get()->wait();
Use generated request body classes from the Leadping\OpenApiClient namespace when creating or updating records.