Skip to main content

Install

go get github.com/leadpingai/leadping-go
Install a Kiota HTTP adapter in the application that will call Leadping:
go get github.com/microsoft/kiota-http-go

Create a client

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

import (
    "context"

    leadping "github.com/leadpingai/leadping-go"
)

func main() {
    ctx := context.Background()
    requestAdapter := createLeadpingRequestAdapter()
    client := leadping.NewLeadpingOpenApiClient(requestAdapter)

    me, err := client.Users().Me().Get(ctx, nil)
    if err != nil {
        panic(err)
    }

    _ = me
}
createLeadpingRequestAdapter is your application code. The generated SDK does not own token storage or API key handling.

Common calls

source, err := client.Sources().ById("source-id").Get(ctx, nil)
lead, err := client.Leads().ById("lead-id").Get(ctx, nil)
currentUser, err := client.Users().Me().Get(ctx, nil)
Use generated request body interfaces from the module when creating or updating records.