# What changed in @notionhq/client

> 16 changes in @notionhq/client 5 from its official release notes, upgrade guides and advisories: 3 breaking, 11 new APIs and options. Each one cited. Sources checked 2026-10-19. HTML: https://unstale.sh/npm/@notionhq/client/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @notionhq/client 5

### Breaking changes

- In browsers, constructing a client with auth, passing per-request auth, or using OAuth client credentials throws BrowserTokenNotAllowedError before sending anything. (5.27.0) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.27.0)
- The stream.end event no longer has last_sequence; resume with event IDs. (5.27.0) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.27.0)
- A personal agent's name is now typed as string because owners can rename it. (5.27.0) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.27.0)

### New APIs and options

- Insights responses now allow notion_ai for agent_type. (5.27.0) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.27.0)
- Insights responses now allow notion_ai for id. (5.27.0) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.27.0)
- Adds an API to list plugins. (5.27.0) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.27.0)
- Adds an API to retrieve a plugin; the method returns a signed archive URL and does not download or extract files. (5.27.0) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.27.0)
- Adds an API to retrieve a skill; the method returns a signed archive URL and does not download or extract files. (5.27.0) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.27.0)
- Pass this option to opt out of the browser token restriction, for example in jsdom tests. (5.27.0) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.27.0)
- Database creation accepts tasks, projects, or skills, and database and data source responses include a read-only database_type. (5.27.0) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.27.0)
- Adds methods to retrieve, query, delete, and batch agents, read insights, and update status or credit limits. (5.26.0) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.26.0)
- Adds methods to retrieve, update, cancel, and query sessions, query session events, and stream responses. (5.26.0) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.26.0)
- 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.0) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.26.0)
- 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.0) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.26.0)

### Behavior and default changes

- The personal agent ID is now notion_ai instead of the previous UUID; requests still accept the old UUID. (5.27.0) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.27.0)

### Fixes and other changes

- 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.1) — [release notes](https://github.com/makenotion/notion-sdk-js/releases/tag/v5.27.1)
