Skip to main content
POST
/
devices
/
{deviceId}
/
language
JavaScript
import Mobilerun from '@mobilerun/sdk';

const client = new Mobilerun({
  apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});

await client.devices.language.set('deviceId', { locale: 'sqf-Kkif-BB' });
{
  "$schema": "<string>",
  "detail": "<string>",
  "errors": [
    {
      "location": "<string>",
      "message": "<string>",
      "value": "<unknown>"
    }
  ],
  "instance": "<string>",
  "status": 123,
  "title": "<string>",
  "type": "about:blank"
}

Authorizations

Authorization
string
header
required

Bearer token via Authorization header

Headers

X-Device-Display-ID
integer<int64>
default:0
Required range: x >= 0

Path Parameters

deviceId
string
required

Body

application/json
locale
string
required

BCP-47 locale: a 2–3 letter language tag, optionally followed by a 4-letter script and/or a 2-letter region (e.g. en-US, de-DE, ja-JP, zh-Hans-CN).

Pattern: ^[a-z]{2,3}(-[A-Z][a-z]{3})?(-[A-Z]{2})?$
restart
boolean

Restart zygote so the locale change takes full effect immediately. Without it, the locale is written but won't fully apply until the next reboot.

Response

No Content