Upload Project File
POST
/api/upload/projects/upload
const url = 'https://example.com/api/upload/projects/upload';const form = new FormData();form.append('file', 'file');form.append('project_id', 'example');form.append('project_name', 'example');form.append('source_lang', 'eng');form.append('workflow_key', 'example');form.append('workflow_id', '1');
const options = {method: 'POST'};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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=1Composite 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.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typemultipart/form-data
Responses
Section titled “Responses”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
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>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}