unstale

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

@unstale/cli on npm

@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.

    5.31.0release notes

  • Support for Node.js versions below 22 has been dropped; upgrade the runtime to Node.js 22 or later before updating the SDK.

    5.30.0release notes

  • The browser agent connection type is removed.

    5.29.0release notes

  • Databases support show_data_source_title, which is also required on database responses.

    5.29.0release notes

  • 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=.

    5.29.0release notes

  • 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=.

    5.29.0release notes

  • Database responses now require show_data_source_title, so hand-built fixtures need to provide it.

    5.29.0release notes

  • In browsers, constructing a client with auth, passing per-request auth, or using OAuth client credentials throws BrowserTokenNotAllowedError before sending anything.

    5.27.0release notes

  • The stream.end event no longer has last_sequence; resume with event IDs.

    5.27.0release notes

  • A personal agent's name is now typed as string because owners can rename it.

    5.27.0release notes

  • The guard now requires the title field, so partial database objects no longer pass as full objects.

    5.25.1release notes

  • The guard now requires the title field, so partial data source objects no longer pass as full objects.

    5.25.1release notes

  • Updates the response shape for transcription blocks.

    5.10.0release notes

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

    5.9.0release notes

  • The search filter enum now uses data_source instead of database.

    5.0.0release notes

  • Endpoints are repurposed to operate on the database container rather than at the data source level.

    5.0.0release notes

  • The list databases method has been removed because its endpoint has been deprecated and unsupported since 2022-02-22.

    5.0.0release notes

Security 2

  • Adds a helper for signing webhook payloads in tests.

    5.23.0release notes

  • Adds a helper to verify Notion webhook signatures using the raw request body and the X-Notion-Signature header.

    5.23.0release notes

Deprecations 1

  • Enhanced Markdown (v1) is deprecated. API versions through 2026-03-11 still default to v1; set markdown_version: "v2" on page and comment Markdown requests to test your integration before the next API version.

    5.31.0release notes

