- Files uploaded manually in the Notion UI — returned as Notion-hosted file objects (type:
file) - Files uploaded via API — created using the File Upload API (type:
file_upload) - External files — linked via a public URL (type:
external)
What is a file object?
In the Notion API, any media asset is represented as a file object. A file object stores metadata about the file and indicates where and how the file is hosted. Each file object has a required type field that determines the structure of its contents:
Here’s what each type looks like:
Notion-hosted files (type: file)
These are files that users upload manually through the Notion app — such as dragging an image into a page, adding a PDF block, or setting a page cover.
When to use:
- You’re working with existing content in a Notion workspace
- You’re accessing files that users manually added via drag-and-drop or upload
Example snippet:
Files uploaded in the API (type: file_upload)
These are files uploaded using the File Upload API. You first create a File Upload, send file content, and then reference it by ID to attach it.
When to use:
- You want to programmatically upload files to Notion
- You’re building automations or file-rich connections
Example snippet:
External files (type: external)
Use this approach if you have already hosted your files elsewhere (e.g., S3, Dropbox, CDN) and want Notion to link to them.
When to use:
- You have an existing CDN or media server
- You have stable, permanent URLs
- Your files are publicly accessible and don’t require authentication
- You don’t want to upload files into Notion
- Pass an HTTPS URL when creating or updating file-supporting blocks or properties.
- These links never expire and will always be returned as-is in API responses.
Example snippet: