ChatWootApi 0.9.7

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

ChatWootApi

English | 简体中文

Strongly typed .NET interfaces and models for the Chatwoot REST APIs, built on Refit. The package covers Application, Client, and Platform API surfaces.

Installation

Install the API interfaces and models:

dotnet add package ChatWootApi

Most applications should also install the dependency-injection extensions:

dotnet add package ChatWootApi.Extensions

Dependency injection

ChatWootApi.Extensions configures Refit, HttpClient, JSON serialization, and the api_access_token request header.

Configure the Chatwoot base URL and tokens in appsettings.json:

{
  "ChatWootApi": {
    "BaseAddress": "https://app.chatwoot.com/",
    "AccountAccessToken": "your-account-access-token",
    "PlatformAccessToken": "your-platform-access-token"
  }
}

Register the API groups you need:

using ChatWootApi.Extensions;

builder.Services.AddChatWootApplicationApi(builder.Configuration);
builder.Services.AddChatWootClientApi(builder.Configuration);
builder.Services.AddChatWootPlatformApi(builder.Configuration);

Inject a specific API interface and call it directly:

using ChatWootApi.Application;

public sealed class ContactService(IApplicationContactsApi contactsApi)
{
    public Task<ContactsListResponse> GetContactsAsync(
        long accountId,
        CancellationToken cancellationToken = default)
    {
        return contactsApi.ContactListAsync(accountId, cancellationToken);
    }
}

Application API also provides the aggregate IChatWootApplicationApi interface for accessing all implemented Application API methods through one service.

Handling Chatwoot webhooks

Webhook payload handling, signature verification notes, event field mapping, and ASP.NET Core examples now live in WEBHOOKS.md.

Temporarily switching Application API access tokens

Application API api_access_token values are user-level tokens and often need to switch per request. With ChatWootApi.Extensions, inject the default AccessTokenProvider and scope the Application access token to the current async flow with using:

using ChatWootApi.Application;
using ChatWootApi.Extensions;

app.MapGet("/contacts", async (
    long accountId,
    string userAccessToken,
    AccessTokenProvider accessTokenProvider,
    IApplicationContactsApi contactsApi,
    CancellationToken cancellationToken) =>
{
    using var applicationAccessToken = accessTokenProvider.UseApplicationAccessToken(userAccessToken);

    return await contactsApi.ContactListAsync(accountId, cancellationToken);
});

The scope uses AsyncLocal: an inner scope temporarily overrides the outer token and restores it when disposed. Platform API calls continue to use the configured PlatformAccessToken. If no scope exists and no AccountAccessToken is configured, Application API calls throw the same missing-configuration exception.

You can also replace the token source entirely by registering your own IAccessTokenProvider before calling the Chatwoot registration extensions. The extensions use TryAddSingleton, so they do not override an existing implementation:

builder.Services.AddSingleton<IAccessTokenProvider, TenantAccessTokenProvider>();
builder.Services.AddChatWootApplicationApi(builder.Configuration);
builder.Services.AddChatWootPlatformApi(builder.Configuration);

Client API uses public inbox identifiers and does not require Account or Platform access tokens.

Implemented APIs

The following list is grouped by Chatwoot API tag.

<details> <summary><strong>Application API</strong></summary>

  • IChatWootApplicationApi: aggregate interface for all Application APIs
  • IApplicationAccountApi: Account
  • IApplicationAccountAgentBotsApi: Account Agent Bots
  • IApplicationAgentsApi: Agents
  • IApplicationAuditLogsApi: Audit Logs
  • IApplicationAutomationRuleApi: Automation Rules
  • IApplicationCannedResponsesApi: Canned Responses
  • IApplicationContactLabelsApi: Contact Labels
  • IApplicationContactsApi: Contacts
  • IApplicationConversationAssignmentsApi: Conversation Assignments
  • IApplicationConversationsApi: Conversations
  • IApplicationCustomAttributesApi: Custom Attributes
  • IApplicationCustomFiltersApi: Custom Filters
  • IApplicationHelpCenterApi: Help Center
  • IApplicationInboxesApi: Inboxes
  • IApplicationIntegrationsApi: Integrations
  • IApplicationLabelsApi: Labels
  • IApplicationMessagesApi: Messages
  • IApplicationProfileApi: Profile
  • IApplicationReportsApi: Reports
  • IApplicationTeamsApi: Teams
  • IApplicationWebhooksApi: Webhooks

</details>

<details> <summary><strong>Client API</strong></summary>

  • IClientInboxApi: Inbox
  • IClientContactApi: Contacts
  • IClientConversationApi: Conversations
  • IClientMessageApi: Messages

</details>

<details> <summary><strong>Platform API</strong></summary>

  • IPlatformAccountApi: Accounts
  • IPlatformAccountUserApi: Account Users
  • IPlatformAgentBotApi: Agent Bots
  • IPlatformUserApi: Users and user login links

</details>

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.
  • net10.0

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ChatWootApi:

Package Downloads
ChatWootApi.Extensions

A typed .NET client for the Chatwoot API

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.9.7 122 7/23/2026
0.9.6 105 7/23/2026
0.9.5 107 7/23/2026
0.9.4 115 7/13/2026
0.9.3 117 7/13/2026
0.9.2 103 7/13/2026
0.9.1 117 7/13/2026
0.9.0 115 7/13/2026
0.8.0 120 7/10/2026
0.7.1 121 7/10/2026
0.7.0 120 7/10/2026
0.6.0 118 7/9/2026
0.4.0 120 7/7/2026
0.3.0 115 7/6/2026
0.2.0 121 7/6/2026
0.1.0 126 7/2/2026