Open API

The PhoneGrid open API offers a comprehensive and developer-friendly RESTful interface that empowers you to programmatically manage browser profiles, cloud phones, and related resources—enabling seamless automation, scalability, and control.The PhoneGrid open API runs on your machine and is accessible at:https://api.phonegrid.com

Base URL

https://api.phonegrid.comPhoneGrid open api endponint

Authorization

Access Token

POST/oauth2/token

User Info

GET/oauth2/userinfo

Cloud Phone

Getting a list of cloud phone profiles

POST/cloudphone/page

Creating a cloud phone

POST/cloudphone/create

Startup cloud phone

POST/cloudphone/powerOn

Shut down the cloud phone

POST/cloudphone/powerOff

Modify the cloud phone profile

POST/cloudphone/edit/batch

Delete cloud phone

POST/cloudphone/delete/batch

One-click new cloud phone

POST/cloudphone/newMachine

Cloud phone details

POST/cloudphone/info

Query brand & model list

POST/cloudphone/brand/models
Query available brand & model list for given Android version

Update cloud phone ADB status

POST/cloudphone/updateAdb

Execute shell command

POST/cloudphone/exeCommand

Cloud Phone/File Management

Get file upload URL

POST/cloudphone/uploadUrl
Upload temporary files through this interface, and the system will automatically delete them after 7 days

Uploading files

POST/cloudphone/uploadFile

uploadFile result

POST/cloudphone/uploadFileResult

File download

POST/cloudphone/download

File download result

POST/cloudphone/download/result

Set Keybox

POST/cloudphone/setKeyBox

Cloud Phone/App Management

Install app on cloud phone

POST/cloudphone/app/install

Get APP application list

POST/cloudphone/app/page
Fetch APP application list

Query installed apps list

POST/cloudphone/app/installedList
Query list of installed apps on a cloud phone

Launch APP

POST/cloudphone/app/start
Launch an installed app on the cloud phone

Restart APP

POST/cloudphone/app/restart

Stop APP

POST/cloudphone/app/stop

Uninstall APP

POST/cloudphone/app/uninstall

Set Hide Accessibility App

POST/cloudphone/app/setHideAccessibilityApp
Supports only Android 13,Android 14, Android15A, Android16

Cloud Phone/Schedules management

Get market template pages

POST/cloudphone/rpa/template/market/page
Query Schedules market template, template name supports fuzzy query

Get Personal template pages

POST/cloudphone/rpa/template/personal/page
Query Schedules market template, template name supports fuzzy query

Get a schedules list

POST/cloudphone/rpa/task/page

Creating a schedule