New APIs and options 89

  • Pass betas to a typed SDK method to opt one request into an API beta; pagination helpers keep the flags on each page.

    5.31.0release notes

  • A new alias makes data source query options easier to type without deep imports.

    5.30.0release notes

  • Can now be imported directly from the package root instead of using a deep import.

    5.30.0release notes

  • Enums gain new agent connection types.

    5.29.0release notes

  • Data source queries accept the is_archived request option.

    5.29.0release notes

  • The comment.created, comment.updated, and comment.deleted webhook payloads carry discussion_id.

    5.29.0release notes

  • People responses include an email_verified field.

    5.29.0release notes

  • Embed blocks accept the file_upload request option.

    5.29.0release notes

  • Meeting notes include an event_id field.

    5.29.0release notes

  • Comments responses include the has_pending_attachments field.

    5.29.0release notes

  • Agent responses include an is_favorited field.

    5.29.0release notes

  • Meeting notes include an is_full_page field.

    5.29.0release notes

  • Relation configs include a limit field.

    5.29.0release notes

  • Page markdown and comment methods accept markdown_version; v1 is the default and v2 is the Notion-flavored Markdown preview.

    5.29.0release notes

  • Comments responses include the original_content_deleted field.

    5.29.0release notes

  • Page create, page update, and append block children accept notifications.mode to write without notifying anyone.

    5.29.0release notes

  • PageMarkdownResponse is now exported for use by developers.

    5.29.0release notes

  • PageWriteNotificationsSchema is now exported for use by developers.

    5.29.0release notes

  • Comments on a page property can include property_id, and comment webhook payloads carry it.

    5.29.0release notes

  • Search accepts the filter_properties request option.

    5.29.0release notes

  • Session filter types are now exported for use by developers.

    5.29.0release notes

  • Status group filters are typed and require the status-group-filters-2026-10-06 beta header.

    5.29.0release notes

  • Status group filters are typed and require the status-group-filters-2026-10-06 beta header.

    5.29.0release notes

  • The transcription status enum gains the transcription_failed value.

    5.29.0release notes

  • A new type covers parameters for POST /v1/ai/skills/:id/upload; there is no named method yet.

    5.29.0release notes

  • A new type covers the response for POST /v1/ai/skills/:id/upload; there is no named method yet.

    5.29.0release notes

  • Page markdown updates include a warnings field.

    5.29.0release notes

  • Status property configs in data source responses now include a required, read-only default_option field containing the default option name or null.

    5.28.0release notes

  • Insights responses now allow notion_ai for agent_type.

    5.27.0release notes

  • Insights responses now allow notion_ai for id.

    5.27.0release notes

  • Adds an API to list plugins.

    5.27.0release notes

  • Adds an API to retrieve a plugin; the method returns a signed archive URL and does not download or extract files.

    5.27.0release notes

  • Adds an API to retrieve a skill; the method returns a signed archive URL and does not download or extract files.

    5.27.0release notes

  • Pass this option to opt out of the browser token restriction, for example in jsdom tests.

    5.27.0release notes

  • Database creation accepts tasks, projects, or skills, and database and data source responses include a read-only database_type.

    5.27.0release notes

  • Adds methods to retrieve, query, delete, and batch agents, read insights, and update status or credit limits.

    5.26.0release notes

  • Adds methods to retrieve, update, cancel, and query sessions, query session events, and stream responses.

    5.26.0release notes

  • Returns an async iterable of server-sent events and retries eligible HTTP failures before a stream opens, without replaying events after streaming begins.

    5.26.0release notes

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

    5.26.0release notes

  • Verification property filters in data source and database queries now accept a does_not_equal condition alongside status.

    5.25.2release notes

  • client.pages.create() and client.pages.update() now accept filter_properties to bound which properties are returned in the write response.

    5.25.0release notes

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

    5.24.0release notes

  • Formula and rollup response unions include type: "unsupported", allowing TypeScript users to handle values Notion did not compute.

    5.24.0release notes

  • Adds an in_trash filter to client.search() to return only trashed results when true; searches continue to exclude trashed content by default.

    5.23.2release notes

  • AnnotationResponse, the type of RichTextItemResponse.annotations, is now exported from the package entrypoint.

    5.23.1release notes

  • ApiColor is now exported from the package entrypoint for validating or constructing rich text annotations.

    5.23.1release notes

  • RichTextItemResponseCommon is now exported from the package entrypoint for validating or constructing rich text annotations.

    5.23.1release notes

  • Adds support for the async task endpoint, allowing polling of long-running operations to completion.

    5.23.0release notes

  • Pages past the dataSources.query cap by partitioning on created_time and deduplicating rows, so large data sources can be read completely.

    5.23.0release notes

  • Accepts allow_async so large or slow page writes can return an async task instead of blocking the request.

    5.23.0release notes

  • Pages past the dataSources.query cap by partitioning on created_time and deduplicating rows, so large data sources can be read completely.

    5.23.0release notes

  • Pagination parameters now accept null as well as string or undefined, allowing a next_cursor to be passed through directly.

    5.23.0release notes

  • Accepts allow_async so large or slow markdown writes can return an async task instead of blocking the request.

    5.23.0release notes

  • Adds a position field to insert_content params for the update page markdown endpoint.

    5.22.0release notes

  • Adds agent_id as a parent type for workflow-parented pages and blocks.

    5.21.0release notes

  • Adds property typing for attendees in meeting notes queries.

    5.21.0release notes

  • Meeting notes queries are supported, allowing developers to query meeting notes.

    5.21.0release notes

  • Adds the request_status field to all affected list response types.

    5.20.0release notes

  • Adds a delete method to client.comments for the Delete Comment endpoint.

    5.19.0release notes

  • Adds an update method to the comments namespace for the UpdateComment endpoint.

    5.19.0release notes

  • Select, status, and multi_select property filters now support multiple values.

    5.18.0release notes

  • The Create Comment endpoint accepts a markdown parameter.

    5.17.0release notes

  • The APIErrorCode enum now includes gateway_timeout.

    5.16.0release notes

  • SDK types now include H4 blocks.

    5.16.0release notes

  • SDK types now support "me" person filters.

    5.16.0release notes

  • Paragraph blocks in tab block items now support icons.

    5.16.0release notes

  • Adds the custom_emojis.list() endpoint.

    5.15.0release notes

  • API endpoint types add support for tab blocks.

    5.15.0release notes

  • Adds webhook types to the client.

    5.15.0release notes

  • Sync API endpoints add support for the status property.

    5.14.0release notes

  • Adds Views API endpoints to the client.

    5.14.0release notes

  • The PATCH /v1/pages/:id/markdown endpoint now supports the replace_content operation.

    5.13.0release notes

  • The PATCH /v1/pages/:id/markdown endpoint now supports the update_content operation.

    5.13.0release notes

  • Adds support for API version 2026-03-11.

    5.12.0release notes

  • Adds an optional timezone parameter to the template body parameter for pages.create and pages.update.

    5.12.0release notes

  • Adds a string field that hints at the underlying unsupported block type.

    5.11.1release notes

  • Adds the pages.retrieveMarkdown endpoint.

    5.11.0release notes

  • Adds the pages.updateMarkdown endpoint.

    5.11.0release notes

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

    5.8.0release notes

  • Adds support for specifying the list type, such as number, letter, or roman numeral.

    5.8.0release notes

  • Adds support for specifying where numbered list numbering starts.

    5.8.0release notes

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

    5.7.0release notes

  • Adds the page move endpoint to the Notion TypeScript SDK.

    5.6.0release notes

  • Adds support for the place property type.

    5.4.0release notes

  • The ListDataSourceTemplates endpoint now supports pagination.

    5.3.0release notes

  • The Update Page API now supports templates.

    5.2.1release notes

  • The parent type now supports the data_source_id variant.

    5.0.0release notes

  • Added endpoints to manage databases at the data source level, supporting multiple data sources.

    5.0.0release notes

  • Added a verification filter property to the queryDataSources API shape.

    5.0.0release notes

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.

    5.30.0release notes

  • The personal agent ID is now notion_ai instead of the previous UUID; requests still accept the old UUID.

    5.27.0release notes

  • The failed-task error type factors shared fields into one object combined with a correlated status/code union; every previously valid pair remains valid.

    5.25.0release notes

  • The client automatically retries HTTP 529 responses, respecting retry-after, alongside existing 429/500/503 handling.

    5.23.0release notes

  • API endpoint types update the verification property.

    5.15.0release notes

  • API methods now warn when passed unknown parameters.

    5.11.0release notes

  • Adds automatic retry support with exponential backoff.

    5.10.0release notes

  • SDK surfaces the optional additional_data field in API error responses, providing more diagnostic details.

    5.0.0release notes

