Soenneker.Close.OpenApiClient 4.0.45

Prefix Reserved
dotnet add package Soenneker.Close.OpenApiClient --version 4.0.45
                    
NuGet\Install-Package Soenneker.Close.OpenApiClient -Version 4.0.45
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Close.OpenApiClient" Version="4.0.45" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Close.OpenApiClient" Version="4.0.45" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Close.OpenApiClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Close.OpenApiClient --version 4.0.45
                    
#r "nuget: Soenneker.Close.OpenApiClient, 4.0.45"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Close.OpenApiClient@4.0.45
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Close.OpenApiClient&version=4.0.45
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Close.OpenApiClient&version=4.0.45
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Close.OpenApiClient

A Kiota-generated .NET client for the Close CRM API.

Installation

dotnet add package Soenneker.Close.OpenApiClient

For dependency injection, authentication configuration, and client reuse, install the companion utility:

dotnet add package Soenneker.Close.OpenApiClientUtil
using Microsoft.Extensions.DependencyInjection;
using Soenneker.Close.OpenApiClientUtil.Registrars;

services.AddCloseOpenApiClientUtilAsSingleton();

Configure the Close API key under Close:ApiKey, then inject ICloseOpenApiClientUtil and call Get to obtain the generated client.

Direct construction

Close API keys use HTTP Basic authentication with the key as the username and an empty password:

using System.Net.Http.Headers;
using System.Text;
using Microsoft.Kiota.Abstractions.Authentication;
using Microsoft.Kiota.Http.HttpClientLibrary;
using Soenneker.Close.OpenApiClient;
using Soenneker.Close.OpenApiClient.Me;

string credentials = Convert.ToBase64String(
    Encoding.UTF8.GetBytes($"{apiKey}:"));

var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Authorization =
    new AuthenticationHeaderValue("Basic", credentials);

var authentication = new AnonymousAuthenticationProvider();
var adapter = new HttpClientRequestAdapter(
    authentication,
    httpClient: httpClient);

var close = new CloseOpenApiClient(adapter);

MeGetResponse? currentUser = await close.Me.GetAsync(
    request =>
    {
        request.QueryParameters.Fields = "id,name,organization_id";
    },
    cancellationToken);

AnonymousAuthenticationProvider is used because the dedicated HttpClient already carries the authorization header. Do not put Close credentials on an HTTP client that can send requests to unrelated hosts. See Close's API-key authentication documentation.

The generated root client mirrors Close's API paths. Common entry points include:

  • close.Me for the authenticated user.
  • close.Lead, close.Contact, and close.Opportunity for CRM records.
  • close.Activity, close.Task, and close.Event for work and activity data.
  • close.Sequence, close.Email_template, and close.Sms_template for outreach automation.
  • close.Webhook for webhook operations.

Names follow the OpenAPI description, including singular and underscore-separated request-builder properties.

Practical notes

  • Keep the HttpClient, request adapter, and generated client long-lived. The companion utility manages that lifecycle in dependency-injection applications.
  • Endpoint methods accept a request-configuration callback and cancellation token.
  • Generated return values may be nullable when the schema permits an empty response. Check results before dereferencing them.
  • Some endpoints return streams or other disposable content; dispose those results after use.
  • Service failures are surfaced through generated error models or Kiota exceptions according to each endpoint's schema mapping.
  • Public request builders and models can change when the source OpenAPI description changes.
  • Files under src/Soenneker.Close.OpenApiClient are generated. Keep application behavior and custom models in a separate project.
  • Never log or commit Close API keys, OAuth tokens, or authorization headers.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.Close.OpenApiClient:

Package Downloads
Soenneker.Close.OpenApiClientUtil

A thread-safe utility for obtaining Close's OpenApiClient singleton.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.45 0 9/14/2026
4.0.44 89 9/12/2026
4.0.43 63 9/11/2026
4.0.42 62 9/9/2026
4.0.41 95 9/8/2026
4.0.40 67 9/8/2026
4.0.39 212 9/4/2026
4.0.38 128 9/4/2026
4.0.37 150 9/4/2026
4.0.36 116 9/3/2026
4.0.35 120 9/3/2026
4.0.34 107 9/3/2026
4.0.33 120 9/1/2026
4.0.32 126 8/31/2026
4.0.31 140 8/31/2026
4.0.30 100 8/30/2026
4.0.29 188 8/30/2026
4.0.28 94 8/29/2026
4.0.27 168 8/28/2026
4.0.26 163 8/25/2026
Loading failed