Browserstack logo
  • AI Agents
  • Pricing
  • Manual Testing

    Live

    Cross-browser testing

    Testing Toolkit

    Essential manual testing tools

    Accessibility Testing

    Test WCAG compliance

    Website Scanner

    All-in-one website checker

    Test Automation

    Automate

    Browser automation cloud

    Low Code Automation

    Automation without coding

    Accessibility Automation

    Automate WCAG testing

    Percy

    Visual testing & review

    Custom Device Lab

    Tailored test environments

    Management & Optimization

    Test Management

    Plan, track, and manage tests

    Test Management for Jira

    Manage tests inside JIRA

    Test Reporting & Analytics

    Monitor & optimize tests

    Explore BrowserStack for Enterprise

    Manual Testing

    App Live

    Real device testing

    App Accessibility Testing

    Test WCAG compliance

    Test Automation

    App Automate

    Real device automation cloud

    App Percy

    Visual testing & review

    App Low Code Automation

    AI-driven automated tests

    Custom Device Lab

    Tailored test environments

    Management & Optimization

    Test Management

    Plan, track, and manage tests

    Test Management for Jira

    Manage tests inside JIRA

    Test Reporting & Analytics

    Monitor & optimize tests

    Explore BrowserStack for Enterprise

    control

    • Documentation
    • Support
    • Status
    • Release Notes
    • Open Source
    • Events
    • Meetups
    • BrowserStack Talks
    • Community
  • AI Agents
  • Pricing
  • Sign in
  • Free Trial
Home Documentation App Automate XCUITest XCUITest REST API

XCUITest REST API

BrowserStack supports the use of REST API to access information about your tests via the command-line interface.

App Upload

Upload App

An API to upload the App you want to test on the BrowserStack servers

curl -u "USERNAME:ACCESS_KEY" -X POST "https://api-cloud.browserstack.com/app-automate/upload" -F "file=@/path/to/app/file/Application-debug.ipa" -F 'data={"custom_id": "MyApp"}'

Upload app from a Public Location

If you do not have your app file on the local machine from where you are running the test and it is hosted on a different location, you can upload it to the BrowserStack servers from any public hosted location. You can achieve that by just providing the app public url in the API call to upload an app. The url should be accessible over the internet so that BrowserStack can directly upload it from that location. Use the below API call to upload app from a publicly accessible location.

curl -u "USERNAME:ACCESS_KEY" -X POST "https://api-cloud.browserstack.com/app-automate/upload" -F "data={\"url\": \"https://www.browserstack.com/app-automate/sample-apps/ios/BrowserStack-SampleApp.ipa\"}"
Define Custom Id for your app

You can choose to set a custom_id for your apps. You can use this custom_id while executing your test in step 3. Every time you upload an app with the same custom id, the test execution will pick the last uploaded app for the custom_id you used. Custom Id is optional.

curl -u "USERNAME:ACCESS_KEY" -X POST "https://api-cloud.browserstack.com/app-automate/upload" -F "file=@/path/to/app/file/Application-debug.ipa" -F "data={\"custom_id\": \"MyApp\"}"

Note: custom_id is optional. You can upload multiple builds under same custom_id. Use custom_id in 'app' capability for XCUITest to always pick the last uploaded build.

Note:

  1. App upload will take few seconds to about a minute depending on the size of your app. Do not interrupt the curl command until you get the response back.
  2. If you upload an iOS app, we will resign the app with our own provisioning profile to be able to install your app on our devices during test execution.
  3. We will delete the uploaded app after 30 days from the date of upload.

Get recent uploads

An API to retrieve details about your recent App uploads. The response will not include the deleted apps

curl -u "USERNAME:ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/recent_apps"
Get recent uploads for custom id

An API to retrieve details about your recent App uploads under a specific custom id. The response will not include the deleted apps

curl -u "USERNAME:ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/recent_apps/<custom_id>"
Get recent uploads for entire group

An API to retrieve details about your recent App uploads for the entire group. The response will not include the deleted apps

curl -u "USERNAME:ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/recent_group_apps"
Delete App

An API to DELETE an uploaded App

curl -u "USERNAME:ACCESS_KEY" -X DELETE "https://api-cloud.browserstack.com/app-automate/app/delete/<app_id>"

Test Upload

Upload Test

An API to upload your test suite

curl -u "USERNAME:ACCESS_KEY" -X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/test-suite" -F "file=@/path/to/test/file/Application-test.zip" -F 'data={"custom_id": "MyTest"}'

Upload zip from a Public Location

If you do not have your zip file on the local machine from where you are running the test and it is hosted on a different location, you can upload it to the BrowserStack servers from any public hosted location. You can achieve that by just providing the zip public url in the API call to upload an zip. The url should be accessible over the internet so that BrowserStack can directly upload it from that location. Use the below API call to upload zip from a publicly accessible location.

