---
title: "POST /files/{namespace}/{array}/upload"
method: POST
path: "/files/{namespace}/{array}/upload"
tags: ["files"]
---

# POST /files/{namespace}/{array}/upload

`POST /files/{namespace}/{array}/upload`

## Request

- Base URL: `/v2` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/v2/files/{namespace}/{array}/upload`
- Auth: one of:
  - HTTP basic
  - API key in header `X-TILEDB-REST-API-KEY`

Upload a file at the specified location and wrap it in TileDB Array

## Request body `application/octet-stream`

- string, binary: File contents

## Response `201`

File uploaded

- FileUploaded: Uploaded file name and information
  - `output_uri` string: output location of the TileDB File
  - `file_name` string: name of the file uploaded
  - `id` string, required: unique ID of the uploaded file

## Other responses

- `502`: Bad Gateway
- `default`: error response

## Changes

- **2023-02-17** (v2) `1dc25429ac96`: 1 info
  - endpoint added
- **2023-02-17** (v2) `cb4897d3247d`: 1 breaking
  - api path removed without deprecation
- **2022-11-03** (v2) `dd919c4fb5a3`: 2 info
  - added the new optional `query` request parameter `filename` to all path's operations
  - added the non-success response with the status `502`
- **2022-11-03** (v2) `38cbb9a7a8ed`: 1 info
  - removed the non-success response with the status `502`
- **2022-10-31** (v2) `b40dd208e245`: 1 info
  - added the new optional `query` request parameter `filename` to all path's operations

[Operation history](https://skmtc.dev/tiledb/apis/tiledb-storage-platform-api/changes/files/:namespace/:array/upload/post.md)

---

[API](https://skmtc.dev/tiledb/apis/tiledb-storage-platform-api.md) - [All operations](https://skmtc.dev/tiledb/apis/tiledb-storage-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tiledb/apis/tiledb-storage-platform-api/revisions/f9cbeb4407a5?raw)
