Skip to content

Upload Project File

POST
/api/upload/projects/upload
curl --request POST \
--url https://example.com/api/upload/projects/upload \
--header 'Content-Type: multipart/form-data' \
--form file=@file \
--form project_id=example \
--form project_name=example \
--form source_lang=eng \
--form workflow_key=example \
--form workflow_id=1

Composite shim: preserve legacy behavior while delegating to UploadsService.

  • If project_id is omitted, create a project then add file.
  • If project_id is provided, resolve and add file to that project. Returns the legacy UploadResponse shape.
Media typemultipart/form-data
Body_upload_project_file_api_upload_projects_upload_post
object
file
required
File
string format: binary
project_id
Any of:
string
project_name
Any of:
string
source_lang
Source Lang
string
default: eng
workflow_key
Any of:
string
workflow_id
Any of:
integer

Successful Response

Media typeapplication/json
UploadResponse
object
detail
required
Detail

Status message of the upload operation

string
project_id
required
Project Id

Canonical external string ID for the project (UUID-like)

string
project_name
Any of:
string
file_uuid
required
File Uuid

Uuidv7 external ID of the uploaded file

string
filename
required
Filename

Original filename as supplied by the client

string
stored_as
required
Stored As

Storage path or identifier on the server

string
Example
{
"detail": "File uploaded",
"file_uuid": 42,
"filename": "brochure.docx",
"project_id": "a3f1d4c2-9b85-4b0e-8e32-2b7a9e0c1fcd",
"project_name": "Marketing Brochure",
"stored_as": "uploads/42-brochure.docx"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}