---
title: "Upload file"
method: POST
path: "/upload_file"
tags: ["File Handling"]
---

# Upload file

`POST /upload_file`

## Request body

- object
  - `file_name` string — The name of the file to be uploaded.
  - `file_content` string, byte — Base64 encoded content of the file.
  - `user_id` string — The user ID associated with the file. Required if project_id is not provided.
  - `project_id` string — The project ID associated with the file. Required if user_id is not provided.

## Response `200`

File uploaded successfully

- object
  - `success` boolean
  - `file_name` string — The name of the uploaded file.

## Other responses

- `400` — Bad request (missing file or required parameters)
- `401` — Unauthorized (missing or invalid API key)
- `403` — Forbidden (API key does not match)
- `500` — Internal server error (file upload failed)

---

[API](https://skmtc.dev/gumloop/apis/public-api.md) · [All operations](https://skmtc.dev/gumloop/apis/public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gumloop/public-api/revisions/115f2d6ce387/schema)