POST/cloudphone/rpa/task/save
Save cloud phone scheduled task. templateParameter Parameter Specification 1. __Parameter Source__ Parameter keys must be extracted from the `parameter` field returned by the following APIs: - Get market template pages - Get Personal template pages 2. __Data Structure__ - Submit parameters in JSON object format: `{"key1": "value1", "key2": "value2"}` - Final parameter values must be deserialized according to business logic before use 3. __Common Type Parameters__ For the following parameter types, pass values directly in the corresponding format: - string: `{"name": "John"}` - decimal / number: `{"amount": 100.50}` - boolean: `{"enabled": true}` 4. __Media Type Parameters__ For media parameters such as image (pic) or video (video), in addition to basic information, a fixed key `"__Extra__"` must be included. Example format: ```json { "__Extra__": { "pic": { "name": "pic_name", "size": 204800 }, "video": { "name": "video_name", "size": 204800000 } }, "pic": "https://get.phonegrid.com/prod/cloudPhoneTaskVideo/1556061681934880/1c62314c7e2b4d298abe8d5452d7c050/test.png", "video": "https://get.phonegrid.com/pre/cloudPhoneTaskVideo/1542431036481556/4c4fed83685345ae8f1505fbe0c2f123/baby.mp4" } ``` 5. __Parameter Configuration Example__ The following example demonstrates how to configure the `templateParameter` parameter when saving a plan using a market template: - __Step 1: Retrieve Template Parameters__ Call the Market Template API: `GET /api/cloudphone/rpa/template/market/page` Extract the `parameter` field from the response, for example: ```json "parameter": "{\"videoDownloadUrl\":{\"type\":\"video\",\"extra\":{\"name\":\"Select Video\",\"type\":\"video\",\"required\":true,\"defaultValue\":{\"enabled\":false},\"index\":1,\"sizeLimit\":{\"value\":200,\"unit\":\"MB\"},\"formatType\":[\"mp4\",\"mov\"]}},\"videoDescription\":{\"type\":\"string\",\"extra\":{\"name\":\"Video Caption\",\"type\":\"string\",\"required\":false,\"charValid\":{\"enabled\":true,\"value\":1000},\"multiline\":{\"enabled\":true,\"value\":3},\"defaultValue\":{\"enabled\":false},\"index\":2}},\"coverUrl\":{\"type\":\"image\",\"extra\":{\"name\":\"Cover Image\",\"type\":\"image\",\"required\":false,\"defaultValue\":{\"enabled\":false},\"index\":3,\"sizeLimit\":{\"value\":5,\"unit\":\"MB\"},\"formatType\":[\"jpg\",\"png\",\"jpeg\"]}},\"enableAIGC\":{\"type\":\"boolean\",\"extra\":{\"name\":\"AI Label\",\"type\":\"boolean\",\"required\":false,\"defaultValue\":{\"enabled\":false},\"index\":4}},\"productId\":{\"type\":\"string\",\"extra\":{\"name\":\"Product ID\",\"type\":\"string\",\"required\":false,\"charValid\":{\"enabled\":true,\"value\":50},\"placeholder\":\"Product ID only supports digits, with a maximum of 50 characters.\",\"defaultValue\":{\"enabled\":false},\"index\":5}},\"productTitle\":{\"type\":\"string\",\"extra\":{\"name\":\"Product Title\",\"type\":\"string\",\"required\":false,\"charValid\":{\"enabled\":true,\"value\":30},\"defaultValue\":{\"enabled\":false},\"index\":6}},\"getLeads\":{\"type\":\"boolean\",\"extra\":{\"name\":\"Get Leads\",\"type\":\"boolean\",\"required\":false,\"defaultValue\":{\"enabled\":false},\"index\":7}},\"comment\":{\"type\":\"string\",\"extra\":{\"name\":\"Comment\",\"type\":\"string\",\"required\":false,\"charValid\":{\"enabled\":true,\"value\":200},\"multiline\":{\"enabled\":true,\"value\":3},\"defaultValue\":{\"enabled\":false},\"index\":8}}}" ``` - __Step 2: Build the Parameter JSON__ Construct the JSON object according to the parameter requirements: ```json { "__Extra__": { "videoDownloadUrl": { "name": "video_name.mp4", "size": 204800000 } }, "videoDownloadUrl": "https://get.phonegrid.com/pre/cloudPhoneTaskVideo/1542431036481556/4c4fed83685345ae8f1505fbe0c2f123/baby.mp4" } ``` - __Step 3: Escape the JSON String__ Convert the JSON object into an escaped string format: ```json "{\"__Extra__\": {\"videoDownloadUrl\": {\"name\": \"video_name.mp4\",\"size\": 204800000}},\"videoDownloadUrl\": \"https://get.phonegrid.com/pre/cloudPhoneTaskVideo/1542431036481556/4c4fed83685345ae8f1505fbe0c2f123/baby.mp4\"}" ``` - __Step 4: API Call__ Pass the escaped string as the value of the `templateParameter` parameter to the target API.

Creating a once schedule

