Skip to content
Leadtime
English
Esc
↑↓navigate↵open⌘Jpreview

Partially update project upload

Updates specific fields of an existing project upload. Only provided fields are updated; all fields are optional.

What can be updated:

  • projectId: Change which project the upload belongs to (must exist and user must have access)
  • description: Update the description text (set to null to clear)
  • categoryId: Change or remove the category (set to null to remove category assignment)

Note: The file itself cannot be changed. To replace a file, delete the upload and create a new one.

Validation:

  • Upload must exist and belong to the workspace
  • If projectId is provided, project must exist and user must have access
  • If categoryId is provided, category must exist and belong to the workspace

What is returned: Complete updated upload details including all current field values.

Note: This endpoint requires the Projects.manageUploads permission.

PATCH/projects/uploads/{id}
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
idstringrequired
Query parameters
fieldsToReturnstring

Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.

responseShapestring

Advanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.

Allowed:compactfull
Header parameters
LT-Response-Shapestring

Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.

Allowed:full
Request body
requiredapplication/json
categoryIdobject | null

Change the category assignment for the upload. Provide the UUID of a category, or set to null to remove the category. The category must exist in the workspace if provided. If not provided, the category remains unchanged.

descriptionobject | null

Update the description text for the upload. Provide a new description string, or set to null to clear the description. If not provided, the description remains unchanged.

projectIdstring

Change which project this upload belongs to. Provide the UUID of the target project. The project must exist in the workspace and the user must have access to it. If not provided, the upload remains associated with its current project.

Responses
200
categoryIdobject | nullrequired

UUID of the category assigned to this upload for thematic organization. Can be null if no category is assigned.

createdAtstringrequired

ISO 8601 formatted timestamp indicating when the upload record was created. Format: YYYY-MM-DDTHH:mm:ss.sssZ

descriptionobject | nullrequired

Free text description for classifying the upload content. Can be null if no description was provided.

fileIdstringrequired

UUID of the underlying file in workspace storage. This references the file uploaded via POST /workspace/upload.

fileNamestringrequired

Original filename of the uploaded file, as stored in the File relation. This is the name the file had when uploaded.

fileSizenumberrequired

Size of the file in bytes. Use this to display file sizes in a human-readable format (e.g., KB, MB).

idstringrequired

Unique identifier for the project upload record (UUID format)

mimeTypestringrequired

MIME type of the file indicating its format (e.g., application/pdf, image/png, text/plain). Retrieved from the File relation.

projectIdstringrequired

UUID of the project this upload belongs to. Determines which project the file is associated with.

updatedAtstringrequired

ISO 8601 formatted timestamp indicating when the upload record was last updated. Format: YYYY-MM-DDTHH:mm:ss.sssZ. This changes whenever any field of the upload is modified.

userIdstringrequired

UUID of the user who created this upload. This identifies who uploaded or last updated the file.

400

Validation errors

401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH "https://leadtime.app/api/public/projects/uploads/string" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "categoryId": "123e4567-e89b-12d3-a456-426614174222",
  "description": "Updated project documentation",
  "projectId": "123e4567-e89b-12d3-a456-426614174000"
}'
Response
{
  "categoryId": "123e4567-e89b-12d3-a456-426614174222",
  "createdAt": "2024-01-01T12:00:00.000Z",
  "description": "Project documentation for Q1 2024",
  "fileId": "123e4567-e89b-12d3-a456-426614174111",
  "fileName": "documentation.pdf",
  "fileSize": 1048576,
  "id": "123e4567-e89b-12d3-a456-426614174333",
  "mimeType": "application/pdf",
  "projectId": "123e4567-e89b-12d3-a456-426614174000",
  "updatedAt": "2024-01-02T14:30:00.000Z",
  "userId": "123e4567-e89b-12d3-a456-426614174444"
}