Skip to main content

Install

Prepare the example

Use a console application compatible with the installed SDK and place the example in Program.cs. It uses top-level statements and collection expressions. Set LEADPING_API_KEY in the application environment and replace lead-id with an existing record in that organization. The request below is read-only. Run it with dotnet run from the application directory after adding the packages.

Create the client

The client defaults to https://api.leadping.ai. Set LEADPING_API_KEY to an organization API key. client.Users.Me requires a user access token; source keys are only for lead intake. The SDK does not store or refresh credentials. See API Authentication.

Call routes

Use generated request-body and model classes from Leadping.OpenApiClient when creating or updating records. Confirm endpoint contracts in the API Reference, and handle 429 responses using the rate-limit guide.

Use in a hosted service

Manage the HTTP client and request adapter with your application’s service lifetime, and pass the job or HTTP request’s cancellation token to SDK methods. Cancellation of a write stops your wait; it does not prove that Leadping rolled back the operation. Keep API failures visible to your application’s error handler. Distinguish an HTTP error from a null optional property, and review the adapter’s retry middleware before adding retries around write calls.