HealthForms.Api.Core 1.0.15

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

HealthForms.io Public API Library

NuGet NuGet License: MIT

A .NET client library for integrating with the HealthForms.io API. Manage sessions, session members, and webhook subscriptions. Available on NuGet.

Targets: .NET Standard 2.0 (compatible with .NET Framework 4.6.1+, .NET Core 2.0+, .NET 5+)

Build Status

Package Build
HealthForms.Api Library - Build and Deploy
HealthForms.Api.Core Core - Build and Deploy

Installation

dotnet add package HealthForms.Api

The HealthForms.Api.Core package (models only, no HTTP dependencies) is included automatically as a dependency.

Quick Start (.NET Core / .NET 5+)

1. Add Configuration

Add the following to your appsettings.json:

{
    "HealthForms": {
        "ClientId": "your-client-id",
        "ClientSecret": "your-client-secret",
        "RedirectUrl": "https://yourapp.com/callback"
    }
}

2. Register Services

var healthFormsSection = builder.Configuration.GetSection(HealthFormsApiOptions.Key);
builder.Services.AddHealthForms(healthFormsSection);

This registers IHealthFormsApiHttpClient as a typed HttpClient with automatic retry policies (Polly with jittered exponential backoff).

3. Inject and Use

public class SampleController : Controller
{
    private readonly IHealthFormsApiHttpClient _healthFormsApi;

    public SampleController(IHealthFormsApiHttpClient healthFormsApi)
    {
        _healthFormsApi = healthFormsApi;
    }

    public async Task<IActionResult> GetMembers(string tenantToken, string tenantId, string sessionId)
    {
        var response = await _healthFormsApi.GetSessionMembers(tenantToken, tenantId, sessionId);
        if (response.IsSuccess)
        {
            return Ok(response.Data);
        }
        return StatusCode(response.StatusCode, response.ErrorMessage);
    }
}

Authentication & Authorization

The HealthForms API uses OAuth with PKCE to authenticate and authorize access. Each customer tenant must authorize your app through a 3-step flow:

Step 1: Obtain the Tenant ID from the customer. This is available at https://app.healthforms.io/manage/billing.

Step 2: Generate the authorization redirect URL and redirect the user:

var authRedirect = healthFormsApi.GetRedirectUrl(tenantId);

// Store authRedirect.CodeVerifier where your callback endpoint can access it (e.g., session state)
// Redirect the user to authRedirect.Uri

The user will be prompted to consent to your app accessing their data. After clicking Allow, HealthForms.io redirects back to your configured RedirectUrl with an authorization code.

Step 3: Exchange the authorization code for a tenant token:

var tenantToken = await healthFormsApi.GetTenantToken(code, codeVerifier);

// Store tenantToken securely - this is the refresh token that grants ongoing access to this tenant

The tenant token is a refresh token. The library automatically handles exchanging it for short-lived access tokens and caching them.

API Methods

All API methods return HealthFormsApiResponse<T> which wraps the response with Data, StatusCode, IsSuccess, ErrorMessage, and Error properties. Check IsSuccess before accessing Data.

Sessions

// List sessions with pagination
var sessions = await api.GetSessions(tenantToken, tenantId, startDate, page: 1);

// Follow pagination
if (sessions.Data.NextUri != null)
    var nextPage = await api.GetSessions(tenantToken, sessions.Data.NextUri);

// Get a single session
var session = await api.GetSession(tenantToken, tenantId, sessionId);

// Get a lightweight list for dropdowns/selects
var selectList = await api.GetSessionSelectList(tenantToken, tenantId, startDate);

Session Members

// List members with pagination
var members = await api.GetSessionMembers(tenantToken, tenantId, sessionId, page: 1);

// Get a single member (by ID, external ID, or external attendee ID)
var member = await api.GetSessionMember(tenantToken, tenantId, sessionId, memberId);
var member = await api.GetSessionMemberByExternalId(tenantToken, tenantId, sessionId, externalId);
var member = await api.GetSessionMemberByExternalAttendeeId(tenantToken, tenantId, sessionId, externalAttendeeId);

