The notion SDK for .NET provides access to the notion REST APIs from .NET applications.
The Notion API allows developers to integrate with Notion workspaces programmatically. Build integrations that connect Notion with other tools, automate workflows, and manage workspace content including pages, databases, blocks, users, comments, and search. Notion is an all-in-one workspace that combines notes, tasks, wikis, and databases into a flexible, collaborative platform.
Add the .NET SDK as a project reference into your solution:
dotnet add reference <path-to-sdk>/Notion.csprojRegister the client with IServiceCollection and resolve it from the container. The HttpClient is managed by IHttpClientFactory. Configure the client's behavior through NotionClientOptions.
services.AddNotionClient(options =>
{
options.BearerAuth = "YOUR_BEARER_TOKEN";
options.Environment = ServerEnvironment.Production;
// TODO: configure more client options here
});Create the client by passing an HttpClient you manage yourself. Configure the client's behavior through NotionClientOptions.
var httpClient = new HttpClient();
// TODO: configure more client options here
var options =
new NotionClientOptions
{
BearerAuth = "YOUR_BEARER_TOKEN",
Environment = ServerEnvironment.Production,
};
var client = new NotionClient(httpClient, options);For code examples and error responses, see API Reference.
Tip
Use a single NotionClient instance for the lifetime of your application and
reuse it across all requests. Creating a new instance per request might exhaust the
connection pool.
This SDK is distributed under the MIT License.
Refer to the API reference for detailed information on available operations with code samples.
For further assistance, please contact support at developers@makenotion.com.