Skip to navigation

eSIM operations

Pre-release
API reference

The eUICC, the profile, and the operation are in the event’s detail object.

These events are in pre-release and available only to certain Workspaces. To ask about access, contact emnify Support.

How eSIM operation events work

An eSIM operation is a request that you start in the emnify Portal or through the emnify REST API:

The platform generates a request event for each operation, and an outcome event after the SM-DP+ or the eIM runs it. Both have the event type of the operation:

EventWhen the platform generates itEvent source
Request eventemnify accepts the requestAPI (ID 2)
Outcome eventThe operation endsSM-DP+ (ID 4) for a link or an unlink, eIM (ID 5) for an eUICC operation

Check the event source to tell a request event from an outcome event. A link or an unlink of several SIMs produces a request event and an outcome event for each SIM.

On an IoT eUICC (SGP.32), one operation can show events from two sources. For example, a profile download can show a Download eSIM profile event (ID 93) from the eIM and an eSIM profile downloaded event (ID 83) from the SM-DP+. The platform shows both events and doesn’t merge them.

The sim property identifies the SIM of the profile. An event that names no profile, or a profile that the platform has no SIM for, has no SIM. The endpoint property identifies the device when the SIM is assigned to one. The timestamp of a request event is the time emnify accepted the request. The timestamp of an outcome event is the time the platform received the outcome.

The event types Link eSIM profile and Unlink eSIM profile report a SIM operation for one SIM. For the operations themselves, see Assign EIDs to eSIM profiles.

The request event has the severity Info (ID 0), and its alert property is false. Its user property identifies who started the operation. The outcome event contains no user property, because the SM-DP+ reports the outcome. The outcome event of a successful link or unlink has the severity Info (ID 0). The outcome event of a failed one has the severity Critical (ID 2), alert set to true, and the error in its detail object.

The description names the profile by its ICCID and the eUICC by its EID.

A request event starts with Requested to:

  • Link: Requested to link eSIM profile with ICCID 89883030001234567894 to EID 89049032001234567890123456789057.
  • Unlink: Requested to unlink eSIM profile with ICCID 89883030001234567894 from EID 89049032001234567890123456789057.

An outcome event gives the result:

  • Success: eSIM profile with ICCID 89883030001234567894 linked to EID 89049032001234567890123456789057. For an unlink, the text ends with unlinked from EID 89049032001234567890123456789057.
  • Failure: Failed to link eSIM profile with ICCID 89883030001234567894 to EID 89049032001234567890123456789057: <reason>. For an unlink, it starts with Failed to unlink and names the EID with from.

The reason is the message of the error in the detail object. When the event has no EID, the description leaves it out.

You started a link with the Link by SIM or the Link by Product action. One event type covers both actions, and action in the detail object shows which one ran. When the request names a discovery service, the detail object contains it.

On success, the profile is bound to the EID. Its status is Released (Ready to download in the Portal), and the device with that EID can download it. If the request named a discovery service, emnify also published the profile to that service.

After a failure, the error in the detail object tells you why. If emnify couldn’t publish the profile to the discovery service, the EID isn’t linked and the profile returns to Available. For what each reason means, see If publication fails.

You started an unlink with the Unlink SIM action. An unlink event names no discovery service.

On success, the EID is no longer bound to the profile. The profile returns to Available, so you can link it to the correct EID. If you published the profile to a discovery service, the unlink also withdraws it from that service. Together, the link and unlink events record each EID change and the user who started it.

After a failure, the error in the detail object tells you why. An unlink works only until a device downloads the profile. After the download, nobody can unlink the EID, so order a new profile for the device.

The detail object of a link or unlink event contains the following properties:

PropertyTypeDescription
euiccObjectThe eUICC: id (Integer) and eid (String). For a link, it’s the eUICC of the EID in the request. For an unlink, it’s the eUICC the SIM is linked to. Left out when that eUICC has no EID.
profileObjectThe eSIM profile of the SIM: iccid_with_luhn (String), status (Object), profile_type (Object), and name (String). status and profile_type each have an id and a description. In a request event, status is the profile status while the operation runs. In an outcome event, it’s the status after the outcome.
sim_operationObjectThe SIM operation (see the following table).

The sim_operation object contains the following properties:

PropertyTypeDescription
idStringUUID of the SIM operation, as Get SIM operation details uses it.
userObjectThe user who started the operation: id (Integer). The request event and the outcome event contain the same user.
actionObjectThe action: id (Integer) and description (String). The actions are Link by SIM (ID 1), Link by Product (ID 2), and Unlink SIM (ID 3).
productObjectThe product of a Link by Product: id (Integer).
discovery_serviceObjectThe discovery service that a link request named: id (Integer) and description (String).
errorObjectOnly in the outcome event of a failed operation: message (String) and reason (String). It’s the error of this event’s SIM.

The platform leaves out a property that has no value.

eUICC operation events

The event types 92 to 97 report an operation that you scheduled on an IoT eUICC. The request event has the severity Info (ID 0), and its alert property is false. Its user property identifies who scheduled the operation. The outcome event contains no user property, because the eIM reports the outcome.

