Skip to content
Testsigma DOCS

Update a file

PUT/uploads/{uploadId}

Base URL  https://app.testsigma.com/api/v1

Upload a new version of an existing file in Testsigma Uploads, identified by its upload ID.

Authenticate with your API key as a Bearer token in the Authorization header. Generate a key →
uploadIdID of the upload to update. Available from the API response when the file was created, or via the Copy Path option on the Uploads page.
projectIdID of the project the file belongs to.
nameName for the upload.
uploadTypeType of upload — e.g. Attachment.
platformTypePlatform the file targets — e.g. TestsigmaLab.
isPublicWhether the file is publicly accessible.
applicationIdID of the associated application.
versionVersion label for the file.
fileContentThe new file content (multipart file part).
idUnique upload identifier.
createdByIdID of the user who created the upload.
updatedByIdID of the user who last updated the upload.
createdDateEpoch timestamp when the upload was created.
updatedDateEpoch timestamp when the upload was last updated.
nameName of the upload.
latestVersionIdID of the latest version of the file.
latestVersionObject describing the latest version (id, path, fileName, fileSize, status, preSignedURL, etc.).
versionsPlaceholder field, not currently used.
supportedDeviceTypePlaceholder field, not currently used.
isFlutterWhether the upload is a Flutter project.
REQUEST
curl -X PUT \
  'https://app.testsigma.com/api/v1/uploads/{uploadId}' \
  -H 'Authorization: Bearer <API_KEY>' \
  -F 'projectId=24' \
  -F 'name=APIFileUpdated' \
  -F 'uploadType=Attachment' \
  -F 'platformType=TestsigmaLab' \
  -F 'isPublic=true' \
  -F 'applicationId=43' \
  -F 'version=v101' \
  -F 'fileContent=@app.apk'
const form = new FormData();
form.append('projectId', '24');
form.append('name', 'APIFileUpdated');
form.append('uploadType', 'Attachment');
form.append('platformType', 'TestsigmaLab');
form.append('isPublic', 'true');
form.append('applicationId', '43');
form.append('version', 'v101');
form.append('fileContent', fileInput.files[0]);

const response = await fetch('https://app.testsigma.com/api/v1/uploads/{uploadId}', {
  method: 'PUT',
  headers: { 'Authorization': 'Bearer <API_KEY>' },
  body: form
});
const data = await response.json();
import requests

response = requests.put(
  'https://app.testsigma.com/api/v1/uploads/{uploadId}',
  headers={ 'Authorization': 'Bearer <API_KEY>' },
  data={
    'projectId': '24',
    'name': 'APIFileUpdated',
    'uploadType': 'Attachment',
    'platformType': 'TestsigmaLab',
    'isPublic': 'true',
    'applicationId': '43',
    'version': 'v101'
  },
  files={
    'fileContent': open('app.apk', 'rb')
  }
)
data = response.json()
RESPONSE200OK
{
  "id": 62,
  "createdById": 10,
  "updatedById": 10,
  "createdDate": 1681974023000,
  "updatedDate": 1681974187126,
  "name": "APIFileUpdated",
  "latestVersionId": 68,
  "latestVersion": {
    "id": 68,
    "createdById": 10,
    "updatedById": 10,
    "createdDate": 1681974023000,
    "updatedDate": 1681974023000,
    "name": "v101",
    "path": "46091/uploads/24/68/example.png",
    "fileName": "example.png",
    "uploadType": "Attachment",
    "testsigmaSauceLabsAppId": null,
    "testsigmaBrowserstackAppId": null,
    "fileSize": 181368,
    "preSignedURL": "https://s3.amazonaws.com/.../Testfile.pdf?X-Amz-Signature=...",
    "signed": false,
    "status": "SUCCESS",
    "uploadName": "APIFileUpdated",
    "signStatus": "NONE",
    "uploadId": 62
  },
  "versions": null,
  "supportedDeviceType": null,
  "isFlutter": false
}