Skip to content

API endpoints

Notion API endpoints.

BlocksChildrenEndpoint

Bases: Endpoint

Source code in notion_client/api_endpoints.py
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
class BlocksChildrenEndpoint(Endpoint):
    def append(self, block_id: str, **kwargs: Any) -> SyncAsync[Any]:
        """Create and append new children blocks to the block using the ID specified.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/patch-block-children)*
        """  # noqa: E501
        return self.parent.request(
            path=f"blocks/{block_id}/children",
            method="PATCH",
            body=pick(kwargs, "children", "after"),
            auth=kwargs.get("auth"),
        )

    def list(self, block_id: str, **kwargs: Any) -> SyncAsync[Any]:
        """Return a paginated array of child [block objects](https://developers.notion.com/reference/block) contained in the block.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/get-block-children)*
        """  # noqa: E501
        return self.parent.request(
            path=f"blocks/{block_id}/children",
            method="GET",
            query=pick(kwargs, "start_cursor", "page_size"),
            auth=kwargs.get("auth"),
        )

append(block_id, **kwargs)

Create and append new children blocks to the block using the ID specified.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
18
19
20
21
22
23
24
25
26
27
28
def append(self, block_id: str, **kwargs: Any) -> SyncAsync[Any]:
    """Create and append new children blocks to the block using the ID specified.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/patch-block-children)*
    """  # noqa: E501
    return self.parent.request(
        path=f"blocks/{block_id}/children",
        method="PATCH",
        body=pick(kwargs, "children", "after"),
        auth=kwargs.get("auth"),
    )

list(block_id, **kwargs)

Return a paginated array of child block objects contained in the block.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
30
31
32
33
34
35
36
37
38
39
40
def list(self, block_id: str, **kwargs: Any) -> SyncAsync[Any]:
    """Return a paginated array of child [block objects](https://developers.notion.com/reference/block) contained in the block.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/get-block-children)*
    """  # noqa: E501
    return self.parent.request(
        path=f"blocks/{block_id}/children",
        method="GET",
        query=pick(kwargs, "start_cursor", "page_size"),
        auth=kwargs.get("auth"),
    )

BlocksEndpoint

Bases: Endpoint

Source code in notion_client/api_endpoints.py
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
class BlocksEndpoint(Endpoint):
    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.children = BlocksChildrenEndpoint(*args, **kwargs)

    def retrieve(self, block_id: str, **kwargs: Any) -> SyncAsync[Any]:
        """Retrieve a [Block object](https://developers.notion.com/reference/block) using the ID specified.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/retrieve-a-block)*
        """  # noqa: E501
        return self.parent.request(
            path=f"blocks/{block_id}", method="GET", auth=kwargs.get("auth")
        )

    def update(self, block_id: str, **kwargs: Any) -> SyncAsync[Any]:
        """Update the content for the specified `block_id` based on the block type.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/update-a-block)*
        """  # noqa: E501
        return self.parent.request(
            path=f"blocks/{block_id}",
            method="PATCH",
            body=pick(
                kwargs,
                "embed",
                "type",
                "archived",
                "bookmark",
                "image",
                "video",
                "pdf",
                "file",
                "audio",
                "code",
                "equation",
                "divider",
                "breadcrumb",
                "table_of_contents",
                "link_to_page",
                "table_row",
                "heading_1",
                "heading_2",
                "heading_3",
                "paragraph",
                "bulleted_list_item",
                "numbered_list_item",
                "quote",
                "to_do",
                "toggle",
                "template",
                "callout",
                "synced_block",
                "table",
            ),
            auth=kwargs.get("auth"),
        )

    def delete(self, block_id: str, **kwargs: Any) -> SyncAsync[Any]:
        """Set a [Block object](https://developers.notion.com/reference/block), including page blocks, to `archived: true`.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/delete-a-block)*
        """  # noqa: E501
        return self.parent.request(
            path=f"blocks/{block_id}",
            method="DELETE",
            auth=kwargs.get("auth"),
        )

delete(block_id, **kwargs)

