Soenneker.Apollo.OpenApiClient
11.0.49
Prefix Reserved
dotnet add package Soenneker.Apollo.OpenApiClient --version 11.0.49
NuGet\Install-Package Soenneker.Apollo.OpenApiClient -Version 11.0.49
<PackageReference Include="Soenneker.Apollo.OpenApiClient" Version="11.0.49" />
<PackageVersion Include="Soenneker.Apollo.OpenApiClient" Version="11.0.49" />
<PackageReference Include="Soenneker.Apollo.OpenApiClient" />
paket add Soenneker.Apollo.OpenApiClient --version 11.0.49
#r "nuget: Soenneker.Apollo.OpenApiClient, 11.0.49"
#:package Soenneker.Apollo.OpenApiClient@11.0.49
#addin nuget:?package=Soenneker.Apollo.OpenApiClient&version=11.0.49
#tool nuget:?package=Soenneker.Apollo.OpenApiClient&version=11.0.49
Soenneker.Apollo.OpenApiClient
A Kiota-generated .NET client and model set for Apollo's REST API.
The package is generated from Apollo's OpenAPI document and exposes typed request builders for the operations in that document. It intentionally does not decide how your application stores credentials or manages HttpClient lifetime.
For dependency injection, authentication, and client caching out of the box, use Soenneker.Apollo.OpenApiClientUtil.
Installation
dotnet add package Soenneker.Apollo.OpenApiClient
Create a client manually
Configure a reusable HttpClient, attach Apollo's API key, and give it to a Kiota request adapter:
using Microsoft.Kiota.Abstractions.Authentication;
using Microsoft.Kiota.Http.HttpClientLibrary;
using Soenneker.Apollo.OpenApiClient;
var httpClient = new HttpClient
{
BaseAddress = new Uri("https://api.apollo.io/api/v1")
};
httpClient.DefaultRequestHeaders.Add("x-api-key", apolloApiKey);
var authenticationProvider = new AnonymousAuthenticationProvider();
var requestAdapter = new HttpClientRequestAdapter(
authenticationProvider,
httpClient: httpClient);
var client = new ApolloOpenApiClient(requestAdapter);
AnonymousAuthenticationProvider is appropriate in this example because authentication is already applied to the HttpClient. Applications can instead provide another Kiota IAuthenticationProvider that adds the required header.
Do not create and dispose a new HttpClient for every API call. Reuse the client stack or let a DI-managed utility own it.
Make a request
Request builders follow Apollo's URL hierarchy. For example, retrieve the authenticated user profile and request credit usage:
using Soenneker.Apollo.OpenApiClient.Models;
GetCurrentUserProfile200Response? profile =
await client.Users.Api_profile.GetAsync(
request =>
{
request.QueryParameters.IncludeCreditUsage = true;
},
cancellationToken);
Endpoint methods accept a request-configuration callback for query parameters, headers, and Kiota request options. They also accept a CancellationToken.
The root client includes builders for areas such as:
- accounts, account stages, contacts, and contact stages;
- people and organization enrichment/search;
- conversations, phone calls, notes, and tasks;
- opportunities and opportunity stages;
- sequences, email accounts, campaigns, messages, and schedules;
- reports, usage statistics, user profiles, and webhook results.
Use IntelliSense from ApolloOpenApiClient to find the generated path and method for a particular endpoint.
Errors and generated models
Kiota maps documented non-success responses to generated exception classes. A profile request, for example, can throw GetCurrentUserProfile200Response401Error. Other endpoints may map 401, 403, 422, 429, or additional responses from Apollo's specification.
Generated response and request types implement Kiota serialization contracts. Unknown JSON fields are retained in AdditionalData, which helps clients tolerate additive API responses.
Regeneration considerations
This repository's API surface is generated and can change when Apollo updates its OpenAPI document:
- request-builder and model names reflect the source specification;
- endpoint documentation and error mappings come from that specification;
- generated files should not be edited as the durable way to customize behavior;
- application code should isolate important Apollo workflows behind its own services and models.
The default base URL embedded in the generated client is https://api.apollo.io/api/v1. A custom IRequestAdapter can supply a different BaseUrl for a proxy or test environment.
Recommended application setup
Applications using Microsoft dependency injection generally need only the higher-level utility:
using Soenneker.Apollo.OpenApiClientUtil.Registrars;
builder.Services.AddApolloOpenApiClientUtilAsSingleton();
See the OpenApiClientUtil package for configuration and injection examples.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Microsoft.Kiota.Http.HttpClientLibrary (>= 2.1.2)
- Microsoft.Kiota.Serialization.Form (>= 2.1.2)
- Microsoft.Kiota.Serialization.Json (>= 2.1.2)
- Microsoft.Kiota.Serialization.Multipart (>= 2.1.2)
- Microsoft.Kiota.Serialization.Text (>= 2.1.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Apollo.OpenApiClient:
| Package | Downloads |
|---|---|
|
Soenneker.Apollo.OpenApiClientUtil
A thread-safe utility for obtaining Apollo's OpenApiClient singleton. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.49 | 58 | 10/28/2026 |
| 11.0.48 | 80 | 10/27/2026 |
| 11.0.47 | 129 | 10/26/2026 |
| 11.0.46 | 112 | 10/26/2026 |
| 4.0.45 | 123 | 10/24/2026 |
| 4.0.44 | 102 | 10/22/2026 |
| 4.0.43 | 106 | 10/21/2026 |
| 4.0.42 | 114 | 10/20/2026 |
| 4.0.41 | 110 | 10/17/2026 |
| 4.0.40 | 125 | 10/14/2026 |
| 4.0.39 | 133 | 10/14/2026 |
| 4.0.34 | 116 | 10/13/2026 |
| 4.0.33 | 85 | 10/13/2026 |
| 4.0.32 | 137 | 10/12/2026 |
| 4.0.31 | 167 | 10/11/2026 |
| 4.0.30 | 88 | 10/10/2026 |
| 4.0.29 | 134 | 10/8/2026 |
| 4.0.27 | 137 | 9/29/2026 |
| 4.0.26 | 165 | 9/24/2026 |
| 4.0.24 | 130 | 9/21/2026 |
Update Soenneker.Apollo.OpenApiClient