> 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.emnify.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emnify.com/_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 emnify REST 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 emnify REST API, you must authenticate in Postman.
>
> For more information, see [How to use the REST API via Postman](https://www.emnify.com/developer-blog/postman-emnify-api) on the emnify Developer Blog.

## 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`)

For definitions of each SIM status and how they relate to each other, see [SIM lifecycle management](/services/sim-lifecycle-management).

### Activate a SIM

> **Warning**
>
> **Warning**:
> emnify 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://cdn.emnify.net/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://cdn.emnify.net/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**:
> emnify 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 emnify REST 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.

Alternatively, you can find the ID and other SIM details in the [**SIM Inventory**](https://portal.emnify.com/sim-inventory).
For specifics, see [SIM Inventory](/portal/sim-inventory) in the Portal documentation.

### 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.

Alternatively, you can find the ID and other endpoint details in the [**Connected Devices**](https://portal.emnify.com/connected-devices).
For specifics, see [Get device information](/portal/connected-devices#get-device-information) in the Portal documentation.

To get a list of all your devices, follow these steps:

Log in to your [Portal account](https://portal.emnify.com/sign/in).

Navigate to [**Reports**](https://portal.emnify.com/reports) and select **Device list**.

Hover over **Endpoint Repository**.
Click the hamburger menu (labelled **More Options**) in the upper right corner of the sheet.

In the menu, click **Download Data** to download a CSV file of the device list.

To use this file in the Runner, keep the `endpoint_id` column and delete the rest.