---
title: "Upload File"
method: POST
path: "/api/v1/files"
tags: ["Files"]
---

# Upload File

`POST /api/v1/files`

Upload a file to a workspace. Send the file as multipart/form-data with a `file` field and a `workspaceId` field. Maximum file size is 100MB. Duplicate filenames within a workspace are not allowed.

## Response `200`

File uploaded successfully.

- object
  - `success` boolean — Whether the upload completed successfully.
  - `data` object — Response payload containing the uploaded file metadata.
    - `file` FileMetadata
      - `id` string — Unique file identifier.
      - `name` string — Original filename.
      - `size` integer — File size in bytes.
      - `type` string — MIME type of the file.
      - `key` string — Storage key for the file.
      - `uploadedBy` string — User ID of the uploader.
      - `uploadedAt` string, date-time — ISO 8601 timestamp of when the file was uploaded.
    - `message` string — Human-readable confirmation message.

## Other responses

- `400` — Invalid request parameters. Check the details array for specific validation errors.
- `401` — Invalid or missing API key. Ensure the X-API-Key header is set with a valid key.
- `403` — Access denied. You do not have permission to access this resource. For audit log endpoints, this requires an Enterprise subscription and organization admin/owner role.
- `409` — A file with the same name already exists in this workspace.
- `429` — Rate limit exceeded. Wait for the duration specified in the Retry-After header before retrying. The X-RateLimit-* headers accompany every response from an authenticated v1 request — success and error alike — and are omitted only when the request fails authentication, since no rate-limit bucket is consulted in that case.

---

[API](https://skmtc.dev/simstudioai/apis/sim-api.md) · [All operations](https://skmtc.dev/simstudioai/apis/sim-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/simstudioai/sim-api/revisions/66a471c5b1df/schema)
