Skip to main content
POST
/
devices
/
{deviceId}
/
esim
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
});

const response = await client.devices.esim.activate('deviceId', {
  enable: true,
  smDpAddr: 'smDpAddr',
});

console.log(response.iccid);
{
  "carrier": "<string>",
  "displayName": "<string>",
  "iccid": "<string>",
  "isEmbedded": true,
  "slot": 123,
  "subId": 123,
  "type": "<string>",
  "$schema": "<string>"
}

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
enable
boolean
required
smDpAddr
string
required
confirmationCode
string

Optional carrier-issued confirmation code (the 4th LPA segment). Required only for plans whose SM-DP+ challenges the device for one. Requires matchingId — the LPA spec only interprets segment 4 when segment 3 is present.

matchingId
string

Response

OK

carrier
string
required
displayName
string
required
iccid
string
required
isEmbedded
boolean
required
slot
integer<int64>
required
subId
integer<int64>
required
type
string
required
$schema
string<uri>
read-only

A URL to the JSON Schema for this object.

Example:

"https://example.com/schemas/ESimSubscription.json"