TypeScript SDK
import { Client } from "@notionhq/client"
const notion = new Client({ auth: process.env.NOTION_API_KEY })
const response = await notion.fileUploads.complete({
file_upload_id: "a02fc1d3-db8b-45c5-a222-27595b15aea7"
})curl --request POST \
--url https://api.notion.com/v1/file_uploads/{file_upload_id}/complete \
--header 'Authorization: Bearer <token>' \
--header 'Notion-Version: <notion-version>'import requests
url = "https://api.notion.com/v1/file_uploads/{file_upload_id}/complete"
headers = {
"Notion-Version": "<notion-version>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.notion.com/v1/file_uploads/{file_upload_id}/complete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Notion-Version: <notion-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.notion.com/v1/file_uploads/{file_upload_id}/complete"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Notion-Version", "<notion-version>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.notion.com/v1/file_uploads/{file_upload_id}/complete")
.header("Notion-Version", "<notion-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notion.com/v1/file_uploads/{file_upload_id}/complete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Notion-Version"] = '<notion-version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_time": "2023-11-07T05:31:56Z",
"created_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"last_edited_time": "2023-11-07T05:31:56Z",
"in_trash": true,
"expiry_time": "2023-11-07T05:31:56Z",
"filename": "<string>",
"content_type": "<string>",
"content_length": 1,
"upload_url": "<string>",
"complete_url": "<string>",
"file_import_result": {
"imported_time": "2023-11-07T05:31:56Z",
"type": "<string>",
"success": {}
},
"number_of_parts": {
"total": 1,
"sent": 1
}
}{
"object": "<unknown>",
"message": "<string>",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "unauthorized",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "restricted_resource",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "object_not_found",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "row_limit_exceeded",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "conflict_error",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "rate_limited",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "internal_server_error",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "service_unavailable",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "gateway_timeout",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "service_overload",
"status": "<unknown>",
"additional_data": {}
}File Uploads
Complete a file upload
Use this API to finalize a mode=multi_part file upload after all of the parts have been sent successfully.
POST
/
v1
/
file_uploads
/
{file_upload_id}
/
complete
TypeScript SDK
import { Client } from "@notionhq/client"
const notion = new Client({ auth: process.env.NOTION_API_KEY })
const response = await notion.fileUploads.complete({
file_upload_id: "a02fc1d3-db8b-45c5-a222-27595b15aea7"
})curl --request POST \
--url https://api.notion.com/v1/file_uploads/{file_upload_id}/complete \
--header 'Authorization: Bearer <token>' \
--header 'Notion-Version: <notion-version>'import requests
url = "https://api.notion.com/v1/file_uploads/{file_upload_id}/complete"
headers = {
"Notion-Version": "<notion-version>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.notion.com/v1/file_uploads/{file_upload_id}/complete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Notion-Version: <notion-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.notion.com/v1/file_uploads/{file_upload_id}/complete"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Notion-Version", "<notion-version>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.notion.com/v1/file_uploads/{file_upload_id}/complete")
.header("Notion-Version", "<notion-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notion.com/v1/file_uploads/{file_upload_id}/complete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Notion-Version"] = '<notion-version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_time": "2023-11-07T05:31:56Z",
"created_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"last_edited_time": "2023-11-07T05:31:56Z",
"in_trash": true,
"expiry_time": "2023-11-07T05:31:56Z",
"filename": "<string>",
"content_type": "<string>",
"content_length": 1,
"upload_url": "<string>",
"complete_url": "<string>",
"file_import_result": {
"imported_time": "2023-11-07T05:31:56Z",
"type": "<string>",
"success": {}
},
"number_of_parts": {
"total": 1,
"sent": 1
}
}{
"object": "<unknown>",
"message": "<string>",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "unauthorized",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "restricted_resource",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "object_not_found",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "row_limit_exceeded",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "conflict_error",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "rate_limited",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "internal_server_error",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "service_unavailable",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "gateway_timeout",
"status": "<unknown>",
"additional_data": {}
}{
"object": "<unknown>",
"message": "<string>",
"code": "service_overload",
"status": "<unknown>",
"additional_data": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The API version to use for this request. The latest version is 2026-03-11.
Available options:
2026-03-11 Path Parameters
Identifier for a Notion file upload object.
Response
Always file_upload
Allowed value:
"file_upload"Show child attributes
Show child attributes
One of: pending, uploaded, expired, failed
Available options:
pending, uploaded, expired, failed Required range:
x >= 0- Success
- Error
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I