A bearer token is required to interact with the Notion API. Use an installation access token from an internal connection, an OAuth access token from a public connection, or a personal access token. If this is your first look at the Notion API, begin with the Getting started guide to learn which connection type to use.To work on a specific internal connection without access to its token, confirm that you are an admin in the workspace where the connection was created. Check inside the Notion UI via
Settings & Members in the left sidebar. If you’re not an admin in any of your workspaces, create a personal workspace for free or use a PAT where workspace policy allows it.Conventions
The base URL to send all API requests ishttps://api.notion.com. HTTPS is required for all API requests.
The Notion API follows RESTful conventions when possible, with most operations performed via GET, POST, PATCH, and DELETE requests on page and database resources. Request and response bodies are encoded as JSON.
JSON conventions
- Top-level resources have an
"object"property. This property can be used to determine the type of the resource (e.g."database","user", etc.) - Top-level resources are addressable by a UUIDv4
"id"property. You may omit dashes from the ID when making requests to the API, e.g. when copying the ID from a Notion URL. - Property names are in
snake_case(notcamelCaseorkebab-case). - Temporal values (dates and datetimes) are encoded in ISO 8601 strings. Datetimes will include the time value (
2020-08-12T02:12:33.231Z) while dates will include only the date (2020-08-12) - The Notion API does not support empty strings. To unset a string value for properties like a
urlpage property value, for example, use an explicitnullinstead of"".
Code samples & SDKs
Samples requests and responses are shown for each endpoint. Requests are shown using the Notion JavaScript SDK, and cURL. These samples make it easy to copy, paste, and modify as you build your connection. Notion SDKs are open source projects that you can install to easily start building. You may also choose any other language or library that allows you to make HTTP requests.Pagination
Endpoints that return lists of objects support cursor-based pagination requests. By default, Notion returns ten items per API call. If the number of items in a response from a support endpoint exceeds the default, then a connection can use pagination to request a specific set of the results and/or to limit the number of returned items.Supported endpoints
Responses
If an endpoint supports pagination, then the response object contains the below fields.Parameters for paginated requests
How to send a paginated request
1
Send an initial request to a supported endpoint.
2
Retrieve the
next_cursor value from the response (only available when has_more is true).3
Send a follow up request to the endpoint that includes the
next_cursor param in either the query string (for GET requests) or in the body params (POST requests).