---
title: "Push a file to the device"
method: POST
path: "/sessions/{sessionId}/device/pushFile"
tags: ["Device File Management"]
---

# Push a file to the device

`POST /sessions/{sessionId}/device/pushFile`

## Request

- Base URL: `https://api.us-west-1.saucelabs.com/rdc/v2`
- URL: `https://api.us-west-1.saucelabs.com/rdc/v2/sessions/{sessionId}/device/pushFile`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/saucelabs/apis/real-device-access-api-reference/docs/sessions/:sessionId/device/pushFile/post.ts> (a function with typed inputs; its response is checked against the schema)

Uploads a file to the specified destination path on the device storage.
**Format**: Multipart Form Data.

## Path parameters

- `sessionId` string, required

## Request body `multipart/form-data`

- object
  - `destinationPath` string, required: The absolute path on the device where the file should be saved (e.g., /Download/image.png).
  - `bundleId` string: The iOS app bundle identifier (e.g., `com.example.app`). Required for iOS devices, not needed for Android. On iOS, each app runs in its own **sandbox** — an isolated file system container that restricts access to only that app's data. This means you must specify which app's sandbox to operate on by providing its bundle ID. You can find the bundle ID in Xcode, in the app's `Info.plist`, or via the Sauce Labs app management API. See [Apple's File System documentation](https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html) for more details.
  - `file` string, binary, required: The binary content of the file to upload.

## Response `204`

File uploaded successfully

## Other responses

- `400`: Bad request or missing bundleId for iOS file operations
- `404`: Not Found
- `422`: Capability not supported
- `500`: Device File Operation Error

---

[API](https://skmtc.dev/saucelabs/apis/real-device-access-api-reference.md) - [All operations](https://skmtc.dev/saucelabs/apis/real-device-access-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/saucelabs/apis/real-device-access-api-reference/revisions/f845a4b66e37?raw)
