Skip to content
You're viewing the v2 docs. Looking for v1?Go to v1 docs
Docs
Testsigma
Popular questions
↑↓ to navigate↵ to selectesc to close
Book a demo

Upload a file

POST/uploads
Base URL https://app.testsigma.com/api/v1Region

Upload an app or attachment (APK, IPA, or other file) to Testsigma Uploads. Useful for adding files during a CI pipeline run.

Authenticate with your API key as a Bearer token in the Authorization header. How to authenticate →
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 file to upload (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, etc.).
versionsPlaceholder field, not currently used.
supportedDeviceTypePlaceholder field, not currently used.
isFlutterWhether the upload is a Flutter project.
Request
curl -X POST \
  'https://app.testsigma.com/api/v1/uploads' \
  -H 'Authorization: Bearer <API_KEY>' \
  -F 'projectId=24' \
  -F 'name=APIFileUpload' \
  -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', 'APIFileUpload');
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', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer <API_KEY>' },
  body: form
});
const data = await response.json();
import requests

response = requests.post(
  'https://app.testsigma.com/api/v1/uploads',
  headers={ 'Authorization': 'Bearer <API_KEY>' },
  data={
    'projectId': '24',
    'name': 'APIFileUpload',
    'uploadType': 'Attachment',
    'platformType': 'TestsigmaLab',
    'isPublic': 'true',
    'applicationId': '43',
    'version': 'v101'
  },
  files={
    'fileContent': open('app.apk', 'rb')
  }
)
data = response.json()
Response200 OK
{
  "id": 62,
  "createdById": 10,
  "updatedById": 10,
  "createdDate": 1681974022556,
  "updatedDate": 1681974022769,
  "name": "APIFileUpload",
  "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": null,
    "signed": false,
    "status": "SUCCESS",
    "uploadName": "APIFileUpload",
    "signStatus": "NONE",
    "uploadId": 62
  },
  "versions": null,
  "supportedDeviceType": null,
  "isFlutter": false
}

Was this page helpful?