> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.iot.telia.lt/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.iot.telia.lt/_mcp/server.

> Manage device connectivity by updating SIM and endpoint statuses including activation, suspension, enabling, and disabling via the API.

To change your device's connectivity, you need to execute two distinct API calls—one for the SIM and another for the endpoint.
It's important to run both APIs to keep the statuses aligned and consistent.

For getting your device online, this entails patching the [SIM status](/developers/reference/sim#sim-status-object) to **Activated** and the [endpoint status](/developers/reference/endpoint#endpoint-status-object) to **Enabled**.
With the Telia API, you can also change the statuses of multiple devices at once.

> **Note**
>
> This guide uses the [Postman API platform](https://quickstarts.postman.com/) for example purposes.
> Each time you use the Telia API, you must authenticate in Postman.

## Update the SIM status

After [registration](/developers/connectivity/register-sims), the SIMs move between the different states depending on your needs and requirements.

The [Update a SIM](/developers/api/sim/sim-by-id-patch) API call lets you to manage device connectivity by patching the [SIM status](/developers/reference/sim#sim-status-object).
You can patch SIMs to the following statuses and respective IDs using the API:

* **Issued** (`"id": 0`) to either **Activated** (`"id": 1`) or **Factory Test** (`"id": 4`)
* **Factory Test** (`"id": 4`) to **Activated** (`"id": 1`)
* Switch between **Activated** (`"id": 1`) and **Suspended** (`"id": 2`)

### Activate a SIM

> **Warning**
>
> **Warning**:
> Telia charges for activated SIMs, even if the endpoint is disabled.
> To avoid accruing unexpected charges, [suspend the SIM](#suspend-a-sim).

To create a new request in Postman, click **+New** in the upper left corner.
Name the request *Update status* and add it to the *SIMs* collection you created in [Register SIMs](/developers/connectivity/register-sims).

Then follow these steps to set up your request:

Select the **PATCH** HTTP method.

Set the request URL as `https://iot.telia.lt/api/v1/sim/{sim_id}`, replacing `{sim_id}` with the ID of the SIM you want to update.

Navigate to the **Headers** tab.
Insert `Content-Type` and `Authorization` as **Keys** and add the respective **Values** `application/json` and `Bearer TOKEN`.
Replace `TOKEN` with your [`auth_token`](/developers/auth/application-tokens) and make sure there's a non-breaking space between `Bearer` and the token value.

Go to the **Body** tab and select **raw**.
Make sure the format is set to **JSON**.
Then, set the status to **Activated** to get them online immediately:

```json {3}
{
  "status": {
    "id": 1
  }
}
```

### Suspend a SIM

To suspend a SIM card, follow the same steps from the preceding "Activate the SIM" section.
Then, in the **Body** tab, set the status to **Suspended**:

```json {3}
{
    "status": {
        "id": 2
    }
}
```

## Update the endpoint status

Similar to SIMs, the [Update an Endpoint](/developers/api/endpoint/endpoint-by-id-patch) API call lets you to manage device connectivity by patching the [endpoint status](/developers/reference/endpoint#endpoint-status-object).

You can patch endpoints to the following statuses and respective IDs using the API:

* **Enabled** (`"id": 0`)
* **Disabled** (`"id": 1`)

### Enable an endpoint

To create a new request in Postman, click **+New** in the upper left corner.
Name the request *Update status* and add it to the *Endpoints* collection you created in [Create endpoints](/developers/connectivity/create-endpoints).

Then follow these steps to set up your request:

Select the **PATCH** HTTP method.

Set the request URL as `https://iot.telia.lt/api/v1/endpoint/{endpoint_id}`, replacing `{endpoint_id}` with the ID of the endpoint you want to update.

Navigate to the **Headers** tab.
Insert `Content-Type` and `Authorization` as **Keys** and add the respective **Values** `application/json` and `Bearer TOKEN`.
Replace `TOKEN` with your [`auth_token`](/developers/auth/application-tokens) and make sure there's a non-breaking space between `Bearer` and the token value.

Go to the **Body** tab and select **raw**.
Make sure the format is set to **JSON**.
Then, set the status to **Enabled** to get your device online immediately:

```json {3}
{
  "status": {
    "id": 0
  }
}
```

### Disable an endpoint

> **Warning**
>
> **Warning**:
> Telia charges for activated SIMs, even if the endpoint is disabled.
> To avoid accruing unexpected charges, [suspend the SIM](#suspend-a-sim).

To disable an endpoint, follow the steps in [Enable an endpoint](#enable-an-endpoint).
In the last step, set the status to **Disabled** instead:

```json {3}
{
    "status": {
        "id": 1
    }
}
```

## Bulk updates on multiple devices

### Prepare your data

The most efficient way to update multiple devices simultaneously via the Telia API is to have your data prepared in a comma-separated values (CSV) file.

One way to generate a CSV file is to create a table in Excel that includes the necessary details for your SIMs or endpoints.
After you create your file, do the following:

In the first row, insert the required properties as columns (for example, `sim_id` or `endpoint_id`).

Fill in the corresponding data.
Each row should represent one SIM or endpoint.

Once complete, save it as a CSV file (`.csv`).

### Run the API in bulk with Postman

> **Warning**
>
> **Warning**:
> Check the [rate limits](/developers/api-guidelines/rate-limits) before running the API in bulk.

If you haven't already, set up your *Update status* request using the process outlined in the preceding sections.
Then, follow these steps:

Click **Runner** in the lower right corner.

Choose how to run your collection and set your **Run configuration**:

* **Iterations**: Number of devices you want to create (also the number of rows from your CSV file).
* **Delay**: Time between calls.
  Best practice is 1000 ms regardless of how many devices you're creating.
* **Data**: Upload your CSV file with the **Data File Type** set to `text/csv`.

Adjust any other settings as necessary, then click **Start Run**.

## Where to find the necessary IDs

### SIM ID

To get your `sim_id`, run the [List SIMs](/developers/api/sim/sim-per-page-sort-by-q-and-page-get) API call.
Then, locate the ID of the SIM you want to update.

### Endpoint ID

To get your `endpoint_id`, run the [List Endpoints](/developers/api/endpoint/get-endpoints) API call.
Then, locate the ID of the endpoint you want to update.