Set a Block object, including page blocks, to archived: true.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
100
101
102
103
104
105
106
107
108
109
def delete(self, block_id: str, **kwargs: Any) -> SyncAsync[Any]:
    """Set a [Block object](https://developers.notion.com/reference/block), including page blocks, to `archived: true`.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/delete-a-block)*
    """  # noqa: E501
    return self.parent.request(
        path=f"blocks/{block_id}",
        method="DELETE",
        auth=kwargs.get("auth"),
    )

retrieve(block_id, **kwargs)

Retrieve a Block object using the ID specified.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
48
49
50
51
52
53
54
55
def retrieve(self, block_id: str, **kwargs: Any) -> SyncAsync[Any]:
    """Retrieve a [Block object](https://developers.notion.com/reference/block) using the ID specified.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/retrieve-a-block)*
    """  # noqa: E501
    return self.parent.request(
        path=f"blocks/{block_id}", method="GET", auth=kwargs.get("auth")
    )

update(block_id, **kwargs)

Update the content for the specified block_id based on the block type.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
def update(self, block_id: str, **kwargs: Any) -> SyncAsync[Any]:
    """Update the content for the specified `block_id` based on the block type.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/update-a-block)*
    """  # noqa: E501
    return self.parent.request(
        path=f"blocks/{block_id}",
        method="PATCH",
        body=pick(
            kwargs,
            "embed",
            "type",
            "archived",
            "bookmark",
            "image",
            "video",
            "pdf",
            "file",
            "audio",
            "code",
            "equation",
            "divider",
            "breadcrumb",
            "table_of_contents",
            "link_to_page",
            "table_row",
            "heading_1",
            "heading_2",
            "heading_3",
            "paragraph",
            "bulleted_list_item",
            "numbered_list_item",
            "quote",
            "to_do",
            "toggle",
            "template",
            "callout",
            "synced_block",
            "table",
        ),
        auth=kwargs.get("auth"),
    )

CommentsEndpoint

Bases: Endpoint

Source code in notion_client/api_endpoints.py
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
class CommentsEndpoint(Endpoint):
    def create(self, **kwargs: Any) -> SyncAsync[Any]:
        """Create a new comment in the specified page or existing discussion thread.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/create-a-comment)*
        """  # noqa: E501
        return self.parent.request(
            path="comments",
            method="POST",
            body=pick(kwargs, "parent", "discussion_id", "rich_text"),
            auth=kwargs.get("auth"),
        )

    def list(self, **kwargs: Any) -> SyncAsync[Any]:
        """Retrieve a list of un-resolved [Comment objects](https://developers.notion.com/reference/comment-object) from the specified block.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/retrieve-a-comment)*
        """  # noqa: E501
        return self.parent.request(
            path="comments",
            method="GET",
            query=pick(kwargs, "block_id", "start_cursor", "page_size"),
            auth=kwargs.get("auth"),
        )

create(**kwargs)

Create a new comment in the specified page or existing discussion thread.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
287
288
289
290
291
292
293
294
295
296
297
def create(self, **kwargs: Any) -> SyncAsync[Any]:
    """Create a new comment in the specified page or existing discussion thread.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/create-a-comment)*
    """  # noqa: E501
    return self.parent.request(
        path="comments",
        method="POST",
        body=pick(kwargs, "parent", "discussion_id", "rich_text"),
        auth=kwargs.get("auth"),
    )

list(**kwargs)

Retrieve a list of un-resolved Comment objects from the specified block.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
299
300
301
302
303
304
305
306
307
308
309
def list(self, **kwargs: Any) -> SyncAsync[Any]:
    """Retrieve a list of un-resolved [Comment objects](https://developers.notion.com/reference/comment-object) from the specified block.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/retrieve-a-comment)*
    """  # noqa: E501
    return self.parent.request(
        path="comments",
        method="GET",
        query=pick(kwargs, "block_id", "start_cursor", "page_size"),
        auth=kwargs.get("auth"),
    )

DatabasesEndpoint

Bases: Endpoint

