---
title: "Generate data-link file upload URL (to given path)"
method: POST
path: "/data-links/{dataLinkId}/upload/{dirPath}"
tags: ["data-links"]
---

# Generate data-link file upload URL (to given path)

`POST /data-links/{dataLinkId}/upload/{dirPath}`

Creates a URL to upload files to the data-link associated with the given `dataLinkId`, specifying a file path (`dirPath`).
For AWS S3 data-links, an additional follow-up request must be sent after your file upload has completed (or encountered an error) to finalize the upload - see the `/upload/finish` endpoint.

## Path parameters

- `dataLinkId` string, required
- `dirPath` string, required

## Query parameters

- `credentialsId` string
- `workspaceId` integer

## Headers

- `Origin` string, nullable

## Request body

- DataLinkMultiPartUploadRequest
  - `contentLength` integer
  - `contentType` string
  - `fileName` string
  - `partNumbers` integer[]
  - `uploadId` string

## Response `200`

OK

- DataLinkMultiPartUploadResponse
  - `uploadId` string
  - `uploadUrls` string[]

## Other responses

- `400` — BadRequest
- `403` — Operation not allowed
- `404` — NotFound — workspace or credentials not found, API disabled for the workspace, or data-link or path not found

## Changes

> 14 revisions in range; 1 not diffed.

- **2026-08-27** `97f7655d105a` — 2 info
  - added the new optional request property `partNumbers`
  - added the new optional request property `uploadId`
- **2026-01-20** `98d6b538c88e` — 1 info
  - api operation id `GenerateDataLinkUploadUrl_1` removed and replaced with `GenerateDataLinkUploadUrlWithPath`

[Change history](https://skmtc.dev/seqeralabs/apis/seqera-api/changes/data-links/:dataLinkId/upload/:dirPath/post.md)

---

[API](https://skmtc.dev/seqeralabs/apis/seqera-api.md) · [All operations](https://skmtc.dev/seqeralabs/apis/seqera-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/seqeralabs/seqera-api/revisions/97f7655d105a/schema)
