leadpinggo

package module
v1.0.64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 33 Imported by: 0

README

Leadping Leadping Go SDK

The official, type-safe Go SDK for the Leadping API. Use it to integrate lead management, conversations, SMS and calling, automations, reporting, billing, and business settings into Go services.

The module is generated from the Leadping OpenAPI specification with Microsoft Kiota. It contains request builders and models; your application supplies the HTTP request adapter, credentials, retry policy, and credential storage.

Installation

Install the SDK and a Go-compatible version of Kiota's net/http adapter:

go get github.com/leadpingai/leadping-go
go get github.com/microsoft/kiota-http-go@v1.4.0

Authentication

Set LEADPING_API_KEY to a WorkOS organization API key (sk_...). The SDK sends it as Authorization: Bearer <credential>. User access tokens are also supported when acting for a signed-in user; lp_src_... keys are only for lead-ingestion endpoints. See API authentication.

Create a client

Kiota's API-key authentication provider can place the complete Bearer value in the Authorization header:

package main

import (
    "context"
    "fmt"
    "os"

    leadping "github.com/leadpingai/leadping-go"
    auth "github.com/microsoft/kiota-abstractions-go/authentication"
    kiotahttp "github.com/microsoft/kiota-http-go"
)

func main() {
    credential := os.Getenv("LEADPING_API_KEY")
    if credential == "" {
        panic("LEADPING_API_KEY is not set")
    }

    authProvider, err := auth.NewApiKeyAuthenticationProviderWithValidHosts(
        "Bearer "+credential,
        "Authorization",
        auth.HEADER_KEYLOCATION,
        []string{"api.leadping.ai"},
    )
    if err != nil {
        panic(err)
    }

    adapter, err := kiotahttp.NewNetHttpRequestAdapter(authProvider)
    if err != nil {
        panic(err)
    }

    client := leadping.NewLeadpingOpenApiClient(adapter)

    lead, err := client.Leads().ById("lead-id").Get(context.Background(), nil)
    if err != nil {
        panic(err)
    }

    fmt.Println(lead.GetId())
}

The client defaults to https://api.leadping.ai.

Common operations

Request builders mirror the API path. Methods such as ById select a resource; terminal methods send the request.

ctx := context.Background()

// Requires a user access token.
currentUser, err := client.Users().Me().Get(ctx, nil)

// Retrieve organization resources by ID.
source, err := client.Sources().ById("source-id").Get(ctx, nil)
lead, err := client.Leads().ById("lead-id").Get(ctx, nil)

Create and update operations accept generated request-model interfaces from the models package. Pass the caller's context.Context to each SDK method.

Resources

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LeadpingOpenApiClient

LeadpingOpenApiClient the main entry point of the SDK, exposes the configuration and the fluent API.

func NewLeadpingOpenApiClient

NewLeadpingOpenApiClient instantiates a new LeadpingOpenApiClient and sets the default values.

func (*LeadpingOpenApiClient) A2a added in v1.0.46

A2a the a2a property returns a *A2aRequestBuilder when successful

func (*LeadpingOpenApiClient) Analytics

Analytics the analytics property returns a *AnalyticsRequestBuilder when successful

func (*LeadpingOpenApiClient) Automations

Automations the automations property returns a *AutomationsRequestBuilder when successful

func (*LeadpingOpenApiClient) Blog added in v1.0.49

Blog the blog property returns a *BlogRequestBuilder when successful

func (*LeadpingOpenApiClient) Conversations

Conversations the conversations property returns a *ConversationsRequestBuilder when successful

func (*LeadpingOpenApiClient) Events

Events the events property returns a *EventsRequestBuilder when successful

func (*LeadpingOpenApiClient) Feedback

Feedback the feedback property returns a *FeedbackRequestBuilder when successful

func (*LeadpingOpenApiClient) LeadStatusChanges added in v1.0.29

LeadStatusChanges the leadStatusChanges property returns a *LeadStatusChangesRequestBuilder when successful

func (*LeadpingOpenApiClient) LeadStatuses added in v1.0.21

LeadStatuses the leadStatuses property returns a *LeadStatusesRequestBuilder when successful

func (*LeadpingOpenApiClient) Leads

Leads the leads property returns a *LeadsRequestBuilder when successful

func (*LeadpingOpenApiClient) Notifications

Notifications the notifications property returns a *NotificationsRequestBuilder when successful

func (*LeadpingOpenApiClient) Organizations added in v1.0.29

Organizations the organizations property returns a *OrganizationsRequestBuilder when successful

func (*LeadpingOpenApiClient) Outbound

Outbound the outbound property returns a *OutboundRequestBuilder when successful

func (*LeadpingOpenApiClient) PaymentMethods

PaymentMethods the paymentMethods property returns a *PaymentMethodsRequestBuilder when successful

func (*LeadpingOpenApiClient) PhoneCall added in v1.0.12

PhoneCall the phoneCall property returns a *PhoneCallRequestBuilder when successful

func (*LeadpingOpenApiClient) PhoneNumbers

PhoneNumbers the phoneNumbers property returns a *PhoneNumbersRequestBuilder when successful

func (*LeadpingOpenApiClient) Reports

Reports the reports property returns a *ReportsRequestBuilder when successful

func (*LeadpingOpenApiClient) Sms

Sms the sms property returns a *SmsRequestBuilder when successful

func (*LeadpingOpenApiClient) Sources

Sources the sources property returns a *SourcesRequestBuilder when successful

func (*LeadpingOpenApiClient) Suppressions added in v1.0.12

Suppressions the suppressions property returns a *SuppressionsRequestBuilder when successful

func (*LeadpingOpenApiClient) Tags

Tags the tags property returns a *TagsRequestBuilder when successful

func (*LeadpingOpenApiClient) Telephony added in v1.0.12

Telephony the telephony property returns a *TelephonyRequestBuilder when successful

func (*LeadpingOpenApiClient) Transactions

Transactions the transactions property returns a *TransactionsRequestBuilder when successful

func (*LeadpingOpenApiClient) Usage

Usage the usage property returns a *UsageRequestBuilder when successful

func (*LeadpingOpenApiClient) Users

Users the users property returns a *UsersRequestBuilder when successful

func (*LeadpingOpenApiClient) Wallets

Wallets the wallets property returns a *WalletsRequestBuilder when successful

func (*LeadpingOpenApiClient) WellKnown added in v1.0.46

WellKnown the wellKnown property returns a *WellKnownRequestBuilder when successful

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL