---
title: "Finish Upload Session"
method: POST
path: "/file-storage/upload-sessions/{id}/finish"
tags: ["Upload Sessions"]
---

# Finish Upload Session

`POST /file-storage/upload-sessions/{id}/finish`

Finish Upload Session. Only call this endpoint after all File parts have been uploaded to [Upload part of File](#operation/uploadSessionsUpload). Note that the base URL is upload.apideck.com instead of unify.apideck.com. For more information on uploads, refer to the [file upload guide](/guides/file-upload).

## Path parameters

- `id` string, required

## Query parameters

- `raw` boolean

## Headers

- `x-apideck-consumer-id` string, required
- `x-apideck-app-id` string, required
- `x-apideck-service-id` string
- `digest` string

## Request body

- object

## Response `201`

File

- GetFileResponse
  - `status_code` integer, required — HTTP Response Status Code
  - `status` string, required — HTTP Response Status
  - `service` string, required — Apideck ID of service provider
  - `resource` string, required — Unified API resource name
  - `operation` string, required — Operation performed
  - `data` UnifiedFile, required
    - `id` string, required — A unique identifier for an object.
    - `downstream_id` string, nullable — The third-party API ID of original entity
    - `name` string, nullable, required — The name of the file
    - `description` string, nullable — Optional description of the file
    - `type` 'file' | 'folder' | 'url', nullable, required — The type of resource. Could be file, folder or url
    - `path` string, nullable — The full path of the file or folder (includes the file name)
    - `mime_type` string, nullable — The MIME type of the file.
    - `downloadable` boolean — Whether the current user can download this file
    - `size` integer, nullable — The size of the file in bytes
    - `owner` Owner
      - `id` string — ID of the owner
      - `email` string, nullable — Email of the owner
      - `name` string, nullable — Name of the owner
    - `parent_folders` LinkedFolder[] — The parent folders of the file, starting from the root
      - `id` string, required — A unique identifier for an object.
      - `name` string, nullable — The name of the folder
    - `parent_folders_complete` boolean — Whether the list of parent folders is complete. Some connectors only return the direct parent of a file
    - `permissions` object — Permissions the current user has on this file.
      - `download` boolean — Whether the current user can download this file.
    - `exportable` boolean — Whether the current file is exportable to other file formats. This property is relevant for proprietary file formats such as Google Docs or Dropbox Paper.
    - `export_formats` string[], nullable — The available file formats when exporting this file.
    - `custom_mappings` CustomMappings, nullable — When custom mappings are configured on the resource, the result is included here.
    - `updated_by` string, nullable — The user who last updated the object.
    - `created_by` string, nullable — The user who created the object.
    - `updated_at` string, date-time, nullable — The date and time when the object was last updated.
    - `created_at` string, date-time, nullable — The date and time when the object was created.
  - `meta` Meta — Response metadata
    - `items_on_page` integer — Number of items returned in the data property of the response
    - `cursors` object — Cursors to navigate to previous or next pages through the API
      - `previous` string, nullable — Cursor to navigate to the previous page of results through the API
      - `current` string, nullable — Cursor to navigate to the current page of results through the API
      - `next` string, nullable — Cursor to navigate to the next page of results through the API
    - `total_count` integer — Number of records available in total for this resource
    - `warnings` object[], nullable — Non-fatal warnings emitted when optional workflow steps failed. Present only when at least one step degraded; the response status remains 200.
      - `type` string — Discriminator for the warning kind.
      - `status_code` integer, nullable — HTTP status code returned by the failed downstream request, when available.
      - `error` string, nullable — Short error description from the downstream provider, when available.
      - `operation` string, nullable — Identifier of the workflow step that failed.
      - `message` string, nullable — Detailed message from the downstream provider, when available.
  - `_raw` Raw, nullable — Raw response from the integration when raw=true query param is provided

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `402` — Payment Required
- `404` — The specified resource was not found
- `422` — Unprocessable
- `default` — Unexpected error

---

[API](https://skmtc.net/apideck-libraries/apis/file-storage-api.md) · [All operations](https://skmtc.net/apideck-libraries/apis/file-storage-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/apideck-libraries/file-storage-api/versions/c2aa9722f1be/schema)
