Client CraftClient Craft HubStart free

The Client Craft .NET SDK

On this page
Updated 24 Nov 20262 min read

ClientCraft.Sdk is a server-side .NET 10 client for the Client Craft API, with safe defaults for credentials, retries and workspaces.

Plan: All plans. Needs an integration key

Use the SDK in trusted server code: a background job, an integration service, or your Umbraco site's server side. It has no CMS dependency. It keeps the integration key on the server, never retries a write on its own, and leaves every authorization decision to the API.

Before you start #

  • A .NET 10 application.
  • A workspace id and an integration key from an approved connection, stored in a secret provider.

Install and register #

bash
1dotnet add package ClientCraft.Sdk --prerelease
csharp
1using ClientCraft.Sdk;
2
3builder.Services.AddClientCraft(builder.Configuration.GetSection("uCRM"));

Then inject IClientCraftClient wherever you need it. The uCRM configuration section takes TenantId (or its aliases TenantIdentifier / Tenant), IntegrationKey and CrmApiBaseUrl (default https://api.client-craft.com/). The uCRM section name comes from Client Craft's earlier product name.

What the client covers #

MemberCovers
client.Crm.LeadsLeads: list, read, create, update, archive, restore, and linking a company
client.Crm.ContactsContacts: list, read, create, update, archive, restore
client.Crm.CompaniesCompanies: list, read, create, update, archive, restore
client.Crm.OperationsAttention and collection summaries, duplicate suggestions, saved view preferences
client.TenancyConnection discovery, current workspace, capabilities, directory, memberships
client.WebsiteAnalytics()Optional server-side website observation capabilities (extension method; add using ClientCraft.Sdk.Analytics;)
client.ForWorkspace(id)The same client aimed at another workspace. It grants nothing; the API checks access

Not in the SDK yet #

Forms, bookings, imports and deals have no SDK client yet. Use the API directly with a workspace API key for those, or wait for a later SDK release. See Create workspace API keys and webhooks.

Rules the SDK follows #

  • Credentials stay on the server. The integration key is redacted from ToString() and JSON serialization.
  • Creates need an idempotency key, updates need the record version. Updates are full-record PUTs.
  • No automatic retries of writes. After a timeout, retry yourself with the same idempotency key.
  • Workspace selection is not permission. ForWorkspace never widens access.
  • Errors are safe to log. ClientCraftApiException carries status, code and correlation id, never the response body.
NoteThe SDK is a preview (1.0.0-preview versions). Pin the exact version you tested.

What happens next #

Was this article helpful?