Skip to main content
Comments can currently support up to 3 attachments.

Request format (input)

Object properties

After following the Working with files and media guide, provide an array of objects under the attachments parameter in the Create comment API, each containing the following properties: Example Create Comment request:
In the Notion app, when viewing a comment uploaded using the API, the user experience is automatically customized based on the detected category of the file upload. For example, uploading a .png file displays your attachment as an inline image instead of a regular file download block.

Response format (output)

Object properties

The response of Comment APIs like Create comment contains attachments with the following fields: Example attachment object in Create Comment response:
The file.url is a temporary download link generated at the time of retrieving a comment. See the guide on Retrieving existing files to learn more about accessing the files you upload.

Attachments that are still uploading

When someone attaches a file to a comment in the Notion app, Notion saves the comment before the file finishes uploading. Until the upload finishes, the file isn’t listed in attachments, and the comment’s has_pending_attachments field is true. When the upload finishes, Notion sends a comment.updated webhook event for the comment. Retrieve the comment again to get the file. If the upload fails, the file is removed from the comment, and Notion sends comment.updated, or comment.deleted if the comment has no text. Comments created with the API aren’t affected, because the Create comment API only accepts files that have finished uploading.