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

> Test SIM cards with Factory Test Mode (FTM) providing 100 KB data and 10 SMS free of charge before production deployment.

The factory test mode (FTM) feature allows you to test SIM cards prior to their deployment in a production environment.
SIM cards in FTM provide 100 KB of data usage and 10 SMS MT/MO free of charge.

In this state, you won't be charged the monthly SIM hosting fees and the data consumed won't affect the pooled allowance.

## Patch your SIM to Factory Test

> **Note**
>
> You need to register your SIM before activating FTM.
> For more information, see [Register SIMs](/developers/connectivity/register-sims).

A SIM card can only be patched to "Factory Test" from the "Issued" state.
To patch your SIM card, follow these steps:

Open the [API Reference](/developers/api).

Authorize your account, if you haven't already.

Go to the **SIMs** section and select `/api/v1/sim/{sim_id}` ([Update a SIM](/developers/api/sim/sim-by-id-patch)).

Select **Try it out** and enter the `sim_id`.

Edit the **Body Parameters** to change the SIM status ID to `4` (Factory Test):

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

When you're satisfied with your request, click **Send Request**.

> **Success**
>
> The server responds with code `204` if successful.

Once the SIM is assigned to a device, the device status shows as **Factory test** in the [**Connected Devices**](https://portal.emnify.com/connected-devices) page of the emnify Portal.

> **Warning**
>
> When the 100 KB of data or 10 SMS MT/MO are reached, the SIM card automatically moves to "Activated" status and the device status changes to "Enabled."

## Activate FTM in bulk

To activate FTM in bulk, use the following API calls.

First, update the SIM status to Factory Test.

**PATCH** `https://cdn.emnify.net/api/v1/sim/{sim_id}`

```json
{
    "status": {
        "id": 4
    }
}
```

Second, create the endpoints.

> **Note**
>
> **Important**:
> Make sure to assign the Factory Test SIM cards to an enabled endpoint (`status_id=0`).
> Otherwise, assigning SIM cards to a disabled endpoint activates the SIM once the endpoint gets enabled.

**POST** `https://cdn.emnify.net/api/v1/endpoint`

```json
{
    "name": "DEVICE_NAME",
    "status": {
        "id": 0
    },
    "service_profile": {
        "id": 1234
    },
    "tariff_profile": {
        "id": 1234
    },
    "sim": {
        "id": 1234,
        "activate": false
    }
}
```

*Replace `1234` with the relevant ID values.*