API Reference
Binary Apps
Manage binary application files for your tests. Supported file extensions include: .ipa, .apk, .xap, .appx, .zip, .wgt. Files can be up to 1 gigabyte in size.
Usage: Binary apps are required for mobile app tests. After uploading, use the
binary_app_idwhen creating test environments (see Test Environments).
Upload a binary application file
Upload a binary application file directly to the API.
Endpoint: POST /binary_apps
Request Body:
file(string, required) - Binary application file (up to 1 gigabyte). Supported extensions: .ipa, .apk, .xap, .appx, .zip, .wgt
Example Request:
1curl -X POST "https://api.test.io/customer/v2/binary_apps" \
2 -H "Authorization: Token YOUR_API_TOKEN" \
3 -F "[email protected]"Response: 201 Created
1{
2 "binary_app": {
3 "id": 123,
4 "filename": "MyApp.apk",
5 "file_size": 52428800,
6 "url": "https://files.test.io/uploads/binary_app/123/MyApp.apk"
7 }
8}Get direct upload URL (large files)
Request a URL for large files. This lets you upload the file directly from your client to our storage without passing the entire payload through the API server.
Endpoint: GET /binary_apps/upload_url
Example Request:
1curl -X GET "https://api.test.io/customer/v2/binary_apps/upload_url" \
2 -H "Authorization: Token YOUR_API_TOKEN"Response: 200 OK
Response Attributes:
binary_app_id(number, required) - The ID of the created binary app (use this in the finalization step)url(string, required) - S3 presigned POST URLfields(object, required) - Form fields required for the S3 POST requestkey(string, required) - S3 object key pattern. IMPORTANT:${filename}is a placeholder - replace it with your actual filename when uploading to S3. For example, if uploadingMyApp-v1.2.3.apk, the key should beuploads/binary_app/package/123/MyApp-v1.2.3.apksuccess_action_status(string, required) - HTTP status code S3 will return on successpolicy(string, required) - Base64-encoded upload policyx-amz-credential(string, required) - AWS credential for the uploadx-amz-algorithm(string, required) - AWS signature algorithmx-amz-date(string, required) - Request timestampx-amz-signature(string, required) - Request signature
1{
2 "binary_app_id": 123,
3 "url": "https://my-bucket.s3.eu-west-1.amazonaws.com",
4 "fields": {
5 "key": "uploads/binary_app/package/123/${filename}",
6 "success_action_status": "201",
7 "policy": "eyJleHBpcmF0aW9uIjoiMjAyNS0xMS0wNFQxNjo0NzoxNVoiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJteS1idWNrZXQifSxbInN0YXJ0cy13aXRoIiwiJGtleSIsInVwbG9hZHMvYmluYXJ5X2FwcC9wYWNrYWdlLzEyMy8iXSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMSJ9LFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLDEsMTA3Mzc0MTgyNF1dfQ==",
8 "x-amz-credential": "AKIAEXAMPLE/20251104/eu-west-1/s3/aws4_request",
9 "x-amz-algorithm": "AWS4-HMAC-SHA256",
10 "x-amz-date": "20251104T154715Z",
11 "x-amz-signature": "abc123def456..."
12 }
13}Finalize binary app upload
Finalizes a direct storage upload by validating metadata, verifying the file exists in storage, and generating a public download URL.
Important: After uploading to S3, you have to call this endpoint with the file metadata to complete the process.
Endpoint: PUT /binary_apps/{id}
Parameters:
id(number, required) - Binary app ID fromGET /binary_apps/upload_url
Request Body Attributes:
filename(string, required) - The name of the file uploaded to S3. Must match the filename used in the S3 upload. Used to construct the S3 key for verification.file_size(number, required) - Size of the uploaded file in bytes. Must not exceed 1GB (1073741824 bytes). This should match the actual file size uploaded to S3.content_type(string, required) - MIME type of the uploaded file. Common values:application/vnd.android.package-archive- APK (Android)application/octet-stream- IPA (iOS)
bundle_identifier(string, optional) - The unique bundle/package identifier for the app (e.g.,com.example.myappfor Android or iOS).bundle_version(string, optional) - The version string of the app bundle (e.g.,1.2.3or4.2.11.5100000).
Example Request:
1curl -X PUT "https://api.test.io/customer/v2/binary_apps/123" \
2 -H "Authorization: Token YOUR_API_TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "filename": "MyApp-v1.2.3.apk",
6 "file_size": 524288000,
7 "content_type": "application/vnd.android.package-archive",
8 "bundle_identifier": "com.example.myapp",
9 "bundle_version": "1.2.3"
10 }'Response: 200 OK
Response Attributes:
binary_app(object)id(number) - Binary app IDfilename(string) - The uploaded file namefile_size(number) - File size in bytescontent_type(string) - File MIME typebundle_identifier(string, nullable) - App bundle identifierbundle_version(string, nullable) - App versionstatus(string) - Binary app status
1{
2 "binary_app": {
3 "id": 123,
4 "filename": "MyApp-v1.2.3.apk",
5 "file_size": 524288000,
6 "content_type": "application/vnd.android.package-archive",
7 "bundle_identifier": "com.example.myapp",
8 "bundle_version": "1.2.3",
9 "status": "new"
10 }
11}Error Response: 400 Bad Request
Returned when required parameters are missing:
1{
2 "error": "filename is missing, file_size is missing, content_type is missing"
3}Error Response: 422 Unprocessable Entity
Returned when the file doesn't exist in S3 or validation fails:
1{
2 "error": "File not found in S3: uploads/binary_app/package/123/MyApp-v1.2.3.apk"
3}1{
2 "error": "Validation failed: File size exceeds the maximum allowed size of 1GB"
3}