Firsty

Search...

Search...

eSIMExperimental

Update eSIM lifecycle

Changes the lifecycle of an eSIM.

Operations:

  • suspend: Suspends an active eSIM. Its packages stay active and their validity keeps running.
  • reactivate: Reactivates a suspended eSIM.
  • terminate: Permanently terminates an eSIM and ends the profile's packages outside a subscription. This cannot be undone.
  • activate: Activates a preactive eSIM or physical SIM for the first time.

Repeating suspend or reactivate on an eSIM already in that state changes nothing.

The change completes asynchronously: the response reports the eSIM's current lifecycleStatus, and the esim.lifecycle.* webhook reports the change once it is made.

patch/profiles/{profileReference}/esims/{esimReference}/lifecycle

Authorization

Authorization: Bearer {token} — an OAuth2 access token from the client-credentials flow. How authentication works

Path parameters

profileReferencestringrequired

The eSIM's profile reference (16-digit numeric string)

esimReferencestringrequired

eSIM reference identifier (18-digit opaque token)

Headers

X-Idempotency-Keystring

Optional idempotency key for mutating requests (POST, PATCH). If provided, duplicate requests with the same key within 48 hours will return the cached original response without duplicating side effects.

Behavior:

  • Same key + same request body → returns cached response (prevents duplicate operations)
  • Same key + different request body → returns 422 error
  • Same key + in-flight request → returns 409 error with Retry-After header
  • Keys expire after 48 hours

Request Body Matching: Request bodies are compared by their JSON content. Object key order, including in nested objects, and whitespace do not affect matching. This means:

  • {"a":1,"b":2} and {"b":2,"a":1} are treated as identical ✓
  • Whitespace differences are ignored ✓
  • URL parameters and headers are NOT included in request body matching

Best Practices:

  • Use UUIDs or client-generated unique strings
  • Store keys on your side to support retries
  • Don't reuse keys across different operations

Request body

application/json · required

operationstring

The lifecycle operation to perform. Either operation or action must be provided.

  • suspend: Temporarily suspend the eSIM (can be reactivated)
  • reactivate: Reactivate a suspended eSIM
  • terminate: Permanently terminate the eSIM (cannot be undone)
  • activate: Activate a preactive eSIM or physical SIM for the first time
Optionssuspendreactivateterminateactivate
actionstring

Alias for operation. Either operation or action must be provided.

Optionssuspendreactivateterminateactivate

Responses

200eSIM lifecycle operation completed successfullyapplication/json
Show response body
dataobjectoptional
Show properties
profileReferencestringoptional
esimReferencestringoptional

eSIM reference identifier (18-digit opaque token)

iccidstringoptional
statusstringoptional

Profile state on the device, as reported by the SM-DP+. A physical SIM has no download lifecycle and stays released; its service state is lifecycleStatus.

  • released: Ready for use; an eSIM profile in this state is available for download (QR code ready)
  • downloaded: Profile has been downloaded to the device
  • installed: Profile is installed on the eSIM chip
  • enabled: Profile is active on the device
  • disabled: Profile is installed but disabled on the device
  • deleted: Profile has been removed from the device
  • faulted: Profile failed to download or install on the device
Optionsreleaseddownloadedinstalledenableddisableddeletedfaulted
lifecycleStatusstringoptional

Network service state of the eSIM.

  • preactive: not live on the network yet
  • active: live on the network
  • suspended: temporarily without network service; can be reactivated
  • terminated: permanently without network service
  • faulted, stale: network service could not be set up; contact support
Optionspreactiveactivesuspendedterminatedfaultedstale
updatedAtstring · date-timeoptional
409The operation does not apply to the eSIM now: `invalid_state_transition`, `esim_terminated`, `esim_not_provisioned`, `esim_change_pending`, `esim_swap_pending` or `port_in_pending`.application/problem+json
Show response body
typestring · uri

URI reference to error documentation

titlestring

Short, consistent error summary

statusinteger

HTTP status code

detailstring

Human-readable explanation specific to this occurrence

codestring

Extensible enum. Machine-readable error slug. This is the field clients should branch on. The URI in type documents the code. Handle an unknown code by its HTTP status.

Examplesbad_requestvalidation_failedunauthorizedpayment_requiredfeature_not_enabledforbiddenbalance_not_foundesim_not_foundnot_foundnumber_registration_not_foundport_in_not_foundprofile_not_foundscheduled_action_not_foundsubscription_not_foundsubscription_plan_not_foundwebhook_endpoint_not_foundbalance_not_availablebalance_update_pendingconcurrent_modificationconflictesim_change_pendingesim_not_activeesim_not_provisionedesim_suspendedesim_swap_cooldownesim_swap_pendingesim_terminatedinvalid_state_transitionlimit_reachedno_esim_availablenumber_registration_pendingport_in_pendingservices_change_pendingservices_not_availablebalance_not_supportedbalance_operation_not_supportedbalance_update_refusedclient_transaction_id_reusedesim_variant_not_allowedesim_variant_not_swappableidempotency_key_reusedinsufficient_balancenumber_not_availablenumber_registration_not_supportedport_in_cancel_refusedporting_not_supportedservices_change_refusedservices_not_changeableservices_not_supportedsim_refused_by_networkunprocessable_entitylockedrate_limit_exceededinternal_errorbad_gatewayservice_unavailable
400Bad request - invalid parameters401Unauthorized - missing or invalid API key403Forbidden - client does not have access to this resource404Resource not found429Rate limit exceeded. A `429` can also arrive without these headers or this body; handle it by its status code.500Internal server error