---
title: "Start a file upload"
method: POST
path: "/v1/projects/{project_id}/files/{environment_id}/uploads"
tags: ["files"]
---

# Start a file upload

`POST /v1/projects/{project_id}/files/{environment_id}/uploads`

## Request

- Base URL: `https://api.connic.co`
- URL: `https://api.connic.co/v1/projects/{project_id}/files/{environment_id}/uploads`
- Auth: HTTP bearer

Start an upload of up to 1 GiB. Send the file in parts with PUT {upload_url}/parts/{n}?token=..., then finish with POST {upload_url}/complete?token=.... An existing path gets a numbered name unless overwrite is true.

Required permission: `files.manage`.

## Path parameters

- `project_id` string, uuid, required
- `environment_id` string, uuid, required

## Request body

- FileUploadRequest
  - `path` string, required: File path such as invoices/2026/acme.pdf.
  - `size` integer, required: File size in bytes.
  - `mime_type` string, nullable
  - `metadata` object, nullable
  - `overwrite` boolean: Replace an existing file at this path instead of renaming the new one.

## Response `201`

Successful Response

- FileUploadResponse
  - `upload_id` string, required
  - `path` string, required
  - `size` integer, required
  - `part_bytes` integer, required: Every part except the last has exactly this many bytes.
  - `part_count` integer, required
  - `upload_url` string, required: PUT {upload_url}/parts/{n}?token=..., then POST {upload_url}/complete?token=...
  - `token` string, required
  - `expires_at` string, required

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required permission or access to the environment.
- `404`: The resource does not exist in this project.
- `422`: Validation Error
- `429`: Rate limit exceeded.

## Changes

- **2026-10-20** `482932da5fbe`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/connic/apis/connic-api/changes/v1/projects/:project_id/files/:environment_id/uploads/post.md)

---

[API](https://skmtc.dev/connic/apis/connic-api.md) · [All operations](https://skmtc.dev/connic/apis/connic-api/llms.txt) · [OpenAPI document](https://skmtc.dev/connic/apis/connic-api/revisions/482932da5fbe?raw)