// Search members
var results = await api.SearchSessionMember(tenantToken, tenantId, sessionId, new SessionMemberSearchRequest
{
    ExternalAttendeeId = "attendee-123",
    ExternalMemberId = "member-456"
});

// Add a member
var added = await api.AddSessionMember(tenantToken, tenantId, sessionId, new AddSessionMemberRequest
{
    FirstName = "John",
    LastName = "Doe",
    Email = "john@example.com",
    Phone = "555-555-5555",
    ExternalAttendeeId = "attendee-123",
    SendInvitationOn = DateTime.UtcNow.AddDays(1)
});

// Bulk add members (up to 1,000 per request)
var bulkStart = await api.AddSessionMembers(tenantToken, tenantId, sessionId, memberList);
// Poll for completion
var status = await api.GetAddSessionMembersStatus(tenantToken, tenantId, sessionId, bulkStart.Data.Id);

// Update a member
var updated = await api.UpdateSessionMember(tenantToken, tenantId, sessionId, updateRequest);

// Delete a member (by ID, external ID, or external attendee ID)
var deleted = await api.DeleteSessionMember(tenantToken, tenantId, sessionId, memberId);
var deleted = await api.DeleteSessionMemberByExternalId(tenantToken, tenantId, sessionId, externalId);
var deleted = await api.DeleteSessionMemberByExternalAttendeeId(tenantToken, tenantId, sessionId, externalAttendeeId);

Webhooks

// List webhook subscriptions
var webhooks = await api.GetWebhookSubscriptions(tenantToken, tenantId);

// Subscribe to events
var subscription = await api.AddWebhookSubscription(tenantToken, tenantId, new WebhookSubscriptionRequest
{
    EndpointUrl = "https://yourapp.com/webhook",
    Type = WebhookType.SessionMemberAdded
});

// Delete a subscription
await api.DeleteWebhookSubscription(tenantToken, tenantId, webhookId);

Available webhook types: SessionAdded, SessionRemoved, SessionUpdated, SessionMemberAdded, SessionMemberRemoved, SessionMemberUpdated.

.NET Framework 4.6.2+

For projects not using dependency injection, use the HealthFormsApiHttpClientDisposable class which manages the HttpClient lifecycle:

var options = new HealthFormsApiOptions
{
    ClientId = "your-client-id",
    ClientSecret = "your-client-secret",
    RedirectUrl = "https://yourapp.com/callback"
};

using var client = new HealthFormsApiHttpClientDisposable(new HttpClient(), options);

var sessions = await client.GetSessions(tenantToken, tenantId, DateTime.Today);

Follow the Authentication & Authorization steps above to obtain the tenant token.

Packages

Package Description
HealthForms.Api Full client library with HTTP client, OAuth, DI extensions, and retry policies
HealthForms.Api.Core Models and DTOs only (no HTTP dependencies)

License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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 HealthForms.Api.Core:

Package Downloads
HealthForms.Api

Use this package to interface with HealthForms.io.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.15 170 3/3/2026
1.0.14 91 3/2/2026
1.0.11 195 2/22/2026
1.0.10 93 2/21/2026
1.0.9 106 2/19/2026
1.0.8 361 12/11/2025
1.0.7 145 12/11/2025
1.0.5 449 12/30/2024
1.0.3 778 6/26/2024
1.0.2 401 5/27/2024
1.0.1 272 5/24/2024
1.0.0 995 2/9/2024
Loading failed

Added Models/FormPacket namespace with AddFormPacketFormRequest, and moved CreateFormPacketRequest, UpdateFormPacketRequest, FormPacketResponse from FormType namespace. Added AddMemberFormRequest and AddMemberFormPacketRequest to SessionMember models. Removed FormPackets from UpdateSessionMemberRequest (use dedicated add/remove endpoints instead).