Tooling 1

  • SDK types were updated for view API property encoding.

    5.16.0release notes

Fixes and other changes 13

  • Now accepts typed filters and quick filters.

    5.31.0release notes

  • Can now be imported directly from the package root instead of using a deep import.

    5.30.0release notes

  • GetAsyncTaskResponse reports row_limit_exceeded as a 406 rather than a 409, matching the API.

    5.29.0release notes

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

    5.27.1release notes

  • Recognizes invalid_beta responses as APIResponseError, including failed async-task responses.

    5.24.0release notes

  • HTTP errors populate ray_id from the cf-ray response header when present, helping diagnose requests rejected at the network edge.

    5.23.3release notes

  • HTTP errors use the x-notion-request-id response header as a fallback when the response body does not provide a request ID.

    5.23.3release notes

  • Header lookup is case-insensitive for plain-object headers and handles array-valued headers.

    5.23.3release notes

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

    5.23.3release notes

  • The helper's types again accept endpoint methods under strictNullChecks when endpoint parameters allow null start cursors.

    5.23.1release notes

  • The helper's types again accept endpoint methods under strictNullChecks when endpoint parameters allow null start cursors.

    5.23.1release notes

  • The relevance search sort variant now uses the property discriminator, correcting the search-parameter type.

    5.23.0release notes

  • Fixes an "Illegal invocation" error in Cloudflare Workers.

    5.12.0release notes

@notionhq/client 46 changes

Breaking changes 1

  • Removes support for the legacy page properties shape; property values must use the newer polymorphic type pattern.

    4.0.0release notes

New APIs and options 5

  • Adds support for attachments in the Comment API.

    4.0.0release notes

  • Adds the display_name object to CommentObjectResponse.

    4.0.0release notes

  • Adds support for the abc music language to LanguageRequest.

    4.0.0release notes

  • CreatePage can omit parent or pass {"workspace": true} to create top-level private pages at the workspace level for public integrations.

    4.0.0release notes

  • CreatePage makes properties optional; for standalone pages, the title defaults to an empty string.

    4.0.0release notes

@notionhq/client 33 changes

New APIs and options 2

  • A new type for a common file request parameter shape.

    3.0.0release notes

  • The Create Comment API accepts a parent type of block_id, allowing comments on a non-page block.

    3.0.0release notes

Behavior and default changes 1

  • The Client constructor uses built-in fetch by default instead of node-fetch.

    3.0.0release notes