Served.SDK 1.4.0

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

Served.SDK

NuGet NuGet Downloads License: MIT .NET

The official .NET SDK for the Served API by UnifiedHQ. This library provides a strongly-typed, modern fluent client for interacting with the Served platform, covering Project Management, Task Tracking, Time Registration, Finance, DevOps, and more.

Resource URL
UnifiedHQ Platform unifiedhq.ai
Forge DevOps forge.unifiedhq.ai
API Documentation unifiedhq.ai/docs/api
MCP Server github.com/ThomasHelledi/served-mcp
NuGet Package nuget.org/packages/Served.SDK

Features

  • Module-Based API: Organized access through domain modules (e.g., client.ProjectManagement.Projects).
  • Generic & Abstract: Built on reusable base classes for consistent CRUD operations.
  • Strongly Typed: Full type safety for all Served entities (Projects, Tasks, Invoices, etc.).
  • Modern Async: Built from the ground up with async/await.
  • Bulk Operations: Support for batch create, update, and delete operations.
  • Error Handling: Custom ServedApiException provides detailed error context.
  • Backwards Compatible: Legacy client access patterns still supported.
  • Tracing & Observability: Built-in OpenTelemetry support with Forge platform integration.
  • Fork & Extend: Open source - fork and run your own pipelines.

Installation

dotnet add package Served.SDK

Quick Start

using Served.SDK.Client;

// Initialize with UnifiedHQ infrastructure (default)
var client = new ServedClientBuilder()
    .WithToken("YOUR_API_TOKEN")
    .WithTenant("YOUR_TENANT_SLUG")
    .WithTracing(options => options.EnableForge = true)  // Enable Forge analytics
    .Build();

// Get projects
var projects = await client.ProjectManagement.Projects.GetAllAsync();

// Create a task
var task = await client.ProjectManagement.Tasks.CreateAsync(new CreateTaskRequest
{
    Name = "My Task",
    ProjectId = projects.First().Id
});

// Log time
await client.Registration.TimeRegistrations.CreateAsync(new CreateTimeRegistrationRequest
{
    TaskId = task.Id,
    Minutes = 60,
    Description = "Working on task"
});

Configuration

Environment Variables

Variable Description Default
SERVED_API_URL API base URL https://apis.unifiedhq.ai
SERVED_TRACING_ENABLED Enable/disable tracing false
SERVED_SERVICE_NAME Service identifier served-sdk-client
FORGE_API_KEY Forge platform API key -
FORGE_ENDPOINT Forge telemetry endpoint https://apis.unifiedhq.ai/v1/telemetry

Initialization Options

// Simple initialization (uses UnifiedHQ infrastructure)
var client = new ServedClient(
    baseUrl: ServedClient.DefaultApiUrl,  // https://apis.unifiedhq.ai
    token: "YOUR_API_TOKEN",
    tenant: "YOUR_TENANT_SLUG"
);

// Builder pattern with full control
var client = new ServedClientBuilder()
    .WithBaseUrl("https://apis.unifiedhq.ai")
    .WithToken(token)
    .WithTenant("my-workspace")
    .WithTracing(options =>
    {
        options.ServiceName = "my-application";
        options.EnableForge = true;
        options.SamplingRate = 0.1;
    })
    .Build();

// Dependency injection for ASP.NET Core
services.AddHttpClient<IServedClient, ServedClient>(client =>
{
    client.BaseAddress = new Uri("https://apis.unifiedhq.ai");
    client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "TOKEN");
});

API Modules

Module Resources Description
ProjectManagement Projects, Tasks Project and task management
DevOpsModule Repositories, PullRequests, Pipelines DevOps integration
FinanceModule Invoices Invoice management
SalesModule Pipelines, Deals Sales pipeline and deals
Registration TimeRegistrations Time tracking
Companies Customers Customer management
Identity Employees, ApiKeys User and API key management
Calendar Agreements Appointments and agreements
Board Boards, Sheets Kanban boards
Reporting Dashboards, Datasources Reports and dashboards
Tenant Tenants, Workspaces Multi-tenant management

Tracing & Analytics

The SDK includes built-in tracing with OpenTelemetry support and Forge platform integration.

Enable Tracing

var client = new ServedClient("https://apis.unifiedhq.ai", token)
    .EnableTracing();

// Or with builder for full control
var client = new ServedClientBuilder()
    .WithToken(token)
    .WithTracing(options =>
    {
        options.ServiceName = "my-application";
        options.EnableForge = true;
        options.SamplingRate = 0.1;
    })
    .Build();

View Analytics

Once tracing is enabled, view your analytics at:

Custom Events

client.Tracer?.RecordEvent(new TelemetryEvent
{
    Type = TelemetryEventType.Custom,
    Name = "invoice.generated",
    Attributes = new Dictionary<string, object>
    {
        ["invoice.id"] = invoiceId,
        ["invoice.amount"] = amount
    }
});

Fork & Extend

This SDK is open source. Fork it to:

  1. Run Your Own Pipelines: Fork the repo and run CI/CD in your environment
  2. Extend Functionality: Add custom modules for your use case
  3. Contribute Back: Submit PRs to improve the SDK
# Clone your fork
git clone https://github.com/YOUR_USERNAME/served-sdk.git

# Build locally
dotnet build

# Run tests
dotnet test

# Create your own NuGet package
dotnet pack -c Release

Error Handling

try
{
    await client.ProjectManagement.Projects.GetAsync(99999);
}
catch (ServedApiException ex) when (ex.StatusCode == HttpStatusCode.NotFound)
{
    Console.WriteLine("Project not found.");
}
catch (ServedApiException ex)
{
    Console.WriteLine($"API Error: {ex.StatusCode} - {ex.Content}");
}

Support

License

MIT License - see LICENSE for details.


Built with love by UnifiedHQ

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
1.4.0 99 1/29/2026
1.2.0 92 1/17/2026
1.1.0 93 1/13/2026
1.0.0 183 12/21/2025

v1.4.0: UnifiedHQ ecosystem integration. Updated all endpoints to apis.unifiedhq.ai. Enhanced Forge observability with analytics dashboard. GitHub Fork support for custom pipelines. See https://unifiedhq.ai/docs for full documentation.