---
title: "Create upload URL(s)"
method: POST
path: "/misc/sdes-file-upload/files/upload/url/{srn}"
---

# Create upload URL(s)

`POST /misc/sdes-file-upload/files/upload/url/{srn}`

Creates one or more URLs, each of which comes with a TTL (time-to-live) and can be used to upload a file. The provided
SRN and filename will be used to identify the HMRC recipient of the files to be uploaded.

## Path parameters

- `srn` string, required

## Headers

- `Accept` string, required
- `Content-Type` string, required
- `Authorization` string, required

## Request body

- object[]
  - `filename` string, required — The name of file that will be uploaded
  - `metadata` object[] — Optional key-value pairs of metadata that will be associated with each file. You will be notified by your HMRC contact if you need to send any metadata.
    - `key` string, required
    - `value` string, required

## Response `201`

URL(s) created

- object[]
  - `file` string, required
  - `url` string, url, required — The URL generated to upload the corresponding file. Authorisation is not required when uploading a file to SDES. <br><br> The URL supports the POST method ONLY. <br><br> The POST request MUST also include the header 'Content-Type: multipart/form-data'. <br><br> The URL generated is valid for up to 30 minutes, after which if not used, the HTTP response code 410 (EXPIRED) is generated."

## Other responses

- `400` — Invalid request
- `403` — Access Denied: Invalid credentials

---

[API](https://skmtc.net/hmrc/apis/secure-data-exchange-service-misc-api.md) · [All operations](https://skmtc.net/hmrc/apis/secure-data-exchange-service-misc-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hmrc/secure-data-exchange-service-misc-api/versions/d1468703086c/schema)
