---
title: "Create Shared Link"
method: POST
path: "/file-storage/shared-links"
tags: ["Shared Links"]
---

# Create Shared Link

`POST /file-storage/shared-links`

Create Shared Link

## Query parameters

- `raw` boolean

## Headers

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

## Request body

- SharedLink
  - `url` string, nullable — The URL that can be used to view the file.
  - `download_url` string, nullable — The URL that can be used to download the file.
  - `target_id` string, nullable, required — The ID of the file or folder to link.
  - `target` SharedLinkTarget
    - `id` string, required — A unique identifier for an object.
    - `name` string, nullable — The name of the file
    - `type` 'file' | 'folder' | 'url', nullable — The type of resource. Could be file, folder or url
  - `scope` 'public' | 'company', nullable — The scope of the shared link.
  - `password_protected` boolean, nullable — Indicated if the shared link is password protected.
  - `password` string, nullable — Optional password for the shared link.
  - `expires_at` string, date-time, nullable
  - `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.
  - `pass_through` object[] — The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
    - `service_id` string, required — Identifier for the service to which this pass_through should be applied.
    - `operation_id` string — Optional identifier for a workflow operation to which this pass_through should be applied. This is useful for Unify calls that are making more than one downstream request.
    - `extend_object` object — Simple object allowing any properties for direct extension.
    - `extend_paths` object[] — Array of objects for structured data modifications via paths.
      - `path` string, required — JSONPath string specifying where to apply the value.
      - `value` unknown, required

## Response `201`

Shared Links

- CreateSharedLinkResponse
  - `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` UnifiedId, required — A object containing a unique identifier for the resource that was created, updated, or deleted.
    - `id` string, required — The unique identifier of the resource
  - `_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.dev/apideck-libraries/apis/file-storage-api.md) · [All operations](https://skmtc.dev/apideck-libraries/apis/file-storage-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/apideck-libraries/file-storage-api/revisions/2d44271f3bdd/schema)
