npm / @notionhq/client
@notionhq/client
What changed in @notionhq/client 3 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-25.
18 breaking2 security1 deprecations96 new APIs and options9 behavior and defaults1 tooling13 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@notionhq/client 5131 changes
Breaking changes 17
Now accepts typed filters, sorts, and quick filters. Empty filters and sorts must be omitted or replaced with valid values; an empty quick filter remains valid.
Support for Node.js versions below 22 has been dropped; upgrade the runtime to Node.js 22 or later before updating the SDK.
The browser agent connection type is removed.
Databases support show_data_source_title, which is also required on database responses.
For bare database links without a title slug, extractDatabaseId now returns the database ID from the path instead of the side-peek page ID from p=.
For bare database links without a title slug, extractNotionId now returns the database ID from the path instead of the side-peek page ID from p=.
Database responses now require show_data_source_title, so hand-built fixtures need to provide it.
In browsers, constructing a client with auth, passing per-request auth, or using OAuth client credentials throws BrowserTokenNotAllowedError before sending anything.
The stream.end event no longer has last_sequence; resume with event IDs.
A personal agent's name is now typed as string because owners can rename it.
The guard now requires the title field, so partial database objects no longer pass as full objects.
The guard now requires the title field, so partial data source objects no longer pass as full objects.
Updates the response shape for transcription blocks.
Prevents path traversal; callers can no longer use ../ in an ID path parameter to navigate to a different Notion API endpoint and should use a properly formatted, absolute API path instead.
The search filter enum now uses data_source instead of database.
Endpoints are repurposed to operate on the database container rather than at the data source level.
The list databases method has been removed because its endpoint has been deprecated and unsupported since 2022-02-22.
Security 2
Adds a helper for signing webhook payloads in tests.
Adds a helper to verify Notion webhook signatures using the raw request body and the X-Notion-Signature header.
Deprecations 1
Enhanced Markdown (
v1) is deprecated. API versions through2026-03-11still default tov1; setmarkdown_version: "v2"on page and comment Markdown requests to test your integration before the next API version.
New APIs and options 89
Pass
betasto a typed SDK method to opt one request into an API beta; pagination helpers keep the flags on each page.A new alias makes data source query options easier to type without deep imports.
Can now be imported directly from the package root instead of using a deep import.
Enums gain new agent connection types.
Data source queries accept the is_archived request option.
The comment.created, comment.updated, and comment.deleted webhook payloads carry discussion_id.
People responses include an email_verified field.
Embed blocks accept the file_upload request option.
Meeting notes include an event_id field.
Comments responses include the has_pending_attachments field.
Agent responses include an is_favorited field.
Meeting notes include an is_full_page field.
Relation configs include a limit field.
Page markdown and comment methods accept markdown_version; v1 is the default and v2 is the Notion-flavored Markdown preview.
Comments responses include the original_content_deleted field.
Page create, page update, and append block children accept notifications.mode to write without notifying anyone.
PageMarkdownResponse is now exported for use by developers.
PageWriteNotificationsSchema is now exported for use by developers.
Comments on a page property can include property_id, and comment webhook payloads carry it.
Search accepts the filter_properties request option.
Session filter types are now exported for use by developers.
Status group filters are typed and require the status-group-filters-2026-10-06 beta header.
Status group filters are typed and require the status-group-filters-2026-10-06 beta header.
The transcription status enum gains the transcription_failed value.
A new type covers parameters for POST /v1/ai/skills/:id/upload; there is no named method yet.
A new type covers the response for POST /v1/ai/skills/:id/upload; there is no named method yet.
Page markdown updates include a warnings field.
Status property configs in data source responses now include a required, read-only default_option field containing the default option name or null.
Insights responses now allow notion_ai for agent_type.
Insights responses now allow notion_ai for id.
Adds an API to list plugins.
Adds an API to retrieve a plugin; the method returns a signed archive URL and does not download or extract files.
Adds an API to retrieve a skill; the method returns a signed archive URL and does not download or extract files.
Pass this option to opt out of the browser token restriction, for example in jsdom tests.
Database creation accepts tasks, projects, or skills, and database and data source responses include a read-only database_type.
Adds methods to retrieve, query, delete, and batch agents, read insights, and update status or credit limits.
Adds methods to retrieve, update, cancel, and query sessions, query session events, and stream responses.
Returns an async iterable of server-sent events and retries eligible HTTP failures before a stream opens, without replaying events after streaming begins.
Adds typed committed and provisional session events, including user messages with text or file content; status events can include token usage and artifact metadata, and tool events expose lifecycle metadata.
Verification property filters in data source and database queries now accept a does_not_equal condition alongside status.
client.pages.create() and client.pages.update() now accept filter_properties to bound which properties are returned in the write response.
Create meeting notes from a file upload or an existing audio, video, or file block; generated request types require parent only for file-upload sources.
Formula and rollup response unions include type: "unsupported", allowing TypeScript users to handle values Notion did not compute.
Adds an in_trash filter to client.search() to return only trashed results when true; searches continue to exclude trashed content by default.
AnnotationResponse, the type of RichTextItemResponse.annotations, is now exported from the package entrypoint.
ApiColor is now exported from the package entrypoint for validating or constructing rich text annotations.
RichTextItemResponseCommon is now exported from the package entrypoint for validating or constructing rich text annotations.
Adds support for the async task endpoint, allowing polling of long-running operations to completion.
Pages past the dataSources.query cap by partitioning on created_time and deduplicating rows, so large data sources can be read completely.
Accepts allow_async so large or slow page writes can return an async task instead of blocking the request.
Pages past the dataSources.query cap by partitioning on created_time and deduplicating rows, so large data sources can be read completely.
Pagination parameters now accept null as well as string or undefined, allowing a next_cursor to be passed through directly.
Accepts allow_async so large or slow markdown writes can return an async task instead of blocking the request.
Adds a position field to insert_content params for the update page markdown endpoint.
Adds agent_id as a parent type for workflow-parented pages and blocks.
Adds property typing for attendees in meeting notes queries.
Meeting notes queries are supported, allowing developers to query meeting notes.
Adds the request_status field to all affected list response types.
Adds a delete method to client.comments for the Delete Comment endpoint.
Adds an update method to the comments namespace for the UpdateComment endpoint.
Select, status, and multi_select property filters now support multiple values.
The Create Comment endpoint accepts a markdown parameter.
The APIErrorCode enum now includes gateway_timeout.
SDK types now include H4 blocks.
SDK types now support "me" person filters.
Paragraph blocks in tab block items now support icons.
Adds the custom_emojis.list() endpoint.
API endpoint types add support for tab blocks.
Adds webhook types to the client.
Sync API endpoints add support for the status property.
Adds Views API endpoints to the client.
The PATCH /v1/pages/:id/markdown endpoint now supports the replace_content operation.
The PATCH /v1/pages/:id/markdown endpoint now supports the update_content operation.
Adds support for API version 2026-03-11.
Adds an optional timezone parameter to the template body parameter for pages.create and pages.update.
Adds a string field that hints at the underlying unsupported block type.
Adds the pages.retrieveMarkdown endpoint.
Adds the pages.updateMarkdown endpoint.
Adds a position parameter to append children at a specific position in the parent's children array. It cannot be used with the older after parameter.
Adds support for specifying the list type, such as number, letter, or roman numeral.
Adds support for specifying where numbered list numbering starts.
Supports the optional position parameter in POST /v1/pages to attach a newly created page at a specific location in a parent page; it cannot be used if the parent is not a regular page.
Adds the page move endpoint to the Notion TypeScript SDK.
Adds support for the place property type.
The ListDataSourceTemplates endpoint now supports pagination.
The Update Page API now supports templates.
The parent type now supports the data_source_id variant.
Added endpoints to manage databases at the data source level, supporting multiple data sources.
Added a verification filter property to the queryDataSources API shape.
Behavior and default changes 8
Webhook helpers now use global Web Crypto directly, removing the Node crypto fallback and using subtle.verify() for signature comparison; public helper APIs and signature handling remain unchanged.
The personal agent ID is now notion_ai instead of the previous UUID; requests still accept the old UUID.
The failed-task error type factors shared fields into one object combined with a correlated status/code union; every previously valid pair remains valid.
The client automatically retries HTTP 529 responses, respecting retry-after, alongside existing 429/500/503 handling.
API endpoint types update the verification property.
API methods now warn when passed unknown parameters.
Adds automatic retry support with exponential backoff.
SDK surfaces the optional additional_data field in API error responses, providing more diagnostic details.
Tooling 1
SDK types were updated for view API property encoding.
Fixes and other changes 13
Now accepts typed filters and quick filters.
Can now be imported directly from the package root instead of using a deep import.
GetAsyncTaskResponse reports row_limit_exceeded as a 406 rather than a 409, matching the API.
Cloudflare Workers and Deno workers can again create authenticated clients and send the user-agent header; server runtimes no longer need dangerouslyAllowBrowser as a workaround.
Recognizes invalid_beta responses as APIResponseError, including failed async-task responses.
HTTP errors populate ray_id from the cf-ray response header when present, helping diagnose requests rejected at the network edge.
HTTP errors use the x-notion-request-id response header as a fallback when the response body does not provide a request ID.
Header lookup is case-insensitive for plain-object headers and handles array-valued headers.
Unrecognized responses with a Ray ID but no Notion request ID are identified as edge-generated, and 403 errors note that a network security rule may be responsible.
The helper's types again accept endpoint methods under strictNullChecks when endpoint parameters allow null start cursors.
The helper's types again accept endpoint methods under strictNullChecks when endpoint parameters allow null start cursors.
The relevance search sort variant now uses the property discriminator, correcting the search-parameter type.
Fixes an "Illegal invocation" error in Cloudflare Workers.
@notionhq/client 46 changes
Breaking changes 1
Removes support for the legacy page properties shape; property values must use the newer polymorphic type pattern.
New APIs and options 5
Adds support for attachments in the Comment API.
Adds the display_name object to CommentObjectResponse.
Adds support for the abc music language to LanguageRequest.
CreatePage can omit parent or pass {"workspace": true} to create top-level private pages at the workspace level for public integrations.
CreatePage makes properties optional; for standalone pages, the title defaults to an empty string.
@notionhq/client 33 changes
New APIs and options 2
A new type for a common file request parameter shape.
The Create Comment API accepts a parent type of block_id, allowing comments on a non-page block.
Behavior and default changes 1
The Client constructor uses built-in fetch by default instead of node-fetch.