Skip to main content

Install

Prepare the example

Use Go 1.23 or later in an initialized module. Set LEADPING_API_KEY, replace lead-id with an existing record in that organization, and save the example as main.go. Run it with go run .. The context timeout bounds how long this example waits for its read. In a service, derive the timeout from the incoming request or job context.

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.

Call routes

Use this pattern inside a function that receives a context and returns an error:
The SDK does not store credentials. Use generated request-body interfaces when creating or updating records, confirm contracts in the API Reference, and follow the rate-limit guide. Generated getters commonly return pointers for optional values. Check for nil before dereferencing. The console example uses panic to stop on failure; a service should return or classify the error so its worker can apply a bounded retry or request investigation.