TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/makenotion/notion-sdk-js/llms.txt
Use this file to discover all available pages before exploring further.
ClientOptions interface defines all configuration options that can be passed to the Client constructor.
Type Definition
Properties
The Notion API token or OAuth access token for authentication.Default:
undefined (must be provided per-request or set on the client)The minimum log level for console output. Use
LogLevel.DEBUG, LogLevel.INFO, LogLevel.WARN, or LogLevel.ERROR.Default: LogLevel.WARNRequest timeout in milliseconds.Default:
60000 (60 seconds)The base URL for the Notion API. Useful for testing or proxying requests.Default:
"https://api.notion.com"Custom logger function that receives log level, message, and extra information.Default: Example:
makeConsoleLogger("@notionhq/client")Type signature:The Notion API version to use. This sets the
Notion-Version header.Default: "2025-09-03" (from Client.defaultNotionVersion)Custom fetch implementation. Useful for testing or using alternative fetch libraries.Default: Example:
fetch (global fetch)Type signature:HTTP agent for Node.js requests. Silently ignored in browser environments.Default:
undefinedType: import("node:http").AgentExample:Configuration for automatic retries on rate limit (429) and server errors. Set to Retry behavior:Example - disable retries:
false to disable retries entirely.Default: { maxRetries: 2, initialRetryDelayMs: 1000, maxRetryDelayMs: 60000 }RetryOptions type:- Rate limits (429) are always retried for all HTTP methods
- Server errors (500, 503) are only retried for idempotent methods (GET, DELETE)
- Uses
retry-afterheader when present, otherwise exponential back-off with jitter
Related Types
LogLevel
RetryOptions
See Also
- Client - The main client class
- Error Handling - Learn about error types and retry behavior