POST/cloudphone/rpa/onceTask/save
Save cloud phone once scheduled task templateParameter Parameter Specification 1. __Parameter Source__ Parameter keys must be extracted from the `parameter` field returned by the following APIs: - Get market template pages - Get Personal template pages 2. __Data Structure__ - Submit parameters in JSON object format: `{"key1": "value1", "key2": "value2"}` - Final parameter values must be deserialized according to business logic before use 3. __Common Type Parameters__ For the following parameter types, pass values directly in the corresponding format: - string: `{"name": "John"}` - decimal / number: `{"amount": 100.50}` - boolean: `{"enabled": true}` 4. __Media Type Parameters__ For media parameters such as image (pic) or video (video), in addition to basic information, a fixed key `"__Extra__"` must be included. Example format: ```json { "__Extra__": { "pic": { "name": "pic_name", "size": 204800 }, "video": { "name": "video_name", "size": 204800000 } }, "pic": "https://get.phonegrid.com/prod/cloudPhoneTaskVideo/1556061681934880/1c62314c7e2b4d298abe8d5452d7c050/test.png", "video": "https://get.phonegrid.com/pre/cloudPhoneTaskVideo/1542431036481556/4c4fed83685345ae8f1505fbe0c2f123/baby.mp4" } ``` 5. __Parameter Configuration Example__ The following example demonstrates how to configure the `templateParameter` parameter when saving a plan using a market template: - __Step 1: Retrieve Template Parameters__ Call the Market Template API: `GET /api/cloudphone/rpa/template/market/page` Extract the `parameter` field from the response, for example: ```json "parameter": "{\"videoDownloadUrl\":{\"type\":\"video\",\"extra\":{\"name\":\"Select Video\",\"type\":\"video\",\"required\":true,\"defaultValue\":{\"enabled\":false},\"index\":1,\"sizeLimit\":{\"value\":200,\"unit\":\"MB\"},\"formatType\":[\"mp4\",\"mov\"]}},\"videoDescription\":{\"type\":\"string\",\"extra\":{\"name\":\"Video Caption\",\"type\":\"string\",\"required\":false,\"charValid\":{\"enabled\":true,\"value\":1000},\"multiline\":{\"enabled\":true,\"value\":3},\"defaultValue\":{\"enabled\":false},\"index\":2}},\"coverUrl\":{\"type\":\"image\",\"extra\":{\"name\":\"Cover Image\",\"type\":\"image\",\"required\":false,\"defaultValue\":{\"enabled\":false},\"index\":3,\"sizeLimit\":{\"value\":5,\"unit\":\"MB\"},\"formatType\":[\"jpg\",\"png\",\"jpeg\"]}},\"enableAIGC\":{\"type\":\"boolean\",\"extra\":{\"name\":\"AI Label\",\"type\":\"boolean\",\"required\":false,\"defaultValue\":{\"enabled\":false},\"index\":4}},\"productId\":{\"type\":\"string\",\"extra\":{\"name\":\"Product ID\",\"type\":\"string\",\"required\":false,\"charValid\":{\"enabled\":true,\"value\":50},\"placeholder\":\"Product ID only supports digits, with a maximum of 50 characters.\",\"defaultValue\":{\"enabled\":false},\"index\":5}},\"productTitle\":{\"type\":\"string\",\"extra\":{\"name\":\"Product Title\",\"type\":\"string\",\"required\":false,\"charValid\":{\"enabled\":true,\"value\":30},\"defaultValue\":{\"enabled\":false},\"index\":6}},\"getLeads\":{\"type\":\"boolean\",\"extra\":{\"name\":\"Get Leads\",\"type\":\"boolean\",\"required\":false,\"defaultValue\":{\"enabled\":false},\"index\":7}},\"comment\":{\"type\":\"string\",\"extra\":{\"name\":\"Comment\",\"type\":\"string\",\"required\":false,\"charValid\":{\"enabled\":true,\"value\":200},\"multiline\":{\"enabled\":true,\"value\":3},\"defaultValue\":{\"enabled\":false},\"index\":8}}}" ``` - __Step 2: Build the Parameter JSON__ Construct the JSON object according to the parameter requirements: ```json { "__Extra__": { "videoDownloadUrl": { "name": "video_name.mp4", "size": 204800000 } }, "videoDownloadUrl": "https://get.phonegrid.com/pre/cloudPhoneTaskVideo/1542431036481556/4c4fed83685345ae8f1505fbe0c2f123/baby.mp4" } ``` - __Step 3: Escape the JSON String__ Convert the JSON object into an escaped string format: ```json "{\"__Extra__\": {\"videoDownloadUrl\": {\"name\": \"video_name.mp4\",\"size\": 204800000}},\"videoDownloadUrl\": \"https://get.phonegrid.com/pre/cloudPhoneTaskVideo/1542431036481556/4c4fed83685345ae8f1505fbe0c2f123/baby.mp4\"}" ``` - __Step 4: API Call__ Pass the escaped string as the value of the `templateParameter` parameter to the target API.

Cancel schedule

POST/cloudphone/rpa/task/cancel

Page query task executions record

POST/cloudphone/rpa/subTask/page
Query Schedules market template, template name supports fuzzy query

Get a task execution

POST/cloudphone/rpa/subTask/detail/{id}
Query Schedules market template, template name supports fuzzy query

Cancel execution

POST/cloudphone/rpa/subTask/cancel/{id}

Proxy Management

Getting a list of proxies

POST/proxyInfo/page

Adding proxy

POST/proxyInfo/add

Modifying proxy information

POST/proxyInfo/update

Delete proxy

POST/proxyInfo/delete

Group Management

Get a list of groups

POST/envgroup/page

Modify grouping information

POST/envgroup/edit

Add group

POST/envgroup/create

Delete group

POST/envgroup/delete

Tag Management

Getting a list of tags

GET/envtag/all

Create tags

POST/envtag/create

Modify information of tags

POST/envtag/edit

Delete tags

POST/envtag/delete

Schemas

CloudPhoneProfileobject
abnormalStatusinteger

Abnormal status 0-No abnormality 1-Unactivated 2-Out-of-contract 3-Oversold 4-Deactivated

adbInfoany
billingTypeinteger

Billing:0-Free 1-Flexible subscription 2-Monthly

createDatestring (date-time)
createMemberinteger
createMemberNamestring
enableAdbboolean
envNamestring

Cloud Phone Name

envRemarkstring

Profile Remarks

envStatusinteger

Profile Status:0-New 1-Creation Failed 2-Stop 3-Starting up 4-Start 5-Reset In Progress

expireTimeinteger

expiration time

