---
title: "Generate Upload URL"
method: POST
path: "/organizations/{orgId}/fileuploads/measurements/generateUploadUrl"
tags: ["Measurements"]
---

# Generate Upload URL

`POST /organizations/{orgId}/fileuploads/measurements/generateUploadUrl`

Generate a URL for uploading a file containing measurements to the platform in preparation for the measurements it contains to be ingested:
- An upload URL is returned together with an upload job id:
- You can then upload your data measurements file using a `PUT` request using the returned upload URL as the endpoint.
- You can use the returned upload job id with other calls to the File Upload Service for any follow-up or troubleshooting.

**Important:**
* The `contentLength` request parameter is required.
* The upload URL is time limited - it is valid for ***one*** minute.

Part of the file upload service for submitting measurements data files.

## Path parameters

- `orgId` string, required

## Request body

- GetUploadUrlRequest — Request containing the file details when generating an upload URL.
  - `fileName` string, required — The name of the measurements file to be uploaded.
  - `contentType` 'application/json' | 'text/json', required — The media type of the entity body sent, for example: `"contentType":"text/json"`. **NOTE:** Currently only a JSON formatted file type is supported by the File Upload Service.
  - `contentLength` integer, required — The size of the body in bytes. For example: `"contentLength": 485`, where 485 is the size in bytes of the file to upload. **NOTE:** Required.

## Response `200`

Returns the upload URL and jobId

- UrlUploadResponse — Response containing the upload job URL details
  - `jobId` string — UUID of the upload job
  - `url` string — The URL
  - `headers` object — The headers

## Other responses

- `4XX` — Error message
- `5XX` — Error message

---

[API](https://skmtc.net/m3ter-com/apis/m3ter-api.md) · [All operations](https://skmtc.net/m3ter-com/apis/m3ter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/m3ter-com/m3ter-api/revisions/ac93d1a9e6d9/schema)
