---
title: Query IMSI
slug: query-imsi
createdAt: 2026-02-05T09:33:58.280Z
---

## Purpose

Returns one or more IMSIs associated with the SIM specified in the \<iccid> element.

Traditional SIMs typically have a single IMSI. However, some SIM types support multiple IMSIs, including:

- Multi-IMSI SIMs&#x20;
- Dual-IMSI configurations&#x20;
- eSIM profiles with alternative IMSIs downloaded to the SIM&#x20;

This request returns all IMSIs associated with the SIM.

### Endpoint

```xml
POST https://api.m2miportal.com
Content-Type: application/xml
Accept: application/xml
```



### Request (XML)

```xml
<query-imsi version="1" api-id="123456">
  <authentication>
    <username>username</username>
    <password>password</password>
  </authentication>
  <iccid>1234567890123456789</iccid>
</query-imsi>
```

### Response (Success)

```xml
<query-imsi-response api-id="123456">
  <api-outcome>Success</api-outcome>  
  <imsi>234101234567890</imsi>
  <imsi>234581234567890</imsi>
  <imsi>234301234567890</imsi>
</query-imsi-response>
```

### Response Elements

| Element | Description                                                            |
| ------- | ---------------------------------------------------------------------- |
| \<imsi> | One or more IMSIs associated with the SIM. Maximum 15 digits per IMSI. |

If no IMSIs can be identified for the SIM, an empty \<imsi> element will be returned.

### Behaviour Notes

- Single-IMSI SIMs will return one \<imsi> element.&#x20;
- Multi-IMSI and eSIM configurations may return multiple \<imsi> elements.&#x20;
- The API does not identify which IMSI is currently active or in use.

:::hint{type="info"}
## Response (Failure)

If a request cannot be processed, the response will include:

- api-outcome indicating failure&#x20;
- An error description explaining the reason&#x20;

Failure responses may occur due to:

- Invalid authentication credentials&#x20;
- Invalid or unknown identifiers (for example ICCID or MSISDN)&#x20;
- Invalid or missing parameters&#x20;
- Values not permitted for the specified SIM type or account configuration&#x20;
- Insufficient permissions&#x20;

Integrating systems should validate input data before submission and implement appropriate error handling and logging.
:::

