> For the complete documentation index, see [llms.txt](https://docs.idlayr.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.idlayr.com/products/risk/sim-swap.md).

# SIM Swap

{% hint style="info" %}
**Backend API** · GA
{% endhint %}

Detect whether the SIM card associated with a mobile phone number has recently changed, by querying the mobile network operator in real time. Used as a pre-transaction risk signal to flag account-takeover risk before high-value actions.

SIM Swap is a backend-to-backend API. No mobile SDK, no device involvement, no cellular-data path. Your backend sends a phone number; IDlayr returns a deterministic SIM-change result.

## What it does

* Queries the MNO's live subscriber record for the supplied phone number.
* Returns a deterministic `no_sim_change` boolean — `true` when the SIM hasn't recently changed, `false` when it has.
* Operates entirely server-to-server. The end user is not involved at any step; the check is invisible to them.
* Sub-second response time on supported networks.

## What it doesn't do

* Doesn't authenticate the person or the device — SIM Swap is a risk signal, not a proof factor. Pair with [Secure SNA](/products/number-verification/secure-sna.md) when device-and-number trust also matters.
* Doesn't distinguish a fraudulent SIM swap from a legitimate one (an upgrade, a replacement). The customer's business logic decides what a positive result means.
* Doesn't return SIM-change history. It tells you whether a change happened within a recent window — the boundary is defined by the MNO and IDlayr's contract.

## Common use cases

* **Harden SMS OTP** — check for a recent SIM swap before delivering an OTP. If positive, route to an alternative verification method.
* **Strengthen Secure SNA** — pair SIM Swap with SNA. Together, they confirm both that the device holds the number and that the SIM hasn't recently changed.
* **Account-login and step-up protection** — flag suspicious recent SIM activity before password resets, device changes, or payment approvals.
* **Onboarding risk assessment** — check whether the number a new user is signing up with is associated with a recent SIM change.
* **Payment and transaction protection** — pre-transaction check in banking, fintech, and e-commerce flows.

## In this section

* [**How it works**](/products/risk/sim-swap/how-it-works.md) — the backend-to-MNO query flow.
* [**Prerequisites**](/products/risk/sim-swap/prerequisites.md) — what you need before integrating.
* [**Integration**](/products/risk/sim-swap/integration.md) — backend-to-backend integration walkthrough.
* [**Testing in sandbox**](/products/risk/sim-swap/testing.md) — sandbox MSISDN patterns for SIM Swap.
* [**Endpoints**](/products/risk/sim-swap/endpoints.md) — REST endpoint summary; full reference in API Reference.
* [**Error codes**](/products/risk/sim-swap/error-codes.md) — HTTP errors and terminal-state codes specific to SIM Swap.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.idlayr.com/products/risk/sim-swap.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