Source code in notion_client/api_endpoints.py
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
class DatabasesEndpoint(Endpoint):
    def list(self, **kwargs: Any) -> SyncAsync[Any]:  # pragma: no cover
        """List all [Databases](https://developers.notion.com/reference/database) shared with the authenticated integration.

        > ⚠️  **Deprecated endpoint**

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/get-databases)*
        """  # noqa: E501
        return self.parent.request(
            path="databases",
            method="GET",
            query=pick(kwargs, "start_cursor", "page_size"),
            auth=kwargs.get("auth"),
        )

    def query(self, database_id: str, **kwargs: Any) -> SyncAsync[Any]:
        """Get a list of [Pages](https://developers.notion.com/reference/page) contained in the database.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/post-database-query)*
        """  # noqa: E501
        return self.parent.request(
            path=f"databases/{database_id}/query",
            method="POST",
            query=pick(kwargs, "filter_properties"),
            body=pick(kwargs, "filter", "sorts", "start_cursor", "page_size"),
            auth=kwargs.get("auth"),
        )

    def retrieve(self, database_id: str, **kwargs: Any) -> SyncAsync[Any]:
        """Retrieve a [Database object](https://developers.notion.com/reference/database) using the ID specified.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/retrieve-a-database)*
        """  # noqa: E501
        return self.parent.request(
            path=f"databases/{database_id}", method="GET", auth=kwargs.get("auth")
        )

    def create(self, **kwargs: Any) -> SyncAsync[Any]:
        """Create a database as a subpage in the specified parent page.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/create-a-database)*
        """  # noqa: E501
        return self.parent.request(
            path="databases",
            method="POST",
            body=pick(
                kwargs, "parent", "title", "properties", "icon", "cover", "is_inline"
            ),
            auth=kwargs.get("auth"),
        )

    def update(self, database_id: str, **kwargs: Any) -> SyncAsync[Any]:
        """Update an existing database as specified by the parameters.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/update-a-database)*
        """  # noqa: E501
        return self.parent.request(
            path=f"databases/{database_id}",
            method="PATCH",
            body=pick(
                kwargs,
                "properties",
                "title",
                "description",
                "icon",
                "cover",
                "is_inline",
            ),
            auth=kwargs.get("auth"),
        )

create(**kwargs)

Create a database as a subpage in the specified parent page.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
149
150
151
152
153
154
155
156
157
158
159
160
161
def create(self, **kwargs: Any) -> SyncAsync[Any]:
    """Create a database as a subpage in the specified parent page.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/create-a-database)*
    """  # noqa: E501
    return self.parent.request(
        path="databases",
        method="POST",
        body=pick(
            kwargs, "parent", "title", "properties", "icon", "cover", "is_inline"
        ),
        auth=kwargs.get("auth"),
    )

list(**kwargs)

List all Databases shared with the authenticated integration.

⚠️ Deprecated endpoint

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
113
114
115
116
117
118
119
120
121
122
123
124
125
def list(self, **kwargs: Any) -> SyncAsync[Any]:  # pragma: no cover
    """List all [Databases](https://developers.notion.com/reference/database) shared with the authenticated integration.

    > ⚠️  **Deprecated endpoint**

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/get-databases)*
    """  # noqa: E501
    return self.parent.request(
        path="databases",
        method="GET",
        query=pick(kwargs, "start_cursor", "page_size"),
        auth=kwargs.get("auth"),
    )

query(database_id, **kwargs)

Get a list of Pages contained in the database.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
127
128
129
130
131
132
133
134
135
136
137
138
def query(self, database_id: str, **kwargs: Any) -> SyncAsync[Any]:
    """Get a list of [Pages](https://developers.notion.com/reference/page) contained in the database.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/post-database-query)*
    """  # noqa: E501
    return self.parent.request(
        path=f"databases/{database_id}/query",
        method="POST",
        query=pick(kwargs, "filter_properties"),
        body=pick(kwargs, "filter", "sorts", "start_cursor", "page_size"),
        auth=kwargs.get("auth"),
    )

retrieve(database_id, **kwargs)

Retrieve a Database object using the ID specified.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
140
141
142
143
144
145
146
147
def retrieve(self, database_id: str, **kwargs: Any) -> SyncAsync[Any]:
    """Retrieve a [Database object](https://developers.notion.com/reference/database) using the ID specified.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/retrieve-a-database)*
    """  # noqa: E501
    return self.parent.request(
        path=f"databases/{database_id}", method="GET", auth=kwargs.get("auth")
    )

update(database_id, **kwargs)