curl -u "USERNAME:ACCESS_KEY" -X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/test-suite" -F "data={\"url\": \"https://www.browserstack.com/app-automate/sample-apps/ios/BrowserStack-SampleXCUITest.zip\"}"
Delete Test Suite

An API to DELETE an uploaded Test Suite

curl -u "USERNAME:ACCESS_KEY" -X DELETE "https://api-cloud.browserstack.com/app-automate/xcuitest/test-suites/<hashed_id>"
Get recent Test Suite Uploads

An API to retrieve details of your recently uploaded test suites

curl -u "USERNAME:ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/xcuitest/test-suites"
Get Test Suite info

An API to get detail information about the uploaded test suite

curl -u "USERNAME:ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/xcuitest/test-suites/<hashed_id>"

Execute Test

Execute your test using the below API

curl -u "USERNAME:ACCESS_KEY" -X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/build" -d \ "{\"devices\": [\"iPhone 8 Plus-11.0\"], \"app\": \"bs://<hashed appid>\", \"deviceLogs\" : true, \"testSuite\": \"bs://<hashed testID>\"}" -H "Content-Type: application/json"

Projects

Project name for Builds

To group your builds under one project, execute your tests using the parameter project. The REST API for grouping is:

curl -u "USERNAME:ACCESS_KEY" -X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/build" -d \ "{\"devices\": [\"iPhone 8 Plus-11.0\"], \"app\": \"bs://<hashed appid>\", \"deviceLogs\" : true, \"testSuite\": \"bs://<hashed appid>\", \"project\": \"<your_project_name>\"}" -H "Content-Type: application/json"
Notify URL

Set the notify URL for projects using the parameter projectNotifyURL to enable us to send a confirmation once the execution of all the builds under a project is completed. The callback will be sent if there are no builds triggered for 5 mins with the same project name post the previous execution. Set this parameter along with project parameter. The REST API for setting notify URL for a project is:

curl -u "USERNAME:ACCESS_KEY" -X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/build" -d \ "{\"devices\": [\"iPhone 8 Plus-11.0\"], \"app\": \"bs://<hashed appid>\", \"deviceLogs\" : true, \"testSuite\": \"bs://<hashed appid>\", \"project\": \"<your_project_name>\", \"projectNotifyURL\": \"<your_notify_url>\"}" -H "Content-Type: application/json"
List all builds

To display all builds associated with a project (grouped using project parameter while execution). The REST API is:

curl -u "USERNAME:ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/xcuitest/projects/<project_name>"

Builds

Build Summary / Test status

An API to get the status of your test execution or fetch the summary of your build

curl -u "USERNAME:ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/xcuitest/builds/<build_id>"

Sessions

Session Details

An API to get the details of your test sessions. Each session is the execution of your test suite on individual devices.

curl -u "USERNAME:ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/xcuitest/builds/<build_id>/sessions/<session_id>"

Debug

Retrieve App Automate network logs

Logs are available to you in HAR (HTTP Archive) format, and these can be retrieved using REST API.

curl -u "USERNAME:ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/xcuitest/builds/<build_id>/sessions/tests/<test_id>/networklogs"

Media Upload

Upload Media

An API to upload media files you want to use in your tests running on the BrowserStack servers

curl -u "USERNAME:ACCESS_KEY" -X POST "https://api-cloud.browserstack.com/app-automate/upload-media" -F "file=@/path/to/media/file/mediaFile.jpg" -F 'data={"custom_id": "MyMedia"}'
Get recent uploads

An API to retrieve details about your recent Media File uploads. The response will not include the deleted Media Files

curl -u "USERNAME:ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/recent_media_files"
Get recent uploads for custom id

An API to retrieve details about your recent Media File uploads under a specific custom id. The response will not include the deleted Media Files

curl -u "USERNAME:ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/recent_media_files/<custom_id>"
Get recent uploads for entire group

An API to retrieve details about your recent Media File uploads for the entire group. The response will not include the deleted Media Files

curl -u "USERNAME:ACCESS_KEY" -X GET "https://api-cloud.browserstack.com/app-automate/recent_group_media"
Delete Media File

An API to DELETE an uploaded Media File

curl -u "USERNAME:ACCESS_KEY" -X DELETE "https://api-cloud.browserstack.com/app-automate/custom_media/delete/<MediaId>"

In This Article

  • App Upload
  • Test Upload
  • Execute Test
  • Projects
  • Builds
  • Sessions
  • Media Upload
Related Articles

Xcuitest Get Started

Local Testing

Jenkins

PRODUCTS

  • Live
  • App Automate
  • App Live
  • Accessibility Testing
  • Automate
  • Test Management
  • App Accessibility Testing
  • Low Code Automation
  • Testing Toolkit
  • Percy
  • Custom Device Lab
  • Website Scanner
  • App Percy
  • App Low Code Automation
  • Test Reporting & Analytics
  • Requestly
  • Test Management for Jira
  • Test Companion
  • Load Testing

WHY BROWSERSTACK

  • Customers
  • Case Studies
  • AI Agents
  • Browsers & Devices
  • Enterprise
  • Data Centers
  • Real Device Features
  • Security

RESOURCES

  • Support
  • Status
  • Release Notes
  • Blog
  • Events
  • Community
  • Meetups
  • Champions
  • Guide
  • Partners
  • Find a partner
  • Trust Center
  • Test University (Beta)

COMPANY

  • About Us
  • Careers
  • Open Source
  • Press
  • Newsletter
Browserstack logo
SOCIAL
twitter social link facebook social link linkedin social link youtube social link instagram social link discord social link
Contact Us

We are available 24 / 7

More Resources

Cross Browser Testing Selenium Testing Test Management Emulators vs Real Device Mobile App Testing

Test on Device

Test on iPad Test on Galaxy Test In IE Test on Android Test on iOS Mobile Emulators Test on Right Devices

Tools

SpeedLab Screenshots Responsive Nightwatch.js
Browserstack logo
twitter social link facebook social link linkedin social link youtube social link instagram social link discord social link
Contact Us

We are available 24 / 7

© 2026 BrowserStack. All rights reserved.

  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Sitemap