sim

Migrate SIMs between Workspaces

<Info icon="fa-light fa-lock" className="permission-callout"> <div className="permission-callout__header"><span className="permission-callout__title"><span className="permission-callout__label">Required permissions</span> <span className="fern-docs-badge small blue subtle rounded-full permission-callout__beta">Beta</span></span> <span className="permission-callout__learn-more">[Learn more](/developers/api-guidelines/permissions#how-permissions-work)</span></div>

Sim.Workspace + Transfer

<div className="permission-callout__roles"><span className="permission-callout__roles-label">Roles:</span> <Badge intent="info">Administrator</Badge></div> </Info>

Migrate SIMs from one Workspace to another.

Requirements

  • The calling user must have Administrator permissions on both the target and source Workspaces
  • The target Workspace must be an enterprise Workspace
  • Only 500 SIMs can be migrated per request
  • You must provide exactly one of: sims, iccids, or iccid_range
<Note> This endpoint requires authentication with [user credentials](/developers/auth/user-credentials), as application tokens are scoped to a single Workspace. </Note>

Behavior

  • Dry run mode: The dry_run parameter defaults to true. Set it to false to execute the migration.
  • Activated SIMs: SIMs in status ACTIVATED are automatically suspended during migration.
  • Attached devices: If SIMs are attached to devices, set auto_detach_devices: true or the request fails.
<Warning> The request fails if one or more SIMs don't meet the requirements for migration. Check the `errors` array in the response for details. </Warning>
post/api/v1/sim/migration/workspace

Request

  • Base URL: https://cdn.emnify.net
  • URL: https://cdn.emnify.net/api/v1/sim/migration/workspace
  • Auth: HTTP bearer

Request body

iccidsstring[]

List of ICCIDs to migrate. All SIMs must belong to the source Workspace. The list may include up to 500 ICCIDs.

<Info> Cannot be used in combination with the `sims` or the `iccid_range` field. </Info>
dry_runboolean

Controls whether the migration is executed or simulated.

  • true (default): Returns a preview of SIMs that would be migrated without making changes
  • false: Executes the migration
<Tip> Always test with a dry run first to verify the SIMs match your expectations. </Tip>
auto_detach_devicesboolean

If set to true, the SIMs automatically detach from the devices before being migrated. Otherwise, the request is rejected if one or more SIMs are attached to devices.

Response

Successful migration request. If dry_run was set to false, the migration is processed. If dry_run was set to true, the response contains a summary of the changes that would be executed.

sim_countnumber double required

The amount of SIMs to be migrated

dry_runboolean required

The dry_run option specified in the request

auto_detach_devicesboolean required

The auto_detach_devices option specified in the request

Changes

No recorded changes to this operation across all 1 revision of this API.