Update an existing database as specified by the parameters.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
def update(self, database_id: str, **kwargs: Any) -> SyncAsync[Any]:
    """Update an existing database as specified by the parameters.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/update-a-database)*
    """  # noqa: E501
    return self.parent.request(
        path=f"databases/{database_id}",
        method="PATCH",
        body=pick(
            kwargs,
            "properties",
            "title",
            "description",
            "icon",
            "cover",
            "is_inline",
        ),
        auth=kwargs.get("auth"),
    )

PagesEndpoint

Bases: Endpoint

Source code in notion_client/api_endpoints.py
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
class PagesEndpoint(Endpoint):
    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.properties = PagesPropertiesEndpoint(*args, **kwargs)

    def create(self, **kwargs: Any) -> SyncAsync[Any]:
        """Create a new page in the specified database or as a child of an existing page.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/post-page)*
        """  # noqa: E501
        return self.parent.request(
            path="pages",
            method="POST",
            body=pick(kwargs, "parent", "properties", "children", "icon", "cover"),
            auth=kwargs.get("auth"),
        )

    def retrieve(self, page_id: str, **kwargs: Any) -> SyncAsync[Any]:
        """Retrieve a [Page object](https://developers.notion.com/reference/page) using the ID specified.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/retrieve-a-page)*
        """  # noqa: E501
        return self.parent.request(
            path=f"pages/{page_id}",
            method="GET",
            query=pick(kwargs, "filter_properties"),
            auth=kwargs.get("auth"),
        )

    def update(self, page_id: str, **kwargs: Any) -> SyncAsync[Any]:
        """Update [page property values](https://developers.notion.com/reference/page#property-value-object) for the specified page.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/patch-page)*
        """  # noqa: E501
        return self.parent.request(
            path=f"pages/{page_id}",
            method="PATCH",
            body=pick(kwargs, "archived", "properties", "icon", "cover"),
            auth=kwargs.get("auth"),
        )

create(**kwargs)

Create a new page in the specified database or as a child of an existing page.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
203
204
205
206
207
208
209
210
211
212
213
def create(self, **kwargs: Any) -> SyncAsync[Any]:
    """Create a new page in the specified database or as a child of an existing page.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/post-page)*
    """  # noqa: E501
    return self.parent.request(
        path="pages",
        method="POST",
        body=pick(kwargs, "parent", "properties", "children", "icon", "cover"),
        auth=kwargs.get("auth"),
    )

retrieve(page_id, **kwargs)

Retrieve a Page object using the ID specified.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
215
216
217
218
219
220
221
222
223
224
225
def retrieve(self, page_id: str, **kwargs: Any) -> SyncAsync[Any]:
    """Retrieve a [Page object](https://developers.notion.com/reference/page) using the ID specified.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/retrieve-a-page)*
    """  # noqa: E501
    return self.parent.request(
        path=f"pages/{page_id}",
        method="GET",
        query=pick(kwargs, "filter_properties"),
        auth=kwargs.get("auth"),
    )

update(page_id, **kwargs)

Update page property values for the specified page.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
227
228
229
230
231
232
233
234
235
236
237
def update(self, page_id: str, **kwargs: Any) -> SyncAsync[Any]:
    """Update [page property values](https://developers.notion.com/reference/page#property-value-object) for the specified page.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/patch-page)*
    """  # noqa: E501
    return self.parent.request(
        path=f"pages/{page_id}",
        method="PATCH",
        body=pick(kwargs, "archived", "properties", "icon", "cover"),
        auth=kwargs.get("auth"),
    )

PagesPropertiesEndpoint

Bases: Endpoint

Source code in notion_client/api_endpoints.py
184
185
186
187
188
189
190
191
192
193
194
195
class PagesPropertiesEndpoint(Endpoint):
    def retrieve(self, page_id: str, property_id: str, **kwargs: Any) -> SyncAsync[Any]:
        """Retrieve a `property_item` object for a given `page_id` and `property_id`.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/retrieve-a-page-property)*
        """  # noqa: E501
        return self.parent.request(
            path=f"pages/{page_id}/properties/{property_id}",
            method="GET",
            auth=kwargs.get("auth"),
            query=pick(kwargs, "start_cursor", "page_size"),
        )

retrieve(page_id, property_id, **kwargs)

