---
title: "Download eSIM Profile (JSON Stream)"
method: POST
path: "/assets/{asset_id}/alpon/esim"
tags: ["ALPON"]
---

# Download eSIM Profile (JSON Stream)

`POST /assets/{asset_id}/alpon/esim`

## Request

- Base URL: `https://api.sixfab.com/v1`
- URL: `https://api.sixfab.com/v1/assets/{asset_id}/alpon/esim`
- Auth: API key in header `X-API-Key`

Download a new eSIM profile to the ALPON device using JSON stream for real-time progress tracking.

**Status Types:**
There are three types of status events:
- **Running:** The download is in progress.
- **Success:** The download was successful.
- **Fail:** The download failed.


Example of a running JSON stream:
```
{"status": "Running", "step": "DOWNLOAD_PROFILE_INITIALIZE_SECURE_CHANNEL", "message": "Downloading Profile", "progress": "50"}
```

Example of successful  JSON stream:
```
{
"status": "Success",
"step": "SUCCESS",
"message": "Successfully downloaded Profile",
"progress": "100",
"profiles": [
    {
        "aid": "<aid>",
        "iccid": "<iccid>",
        "provider_name": "Sixfab",
        "state": true
    },
    {
        "aid": "<aid>",
        "iccid": "<iccid>",
        "provider_name": "Downloaded Profile",
        "state": false
    },

]
}
```

Example of a failed JSON stream:
```
{"status": "Fail", "step": "ERROR", "message": "Error while downloading eSIM profile.", "progress": "100"}
```


**Possible Error Codes:**
- **AssetNotFound:** The asset with the specified ID was not found.
- **AssetNotAlponDevice:** The device is not an ALPON device.
- **ErrorNoActCode:** act_code not provided in the payload.
- **ErrorNoApn:** apn not provided in the payload.
- **ErrorNoName:** name not provided in the payload.
- **Unknown:** An unknown error occurred.
- **DeviceNotReachable:** The device is not reachable.

## Path parameters

- `asset_id` string, required: Serial Number, UUID, SIM SID or SIM ICCID

## Headers

- `x-forwarded-for` string

## Request body

- ESimDownloadRequestModel
  - `act_code` string: Activation code for downloading the eSIM profile
  - `apn` string: Access Point Name for the SIM card.
  - `name` string: Name of the eSIM profile.

## Response `200`

JSON Stream for eSIM profile download

## Other responses

- `400`: Bad request or download error
- `404`: Asset not found
- `422`: Validation Error
- `502`: Device not reachable

## Changes

- **2026-11-03** `5b43035c37ee`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/sixfab/apis/sixfab-developer-api/changes/assets/:asset_id/alpon/esim/post.md)

---

[API](https://skmtc.dev/sixfab/apis/sixfab-developer-api.md) - [All operations](https://skmtc.dev/sixfab/apis/sixfab-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sixfab/apis/sixfab-developer-api/revisions/5b43035c37ee?raw)