If the eIM rejects an operation when emnify schedules it, you get only the request event, with no outcome event. The operation shows Failed in the API, and its error gives the reason, such as not_finished_operations_exist.

One event type covers every outcome of an operation. The severity and the alert property of the outcome event tell you the outcome:

Outcomeoutcome in the detail objectSeverityalert
The operation succeededSUCCESSInfo (ID 0)false
The operation succeeded with a warningWARNINGWarn (ID 1)false
The operation failedFAILEDCritical (ID 2)true
The operation expiredEXPIREDCritical (ID 2)true

For example, a failed download is a Download eSIM profile event with the severity Critical. Check the severity or the outcome before you act on the event type.

An operation expires when the eUICC doesn’t run it before the validity period ends, most often because the eUICC didn’t poll the eIM. By default, the eUICC polls the eIM at every device restart and every 24 hours. Check that the device is online. Then schedule the operation again.

eUICC operation event description

The description names the profile by its ICCID and the eUICC by its EID.

A request event starts with Requested to:

  • Profile operation: Requested to enable eSIM profile with ICCID 89883030001234567894 on EID 89049032001234567890123456789057.
  • Audit: Requested to audit eUICC with EID 89049032001234567890123456789057.
  • Fallback attribute: Requested to set eSIM fallback attribute for profile with ICCID 89883030001234567894 on EID 89049032001234567890123456789057.

An outcome event gives the result:

  • Success: eSIM profile with ICCID 89883030001234567894 enabled on EID 89049032001234567890123456789057.
  • Warning: the success sentence, followed by Warning: <reason>.
  • Failure: Failed to enable eSIM profile with ICCID 89883030001234567894 on EID 89049032001234567890123456789057: <reason>.

The outcome event of an audit names only the eUICC, as in eUICC with EID 89049032001234567890123456789057 audited. The outcome event of a fallback attribute operation names eSIM fallback attribute for profile with ICCID 89883030001234567894. When the platform doesn’t know the ICCID of the profile, the description leaves it out.

The reason comes from the eIM: its error message, or its error reason when it sends no message. An operation that expires without a reason from the eIM has the reason the operation expired.

Audit eUICC

Reports the operation action Audit eUICC (ID 1). An audit covers the whole eUICC, so the event names no profile, no SIM, and no device.

To find the eUICC, use euicc.eid in the detail object. On success, the profiles in the Portal and the API match the eUICC after the platform next syncs it. After a fallback, the Portal can show the previous profile as active until an audit succeeds and the platform syncs the eUICC.

Download eSIM profile

Reports the operation action Download profile (ID 2). The event names the profile only after the platform knows its ICCID.

On success, the profile is installed on the eUICC. For a profile from another connectivity provider, the event can contain only the ICCID and the status. The Portal and the API show its provider and profile name after the platform syncs the eUICC with the eIM. The platform syncs an eUICC once a day, and when you open it in the Portal or read it through the API.

After a failure, the error in the detail object gives the reason from the eIM. Common causes:

  • The activation code is wrong. Check it with the connectivity provider.
  • Some providers block their consumer profiles on an IoT eUICC. Ask the provider for an IoT profile.
  • The SM-DP+ works only in indirect mode.

If a download expires and the device was online the whole time, the SM-DP+ address in the activation code might not exist. See Validity period.

Enable eSIM profile

Reports the operation action Enable profile (ID 3).

On success, the eUICC switched to this profile. The profile that was active before stays installed, but it’s inactive. Wait for the outcome event with outcome SUCCESS or WARNING before you delete that profile, because the eUICC can’t delete the active profile.

Set eSIM fallback attribute

Reports the operation action Set fallback attribute (ID 4).

On success, this profile is the fallback profile of the eUICC. The profile that held the fallback attribute before no longer holds it.

The eUICC rejects the operation in two cases:

  • The profile doesn’t allow fallback. Choose a profile with fallback_allowed set to true.
  • The current fallback profile is active. Enable a different profile first. Then schedule the operation again.

Delete eSIM profile

Reports the operation action Delete profile (ID 5).

On success, the eUICC deleted the profile. After the deletion, only the same eUICC can download an emnify profile again. For an emnify profile, wait for the outcome event with outcome SUCCESS or WARNING before you delete the SIM. Deleting the SIM doesn’t delete the profile from the eUICC. See Delete a profile.

If the profile is active, enable a different profile first. Then schedule the delete again.

Unset eSIM fallback attribute

Reports the operation action Unset fallback attribute (ID 6). When the event names a profile, it’s the profile that held the fallback attribute.

On success, the eUICC has no fallback profile. From then on, a profile that loses coverage stays offline until coverage returns.

The eUICC rejects the operation when the fallback profile is active. Enable a different profile first. Then schedule the operation again.

eUICC operation detail object

The detail object of an eUICC operation event contains the following properties:

PropertyTypeDescription
euiccObjectThe eUICC of the operation: id (Integer) and eid (String).
profileObjectThe eSIM profile of the operation: iccid_with_luhn (String), status (Object), profile_type (Object), and name (String). status and profile_type each have an id and a description. Left out when the operation names no profile, such as an audit. When the platform has no record of the profile, it contains only iccid_with_luhn.
operationObjectThe eUICC operation (see the following table).
eim_notificationObjectOnly in the outcome event. outcome is SUCCESS, WARNING, FAILED, or EXPIRED.

The operation object contains the following properties:

PropertyTypeDescription
idStringUUID of the operation. The request event and the outcome event of one operation have the same id.
actionObjectThe operation action: id (Integer) and description (String).
statusObjectThe operation status when the platform generated the event: id (Integer) and description (String), such as Scheduled, Succeeded, Failed, or Expired.
creation_dateStringDate and time the operation was created.
last_updated_atStringDate and time the operation last changed.
expiry_dateStringDate and time the operation expires.
finalization_dateStringDate and time the operation ended.
userObjectThe user who scheduled the operation: id (Integer). The request event and the outcome event contain the same user.
iccid_with_luhnStringICCID of the profile the operation names.
smdp_plus_hostStringThe SM-DP+ host that served a profile download.
errorObjectThe error of an operation that didn’t succeed: reason (String) and message (String).

The platform leaves out a property that has no value.

Examples

{
"timestamp": "2026-11-12T10:32:18.000Z",
"alert": false,
"description": "eSIM profile with ICCID 89883030001234567894 downloaded on EID 89049032001234567890123456789057.",
"id": 2731266482913307,
"event_type": {
"id": 93,
"description": "Download eSIM profile"
},
"event_source": {
"id": 5,
"description": "eIM"
},
"event_severity": {
"id": 0,
"description": "Info"
},
"organisation": {
"id": 14543,
"name": "Sample Corp"
},
"endpoint": {
"id": 83173458,
"imei": "3567890123456701",
"ip_address": "100.64.12.34",
"name": "Tracker 017",
"tags": null
},
"sim": {
"iccid": "8988303000123456789",
"id": 3668977,
"production_date": "2026-09-14T08:00:00.000Z"
},
"imsi": {
"id": 323245909,
"import_date": "2026-09-14T08:00:00.000Z",
"imsi": "001010000000017"
},
"detail": {
"euicc": {
"id": 42,
"eid": "89049032001234567890123456789057"
},
"profile": {
"iccid_with_luhn": "89883030001234567894",
"status": {
"id": 7,
"description": "Installed"
},
"profile_type": {
"id": 5,
"description": "IoT eUICC Profile"
}
},
"operation": {
"id": "11111144-2222-4333-8444-555555555555",
"action": {
"id": 2,
"description": "Download profile"
},
"status": {
"id": 2,
"description": "Succeeded"
},
"creation_date": "2026-11-12T10:20:00.000Z",
"last_updated_at": "2026-11-12T10:32:18.000Z",
"expiry_date": "2026-11-13T10:20:00.000Z",
"finalization_date": "2026-11-12T10:32:18.000Z",
"iccid_with_luhn": "89883030001234567894"
},
"eim_notification": {
"outcome": "SUCCESS"
}
}
}
{
"timestamp": "2026-11-13T09:15:02.000Z",
"alert": true,
"description": "Failed to enable eSIM profile with ICCID 89883030001234567894 on EID 89049032001234567890123456789057: the operation expired.",
"id": 2731262215748890,
"event_type": {
"id": 94,
"description": "Enable eSIM profile"
},
"event_source": {
"id": 5,
"description": "eIM"
},
"event_severity": {
"id": 2,
"description": "Critical"
},
"organisation": {
"id": 14543,
"name": "Sample Corp"
},
"endpoint": {
"id": 83173458,
"imei": "3567890123456701",
"ip_address": "100.64.12.34",
"name": "Tracker 017",
"tags": null
},
"sim": {
"iccid": "8988303000123456789",
"id": 3668977,
"production_date": "2026-09-14T08:00:00.000Z"
},
"imsi": {
"id": 323245909,
"import_date": "2026-09-14T08:00:00.000Z",
"imsi": "001010000000017"
},
"detail": {
"euicc": {
"id": 42,
"eid": "89049032001234567890123456789057"
},
"profile": {
"iccid_with_luhn": "89883030001234567894",
"status": {
"id": 7,
"description": "Installed"
},
"profile_type": {
"id": 5,
"description": "IoT eUICC Profile"
}
},
"operation": {
"id": "22222244-3333-4444-8555-666666666666",
"action": {
"id": 3,
"description": "Enable profile"
},
"status": {
"id": 4,
"description": "Expired"
},
"creation_date": "2026-11-12T09:15:00.000Z",
"last_updated_at": "2026-11-13T09:15:02.000Z",
"expiry_date": "2026-11-13T09:15:00.000Z",
"finalization_date": "2026-11-13T09:15:02.000Z",
"iccid_with_luhn": "89883030001234567894"
},
"eim_notification": {
"outcome": "EXPIRED"
}
}
}