Retrieve a property_item object for a given page_id and property_id.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
185
186
187
188
189
190
191
192
193
194
195
def retrieve(self, page_id: str, property_id: str, **kwargs: Any) -> SyncAsync[Any]:
    """Retrieve a `property_item` object for a given `page_id` and `property_id`.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/retrieve-a-page-property)*
    """  # noqa: E501
    return self.parent.request(
        path=f"pages/{page_id}/properties/{property_id}",
        method="GET",
        auth=kwargs.get("auth"),
        query=pick(kwargs, "start_cursor", "page_size"),
    )

SearchEndpoint

Bases: Endpoint

Source code in notion_client/api_endpoints.py
272
273
274
275
276
277
278
279
280
281
282
283
class SearchEndpoint(Endpoint):
    def __call__(self, **kwargs: Any) -> SyncAsync[Any]:
        """Search all pages and child pages that are shared with the integration.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/post-search)*
        """  # noqa: E501
        return self.parent.request(
            path="search",
            method="POST",
            body=pick(kwargs, "query", "sort", "filter", "start_cursor", "page_size"),
            auth=kwargs.get("auth"),
        )

__call__(**kwargs)

Search all pages and child pages that are shared with the integration.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
273
274
275
276
277
278
279
280
281
282
283
def __call__(self, **kwargs: Any) -> SyncAsync[Any]:
    """Search all pages and child pages that are shared with the integration.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/post-search)*
    """  # noqa: E501
    return self.parent.request(
        path="search",
        method="POST",
        body=pick(kwargs, "query", "sort", "filter", "start_cursor", "page_size"),
        auth=kwargs.get("auth"),
    )

UsersEndpoint

Bases: Endpoint

Source code in notion_client/api_endpoints.py
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
class UsersEndpoint(Endpoint):
    def list(self, **kwargs: Any) -> SyncAsync[Any]:
        """Return a paginated list of [Users](https://developers.notion.com/reference/user) for the workspace.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/get-users)*
        """  # noqa: E501
        return self.parent.request(
            path="users",
            method="GET",
            query=pick(kwargs, "start_cursor", "page_size"),
            auth=kwargs.get("auth"),
        )

    def retrieve(self, user_id: str, **kwargs: Any) -> SyncAsync[Any]:
        """Retrieve a [User](https://developers.notion.com/reference/user) using the ID specified.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/get-user)*
        """  # noqa: E501
        return self.parent.request(
            path=f"users/{user_id}", method="GET", auth=kwargs.get("auth")
        )

    def me(self, **kwargs: Any) -> SyncAsync[Any]:
        """Retrieve the bot [User](https://developers.notion.com/reference/user) associated with the API token.

        *[🔗 Endpoint documentation](https://developers.notion.com/reference/get-self)*
        """  # noqa: E501
        return self.parent.request(
            path="users/me", method="GET", auth=kwargs.get("auth")
        )

list(**kwargs)

Return a paginated list of Users for the workspace.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
241
242
243
244
245
246
247
248
249
250
251
def list(self, **kwargs: Any) -> SyncAsync[Any]:
    """Return a paginated list of [Users](https://developers.notion.com/reference/user) for the workspace.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/get-users)*
    """  # noqa: E501
    return self.parent.request(
        path="users",
        method="GET",
        query=pick(kwargs, "start_cursor", "page_size"),
        auth=kwargs.get("auth"),
    )

me(**kwargs)

Retrieve the bot User associated with the API token.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
262
263
264
265
266
267
268
269
def me(self, **kwargs: Any) -> SyncAsync[Any]:
    """Retrieve the bot [User](https://developers.notion.com/reference/user) associated with the API token.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/get-self)*
    """  # noqa: E501
    return self.parent.request(
        path="users/me", method="GET", auth=kwargs.get("auth")
    )

retrieve(user_id, **kwargs)

Retrieve a User using the ID specified.

🔗 Endpoint documentation

Source code in notion_client/api_endpoints.py
253
254
255
256
257
258
259
260
def retrieve(self, user_id: str, **kwargs: Any) -> SyncAsync[Any]:
    """Retrieve a [User](https://developers.notion.com/reference/user) using the ID specified.

    *[🔗 Endpoint documentation](https://developers.notion.com/reference/get-user)*
    """  # noqa: E501
    return self.parent.request(
        path=f"users/{user_id}", method="GET", auth=kwargs.get("auth")
    )