When to use a PAT
Use a PAT for personal or developer-owned workflows that one Notion user should own:- Local scripts, notebooks, and command-line tools that automate work in your own workspace.
- Development and testing against the Notion API before you create a shared connection.
- Third-party tools that ask you to paste a Notion token and should act with your Notion permissions.
- Notion Workers development and deployment with the Notion CLI.
How PATs work
Create PATs in the Developer portal. For each PAT, you choose:- A token name.
- The workspace the token belongs to.
- Capabilities for the token.
The workspace’s PAT creation policy controls who can use the Notion API capability. Workspace members can receive the Workers capability when Notion Workers is available to the workspace.
PATs authenticate requests the same way other Notion API tokens do:
Permissions and content access
A PAT acts as the user who created it:- It can access pages, data sources, databases, comments, files, and other resources that the creator can access.
- It does not need pages to be shared with a bot through Add connections.
- If the creator loses access to a page or leaves the workspace, the PAT loses that access too.
- API behavior that depends on an authenticated user, such as
"me"filters or workspace-level private page creation, uses the PAT creator.
List all users is not available to PATs. A PAT can use Retrieve token’s bot user to retrieve the authorized user, and Retrieve a user can retrieve that same user.
Workspace admin controls
Workspace admins can manage PATs from Settings → Connections:- View all PATs created in the workspace, including active, expired, and revoked tokens.
- Search and filter tokens by name, creator, and status.
- See who created a token and, for revoked tokens, who revoked it.
- Revoke active or expired PATs.
- Configure who can create PATs with Notion API access.
unauthorized error until the policy allows the member again or the member uses a different valid token.
Organization owners can also use List personal access tokens and Revoke a personal access token to automate these tasks with the Admin API.
Who can create PATs
Guests and restricted members cannot create PATs or log in with the Notion CLI (ntn login). Only full workspace members can create tokens, subject to the workspace’s PAT creation policy below. Workspace owners can always create PATs with Notion API access.
On Enterprise, admins manage selected groups in the PAT creator settings. If no groups are selected, only workspace owners can create PATs with Notion API access.
Create a PAT
1
Open Personal access tokens in the Developer portal.
2
Select New token.
3
Name the token, then choose its capabilities and expiration. If a workspace picker appears, select the workspace the token belongs to.
4
Select Create token, then copy the token value and store it securely. You can’t view it again.
unauthorized error.
Revoke a PAT
Revoke a PAT immediately if it is exposed, no longer needed, or associated with a tool you no longer trust.- Token creators can revoke their own PATs from the Developer portal.
- Workspace admins can revoke any PAT in their workspace from Settings → Connections → All personal access tokens.
Security best practices
Keep PATs as secure as passwords:- Store PATs in environment variables or a secret manager.
- Do not commit PATs to source control.
- Use a separate PAT per script, tool, or environment so you can revoke one token without breaking unrelated workflows.
- Grant only the capabilities the workflow needs.
- Revoke tokens you no longer use.