- 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:| Field | Type | Description |
|---|---|---|
type | string (enum) | The type of the file object. Possible type values are: "file", "file_upload", "external". |
file|file_upload | external | object | An object containing type-specific configuration. Refer to the type sections below for details on type-specific values. |
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
| Field | Type | Description | Example value |
|---|---|---|---|
url | string | An authenticated HTTP GET URL to the file. The URL is valid for one hour. If the link expires, send an API request to get an updated URL. | "https://s3.us-west-2.amazonaws.com/secure.notion-static.com/9bc6c6e0-32b8-4d55-8c12-3ae931f43a01/brocolli.jpeg?..." |
expiry_time | string (ISO 8601 date time) | The date and time when the link expires. | "2020-03-17T19:10:04.968Z" |
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 integrations
| Field | Type | Description | Example Value |
|---|---|---|---|
id | UUID | ID of a File Upload object that has a status of "uploaded" | "43833259-72ae-404e-8441-b6577f3159b4" |
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.
| Field | Type | Description | Example value |
|---|---|---|---|
url | string | A link to the externally hosted content. | "https://website.domain/files/doc.txt" |