> 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/eligibility.md).

# Eligibility

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

Eligibility answers a single question: **which IDlayr products is this user eligible to use?** It's the gate you call before triggering any verification — so your application can decide whether to attempt one (Secure SNA, SIM Swap, Reverse SMS, Discovery) or route to an alternative path.

Two endpoints answer that question from two different inputs:

* **By Phone Number** (`GET /v1/eligibility/phone-numbers/{phone_number}`) — uses an HLR lookup as the source of truth for the MSISDN-to-MNO mapping. Can be run at any moment, server-side.
* **By Mobile IP Address** (`GET /v1/eligibility/device-ips/{ip}`) — uses IDlayr's proprietary IP-to-MNO routing tables. Most useful when the IP comes from the user's device — ideally captured via the IDlayr SDK so the IP is the real cellular IP, not a NAT'd or proxy address.

Both return the matched network and the list of eligible IDlayr products for it.

Eligibility is both a **technical** check (does IDlayr have the MNO connectivity, does the MNO support the product?) and a **commercial** check (is your project authorised for that MNO?). See [How it works](/products/eligibility/how-it-works.md) for the three-gate model in full.

## When to use which endpoint

Use **By Phone Number** when:

* You have a claimed MSISDN (e.g. the user typed it into a signup form).
* You want to pre-flight a verification before incurring the cost of a verification call.
* You're running server-side with no device involvement.

Use **By Mobile IP Address** when:

* You don't have the phone number yet but the user is on a device you can observe.
* You want to validate the connection at the point of action (e.g. "is this device on cellular right now, on a supported network?").
* You want a fraud signal — is this traffic from a real mobile network or from a hosting provider / residential proxy / VPN?

The two are complementary. You can use both at different stages of the same flow.

## Where the call runs

Both endpoints are scoped REST APIs, so they ideally run from your **backend** with an OAuth2 access token.

For the **IP endpoint**, a device-captured-IP pattern is also supported: the device captures its real cellular IP via the [IDlayr SDK](/get-started/sdks.md), sends that IP back to your backend over your own application API, and your backend calls the Eligibility endpoint with it. The OAuth2 access token stays on your backend throughout. This pattern is preferred when you need the device's actual mobile IP rather than a server-observed one (which may be NAT'd, proxied, or otherwise opaque).

## In this section

* [**How it works**](/products/eligibility/how-it-works.md) — the three-gate model and the two endpoints' sources of truth.
* [**Prerequisites**](/products/eligibility/prerequisites.md) — what you need before integrating.
* [**Integration**](/products/eligibility/integration.md) — backend walkthrough for both endpoints, plus the device-assisted IP pattern.
* [**Testing in sandbox**](/products/eligibility/testing.md) — sandbox patterns for both endpoints.
* [**Endpoints**](/products/eligibility/endpoints.md) — REST endpoint summary.
* [**Error codes**](/products/eligibility/error-codes.md) — HTTP errors specific to Eligibility.


---

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