Soenneker.Close.OpenApiClientUtil 4.0.85

Prefix Reserved
dotnet add package Soenneker.Close.OpenApiClientUtil --version 4.0.85
                    
NuGet\Install-Package Soenneker.Close.OpenApiClientUtil -Version 4.0.85
                    
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.OpenApiClientUtil" Version="4.0.85" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Close.OpenApiClientUtil" Version="4.0.85" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Close.OpenApiClientUtil" />
                    
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.OpenApiClientUtil --version 4.0.85
                    
#r "nuget: Soenneker.Close.OpenApiClientUtil, 4.0.85"
                    
#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.OpenApiClientUtil@4.0.85
                    
#: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.OpenApiClientUtil&version=4.0.85
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Close.OpenApiClientUtil&version=4.0.85
                    
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.OpenApiClientUtil

Provides an authenticated, cached instance of the Kiota-generated Close CRM API client.

Installation

dotnet add package Soenneker.Close.OpenApiClientUtil

API-key configuration

{
  "Close": {
    "ApiKey": "<Close API key>",
    "ClientBaseUrl": "https://api.close.com/api/v1"
  }
}

Close:ApiKey is required. The utility uses Close's HTTP Basic API-key scheme by default: the key is the username and the password is empty. See Close's authentication documentation.

For OAuth, place the access token in Close:ApiKey and set Close:AuthHeaderValueTemplate to Bearer {token}. Close:AuthHeaderName can override the default Authorization header name.

Keep API keys and OAuth tokens in a secret provider rather than source control.

Registration

using Microsoft.Extensions.DependencyInjection;
using Soenneker.Close.OpenApiClientUtil.Registrars;

services.AddCloseOpenApiClientUtilAsSingleton();

Use AddCloseOpenApiClientUtilAsScoped() when each dependency-injection scope should own its generated client and request adapter while sharing the singleton HTTP provider.

Usage

using Soenneker.Close.OpenApiClient.Me;
using Soenneker.Close.OpenApiClientUtil.Abstract;

public sealed class CloseProfileService
{
    private readonly ICloseOpenApiClientUtil _closeClients;

    public CloseProfileService(ICloseOpenApiClientUtil closeClients)
    {
        _closeClients = closeClients;
    }

    public async ValueTask<MeGetResponse?> GetCurrentUser(
        CancellationToken cancellationToken)
    {
        var close = await _closeClients.Get(cancellationToken);

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

Other root request builders include Lead, Contact, Opportunity, Activity, Task, Sequence, and Webhook. Names follow the generated OpenAPI surface.

Lifecycle and behavior

  • The first Get creates the HTTP client, Kiota request adapter, and generated client. Later calls on the same utility return that client.
  • Configuration and credentials are captured during first initialization. Recreate the owning scope or application instance after rotating them.
  • The token passed to Get cancels initialization only. Pass a cancellation token to each generated endpoint call.
  • Let dependency injection dispose ICloseOpenApiClientUtil. Disposal releases its request adapter; the singleton HTTP provider and cached HttpClient remain available until application shutdown.
  • Generated endpoint methods may return null when the schema permits an empty response.
  • Service failures are surfaced through generated error models or Kiota exceptions according to each endpoint's schema mapping.
  • Request builders and models can change when the generated-client package is refreshed from Close's OpenAPI description.
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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.85 0 9/15/2026
4.0.84 35 9/13/2026
4.0.83 40 9/13/2026
4.0.82 48 9/13/2026
4.0.81 42 9/13/2026
4.0.79 46 9/12/2026
4.0.78 37 9/12/2026
4.0.77 36 9/12/2026
4.0.76 42 9/12/2026
4.0.74 50 9/10/2026
4.0.73 45 9/9/2026
4.0.72 45 9/9/2026
4.0.71 65 9/9/2026
4.0.70 68 9/8/2026
4.0.69 81 9/8/2026
4.0.68 87 9/8/2026
4.0.67 84 9/8/2026
4.0.66 86 9/8/2026
4.0.65 98 9/7/2026
4.0.64 97 9/7/2026
Loading failed