Provision a new device
Changed onRequests a new device from the specification in the request body. Optional query parameters select the canonical device type, country, billing mode, and base profile. Returns the device, its resolved billing strategy, and its stream token.
Request
- Base URLhttps://api.mobilerun.ai
- URLhttps://api.mobilerun.ai/devices
- AuthHTTP bearer
Query parameters
Use android_cloud_phone for a cloud Android phone. Only canonical identifiers are accepted. Other backends are deployment-specific; recognized but unavailable types return DEVICE_TYPE_UNAVAILABLE (422). Retired dedicated_* aliases are rejected with a canonical replacement.
ISO 3166-1 alpha-2 country code. If omitted the system picks the country with the most availability.
Profile ID to use as device spec
Optional device template, e.g. onboarding. The device gets the template's Android version and preinstalled apps and is ready in seconds when a prepared phone is available; otherwise it boots with the same setup. Country, name and proxy still come from this request. Cannot be combined with profileId, apps or androidVersion. Omit it to create from the request alone.
Billing mode. 'auto' tries subscription first, then minute billing if no subscription entitlement exists or all subscription slots are in use, provided minute billing is enabled. When subscription billing is disabled, auto uses minutes directly. Billing-service failures never trigger fallback. 'subscription' requires an available subscription slot and never falls back. 'minute' uses minute billing only, subject to balance and concurrency checks. Modes depend on the device type's billing configuration.
Headers
Optional. 1-255 printable ASCII characters without spaces. Retrying with the same key and request returns the same device instead of creating another one; see the Idempotency section of the create-device guide.
Request body
Example request
{
"$schema": "https://example.com/schemas/DeviceSpec.json",
"location": {
"$schema": "https://example.com/schemas/Location.json"
}
}Response
OK
Example response
{
"$schema": "https://example.com/schemas/DeviceInfo.json"
}Changes
- info
added the new optional
queryrequest parametertemplate
- info
- breaking
removed the enum value
android_cloud_phonefrom thequeryrequest parameterdeviceType - breaking
removed the enum value
dedicated_emulated_devicefrom thequeryrequest parameterdeviceType - breaking
removed the enum value
dedicated_ios_devicefrom thequeryrequest parameterdeviceType - breaking
removed the enum value
dedicated_physical_devicefrom thequeryrequest parameterdeviceType - breaking
removed the enum value
dedicated_premium_devicefrom thequeryrequest parameterdeviceType - info
the endpoint scheme security
bearerAuthwas removed from the API - info
added the new optional
headerrequest parameterIdempotency-Key - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the required property
to the response with the status
- breaking