groupIdinteger
groupInfoarray<any>
itemsany
idinteger (int64)
lastConnectDatestring (date-time)
lastConnectMemberIdinteger
lastConnectMemberNamestring
lastStartDatestring (date-time)
lastStartMemberIdinteger
lastStartMemberNamestring
proxyany
proxyStatusinteger

Proxy Status:0-Not Detected 1-Detecting 2-Detecting Failed 3-Detecting Successful

supportAdbboolean
tagIdsarray<string>
itemsstring
tagInfoarray<any>
itemsany
updateDatestring (date-time)
updateMemberinteger
AdbInfoobject
adbIpstringrequired

adb ip

adbPasswordstringrequired

adb connection password

adbPortstringrequired

adb port

remarkstringrequired

Failure Remarks Information

successintegerrequired

Successful acquisition 1=Yes 0=No

ProxyInfoobject
countrystringrequired
countryCodestringrequired
createDatestring (date-time)required
delFlagintegerrequired

1 - deleted 2 - not deleted

expiryTimeintegerrequired
exportIpstringrequired
groupIdintegerrequired
idinteger (int64)required
providerCodestringrequired
proxyAreaCodestringrequired
proxyCatagoryTypeintegerrequired

Proxy type:0:site group 1:cloud platform 2:own IP 3:vps 4:virtual machine

proxyCheckStatusintegerrequired

Detection status:0:pending detection 1:successful detection 2:detection failure 3:unknown error

proxyInfostringrequired
proxyIpstringrequired
proxyNamestringrequired
proxyPortintegerrequired
proxyRegionCodestringrequired
proxyStatusintegerrequired

0-Normal 1-Pending allocation 2-Upgrading 3-Expired

proxySubanyrequired
proxyTypeintegerrequired

Proxy type:0-http 1-https 2-socks5 4-Oxylabs 5-Proxys.io 6-GeoSurf 9-Oxylabsauto 10-Trogan 11-Shadowsocks 12-vmess

proxyTypeCodestringrequired
regionKeystringrequired
releaseTimestring (date-time)required

Release time:deletion time if deleted, expiration time if expired

uniqueIdintegerrequired
ProxySubscriptionobject
activeRecordIdintegerrequired
businessIdstringrequired
createMemberintegerrequired
endTimeintegerrequired
idintegerrequired
nextBillingTimeintegerrequired
startTimeintegerrequired
subPayMethodstringrequired
subStatusintegerrequired

Subscription Status:0-Pending 1-Subscribed 2-Cancelled

subTypeintegerrequired

Subscription Type:1-Agent 2-Package

teamIdintegerrequired
TagInfoobject
idinteger
tagIconstring
tagNamestring
tagSourcestring

Tag Source: ENV profile, PROXY proxy

tagTypestring

Tag type: TAG tag, GROUP group

CloudPhoneDetailobject
idstringrequired
envNamestringrequired
groupIdstringrequired
skuIdstringrequired
tagIdsarray<string>required
itemsstring
billingTypeintegerrequired
proxyStatusintegerrequired
settingsobjectrequired
automaticGeobooleanrequired
automaticLocationbooleanrequired
automaticLanguagebooleanrequired
longitudenumberrequired
latitudenumberrequired
deviceobjectrequired
serverstringrequired
countryNamestringrequired
romintegerrequired
wifiBssidstringrequired
bluetoothMacstringrequired
proxyobjectrequired
idstringrequired
proxyNamestringrequired
proxyIpstringrequired
lastStartMemberIdstringrequired
lastStartMemberNamestringrequired
lastStartDatestring (date-time)required
lastConnectMemberIdstringrequired
lastConnectMemberNamestringrequired
lastConnectDatestring (date-time)required
envStatusintegerrequired
abnormalStatusintegerrequired
expireTimestringrequired
envRemarkstringrequired
createMemberstringrequired
updateMemberstringrequired
updateDatestring (date-time)required
createDatestring (date-time)required
createMemberNamestringrequired
Execution DTOobject
idinteger

Execution record id

taskNamestring

Schedule Task name

taskStateinteger

Schedule status; 0:awaiting execution; 1:Executing; 2:Execution completed 3:Cancel

cloudPhoneIdinteger

Cloud phone ID

cloudPhoneNamestring

Cloud phone name

templateNamestring

Template title

handleFailCodestring

Task failure code

handleFailReasonstring

Task failure reason

handleResultinteger

Task result. 0:failed; 1:succeeded

handleResultAttachmentstring

Task execution result attachment

handleTimestring

Execution time

endTimestring

Task end time

powerOnTimestring

Cloud phone power-on time

triggerNextTimestring

Next scheduled trigger time

triggerTimestring

Scheduled trigger time

createDatestring

Creation time

createMemberstring

Creator

updateDatestring

Last update time

updateMemberstring

Last updater