---
title: "Create an External Link"
method: POST
path: "/files/{file_id}/external_links"
tags: ["Files"]
---

# Create an External Link

`POST /files/{file_id}/external_links`

Create an `External Link` to share with users so they can upload files directly from their browser. For more info, see [Uploading files to Finix](/guides/platform-payments/onboarding-sellers/seller-onboarding-uploading-files/).

## Headers

- `Finix-Version` string
- `Content-Type` string

## Request body

- CreateExternalLink
  - `duration` integer — Set how long (in minutes) the external link is valid for. The link can be valid for up to 10080 minutes (7 days).
  - `tags` Tags, nullable — Include up to 50 `key: value` pairs to annotate requests with custom metadata. - Maximum character length for individual `keys` is 40. - Maximum character length for individual `values` is 500. (For example, `order_number: 25`, `item_type: produce`, `department: sales`)
  - `type` 'DOWNLOAD' | 'UPLOAD' | 'VIEW', required — Set the type of external link to create. - `UPLOAD` - Create a link that can be used to upload files to Finix. - `DOWNLOAD` - Create a link where the uploaded file can be downloaded from. - `VIEW` - Create a link that displays the file in browser.

## Response `201`

A single `External Link`

- ExternalLink
  - `id` string — The ID of the `External Link` resource.
  - `created_at` string, date-time — Timestamp of when the object was created.
  - `duration` integer, nullable — Details how long (in minutes) the `url` is valid for.
  - `expired` boolean — Whether the external link has expired.
  - `expires_at` string, date-time — When the external link expires.
  - `file_id` string — The `File` ID the `External Link` relates to.
  - `tags` Tags, nullable — Include up to 50 `key: value` pairs to annotate requests with custom metadata. - Maximum character length for individual `keys` is 40. - Maximum character length for individual `values` is 500. (For example, `order_number: 25`, `item_type: produce`, `department: sales`)
  - `type` 'UPLOAD' | 'DOWNLOAD' | 'VIEW' — Sets whether the link uploads or downloads files from Finix.
  - `url` string — The URL that can be used to upload, download, or view the `File`.
  - `user_id` string — The ID of the `user` that requested to create this link.

## Other responses

- `400` — Bad Request. The server cannot process the request due to malformed syntax or invalid data.
- `401` — Unauthorized. Authentication is required and has failed or has not been provided.
- `403` — Forbidden. The client is authenticated but does not have permission to access the resource.
- `406` — Not Acceptable. The server could not accept the submitted request. Confirm how the request was formatted and submitted.

---

[API](https://skmtc.net/finix/apis/finix-api-reference.md) · [All operations](https://skmtc.net/finix/apis/finix-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/finix/finix-api-reference/versions/5426f6f99c52/schema)
