> 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/api-reference/discovery-check/v1.md).

# v1

Mobile number discovery. Create a Check, drive the device through the verification URL, then submit the resulting code to resolve the discovered phone number and network.

## List Checks

> Get a page of Checks scoped to the calling project.

```json
{"openapi":"3.1.0","info":{"title":"IDlayr Discovery API","version":"1.0.0"},"tags":[{"name":"discovery_check_v1","description":"Mobile number discovery. Create a Check, drive the device through the verification URL, then\nsubmit the resulting code to resolve the discovered phone number and network.\n"}],"servers":[{"url":"https://{data_residency}.api.idlayr.com","description":"For accounts with data residency in the EU or US.","variables":{"data_residency":{"default":"eu","enum":["eu","us"]}}}],"security":[{"ProjectBearerAuth":[]}],"components":{"securitySchemes":{"ProjectBearerAuth":{"description":"The IDlayr APIs expect the bearer token to be an [OAuth2 Access Token](https://tools.ietf.org/html/rfc6749#section-1.4).\nThe access token should be in the `Authorization` HTTP header,\ne.g. `Authorization: Bearer {access_token}`. See [Create an Access Token](/docs/reference/basics#operation/oauth2-token).\n\nThe token should be associated with an **IDlayr** Project. These are created using a Project's `client_id` and `client_secret`.\n","type":"http","scheme":"bearer"}},"parameters":{"pageSize":{"name":"size","description":"The number of items returned per page.","in":"query","schema":{"type":"integer","default":10,"minimum":1,"maximum":100}},"pageNumber":{"name":"page","description":"The page number being requested.","in":"query","schema":{"type":"integer","default":1,"minimum":1}}},"headers":{"X-RateLimit-Limit":{"description":"Request limit per second.","schema":{"type":"integer"},"required":true},"X-RateLimit-Remaining":{"description":"Remaining requests for the rate limit period.","schema":{"type":"integer"},"required":true},"X-RateLimit-Reset":{"description":"Time left, in seconds, for `X-RateLimit-Remaining` to be reset.","schema":{"type":"integer"},"required":true}},"schemas":{"DiscoveryCheckPage":{"description":"Page wrapper for a list of Checks: a `content` array plus a `page` block\nwith `size` / `number` / `total_pages` / `total_elements` metadata.\n","type":"object","unevaluatedProperties":false,"required":["content","page"],"properties":{"content":{"description":"Checks in the current page.","type":"array","items":{"$ref":"#/components/schemas/DiscoveryCheck"}},"page":{"description":"Pagination metadata for the collection.","$ref":"#/components/schemas/page"}}},"DiscoveryCheck":{"description":"A Check resource in any of its states, selected by `status`: `ACCEPTED`/`PENDING` carry\n`ttl`; `COMPLETED` carries `network_id`; `ERROR`/`EXPIRED` carry `error_code`. The\ndiscovered `phone_number` is delivered only on the code-submission response, not on reads.\n","type":"object","unevaluatedProperties":false,"required":["check_id","status","created_at"],"properties":{"check_id":{"description":"The unique ID of the Check resource.","$ref":"#/components/schemas/UUID"},"check_url":{"description":"Self-link URL for this Check resource. Present on the create response so the client\ncan drive the verification flow without composing the path itself.\n","type":"string","format":"uri"},"status":{"description":"The current state of the Check.","type":"string","enum":["ACCEPTED","PENDING","COMPLETED","ERROR","EXPIRED"]},"ttl":{"description":"Time-to-live, in seconds, before the Check transitions to `EXPIRED`.","type":"integer"},"network_id":{"description":"Network identifier resolved during the discovery.","$ref":"#/components/schemas/NetworkIDResponse"},"error_code":{"description":"Failure/expiry reason. `ERROR`: `not_mobile_ip`, `mno_not_supported`, `mno_timeout`,\n`mno_redirect_unsupported`. `EXPIRED`: `redirect_not_performed`, `incomplete_redirect`.\n","type":"string"},"created_at":{"description":"When the Check was created.","$ref":"#/components/schemas/ISODateTime"},"updated_at":{"description":"When the Check was last updated.","$ref":"#/components/schemas/ISODateTime"},"reference_id":{"description":"Caller-supplied reference, echoed from the create request.","type":"string"}},"allOf":[{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"ACCEPTED"}}},"then":{"required":["ttl"],"not":{"anyOf":[{"required":["network_id"]},{"required":["error_code"]}]}}},{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"PENDING"}}},"then":{"required":["ttl"],"not":{"anyOf":[{"required":["network_id"]},{"required":["error_code"]}]}}},{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"COMPLETED"}}},"then":{"required":["network_id"],"not":{"anyOf":[{"required":["ttl"]},{"required":["error_code"]}]}}},{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"ERROR"}}},"then":{"required":["error_code"],"not":{"anyOf":[{"required":["ttl"]},{"required":["network_id"]}]}}},{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"EXPIRED"}}},"then":{"required":["error_code"],"not":{"anyOf":[{"required":["ttl"]},{"required":["network_id"]}]}}}]},"UUID":{"description":"A Universally Unique IDentifier.","type":"string","format":"uuid","pattern":"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"},"NetworkIDResponse":{"description":"The ID of the Network resolved during the verification flow.","type":"string"},"ISODateTime":{"description":"A DateTime conforming to ISO 8601 specifications.","type":"string","format":"date-time"},"page":{"description":"Pagination metadata.","type":"object","unevaluatedProperties":false,"required":["size","number","total_pages","total_elements"],"properties":{"size":{"description":"The number of records per page.","type":"integer"},"number":{"description":"The current page number.","type":"integer"},"total_pages":{"description":"The total number of pages available.","type":"integer"},"total_elements":{"description":"The total number of records across all pages.","type":"integer"}}},"RateLimitReached":{"description":"The API rate limit for the workspace has been exceeded. The `Retry-After` header carries\nthe number of seconds after which the caller can retry.\n","type":"object","unevaluatedProperties":false,"required":["type","title","status","detail","error_code"],"properties":{"type":{"description":"A URI reference [RFC 3986] that identifies the problem type.","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"error_code":{"description":"Machine-readable error code identifying the problem type.","type":"string"}}}}},"paths":{"/v1/number-verification/discovery-checks":{"get":{"summary":"List Checks","description":"Get a page of Checks scoped to the calling project.","operationId":"get-discovery-checks-v1","tags":["discovery_check_v1"],"parameters":[{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/pageNumber"},{"name":"search","in":"query","description":"Optional RSQL filter applied on top of the implicit project scope. Filterable fields: status, network_id, error_code, reference_id, created_at, updated_at.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A page of Checks.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryCheckPage"}}}},"429":{"description":"Rate Limit Reached","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RateLimitReached"}}}}}}}}}
```

## Create a Check

> Starts a Discovery flow. The response is always an \`ACCEPTED\` Check carrying the \`url\` for\
> the device to perform the verification. No phone number is supplied on create — the number is\
> discovered from the device's network session.<br>

```json
{"openapi":"3.1.0","info":{"title":"IDlayr Discovery API","version":"1.0.0"},"tags":[{"name":"discovery_check_v1","description":"Mobile number discovery. Create a Check, drive the device through the verification URL, then\nsubmit the resulting code to resolve the discovered phone number and network.\n"}],"servers":[{"url":"https://{data_residency}.api.idlayr.com","description":"For accounts with data residency in the EU or US.","variables":{"data_residency":{"default":"eu","enum":["eu","us"]}}}],"security":[{"ProjectBearerAuth":[]}],"components":{"securitySchemes":{"ProjectBearerAuth":{"description":"The IDlayr APIs expect the bearer token to be an [OAuth2 Access Token](https://tools.ietf.org/html/rfc6749#section-1.4).\nThe access token should be in the `Authorization` HTTP header,\ne.g. `Authorization: Bearer {access_token}`. See [Create an Access Token](/docs/reference/basics#operation/oauth2-token).\n\nThe token should be associated with an **IDlayr** Project. These are created using a Project's `client_id` and `client_secret`.\n","type":"http","scheme":"bearer"}},"schemas":{"DiscoveryCheckCreatePayload":{"description":"Payload for creating a Check. All fields are optional.","type":"object","unevaluatedProperties":false,"properties":{"phone_ip":{"description":"Optional. The IP address (IPv4 or IPv6) of the mobile device whose number is being discovered.","type":"string"},"reference_id":{"description":"Optional. Your own internal reference for this Check; echoed back on responses and webhooks.\nDo not use Personally Identifiable Information (PII).\n","type":"string","maxLength":50},"callback_url":{"description":"Optional. URL the platform will POST the webhook payload to when the Check reaches a terminal status.","type":"string","format":"uri"},"redirect_url":{"description":"Optional. URL the platform will redirect the device to after the verification step.\nStatus and (on failure) `error_code` are appended as query parameters.\n","type":"string","format":"uri"}}},"DiscoveryCheckCallbackBody":{"description":"Terminal-state webhook body. `COMPLETED` carries `phone_number` and `network_id`;\n`ERROR`/`EXPIRED` carry `error_code`.\n","type":"object","unevaluatedProperties":false,"required":["check_id","status","created_at"],"properties":{"check_id":{"description":"The unique ID of the Check resource.","$ref":"#/components/schemas/UUID"},"status":{"description":"The current state of the Check.","type":"string","enum":["COMPLETED","ERROR","EXPIRED"]},"phone_number":{"description":"The phone number discovered from the device's network session, in\n[E.164 format](https://www.itu.int/rec/T-REC-E.164-201011-I/en) (leading `+`).\n","type":"string","format":"E.164"},"network_id":{"description":"Network identifier resolved during the discovery.","$ref":"#/components/schemas/NetworkIDResponse"},"error_code":{"description":"Failure/expiry reason. `ERROR`: `not_mobile_ip`, `mno_not_supported`, `mno_timeout`,\n`mno_redirect_unsupported`. `EXPIRED`: `redirect_not_performed`, `incomplete_redirect`.\n","type":"string"},"created_at":{"description":"When the Check was created.","$ref":"#/components/schemas/ISODateTime"},"updated_at":{"description":"When the Check was last updated.","$ref":"#/components/schemas/ISODateTime"},"reference_id":{"description":"Caller-supplied reference, echoed from the create request.","type":"string"}},"allOf":[{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"COMPLETED"}}},"then":{"required":["phone_number","network_id"]}},{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"ERROR"}}},"then":{"required":["error_code"]}},{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"EXPIRED"}}},"then":{"required":["error_code"]}}]},"UUID":{"description":"A Universally Unique IDentifier.","type":"string","format":"uuid","pattern":"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"},"NetworkIDResponse":{"description":"The ID of the Network resolved during the verification flow.","type":"string"},"ISODateTime":{"description":"A DateTime conforming to ISO 8601 specifications.","type":"string","format":"date-time"},"DiscoveryCheck":{"description":"A Check resource in any of its states, selected by `status`: `ACCEPTED`/`PENDING` carry\n`ttl`; `COMPLETED` carries `network_id`; `ERROR`/`EXPIRED` carry `error_code`. The\ndiscovered `phone_number` is delivered only on the code-submission response, not on reads.\n","type":"object","unevaluatedProperties":false,"required":["check_id","status","created_at"],"properties":{"check_id":{"description":"The unique ID of the Check resource.","$ref":"#/components/schemas/UUID"},"check_url":{"description":"Self-link URL for this Check resource. Present on the create response so the client\ncan drive the verification flow without composing the path itself.\n","type":"string","format":"uri"},"status":{"description":"The current state of the Check.","type":"string","enum":["ACCEPTED","PENDING","COMPLETED","ERROR","EXPIRED"]},"ttl":{"description":"Time-to-live, in seconds, before the Check transitions to `EXPIRED`.","type":"integer"},"network_id":{"description":"Network identifier resolved during the discovery.","$ref":"#/components/schemas/NetworkIDResponse"},"error_code":{"description":"Failure/expiry reason. `ERROR`: `not_mobile_ip`, `mno_not_supported`, `mno_timeout`,\n`mno_redirect_unsupported`. `EXPIRED`: `redirect_not_performed`, `incomplete_redirect`.\n","type":"string"},"created_at":{"description":"When the Check was created.","$ref":"#/components/schemas/ISODateTime"},"updated_at":{"description":"When the Check was last updated.","$ref":"#/components/schemas/ISODateTime"},"reference_id":{"description":"Caller-supplied reference, echoed from the create request.","type":"string"}},"allOf":[{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"ACCEPTED"}}},"then":{"required":["ttl"],"not":{"anyOf":[{"required":["network_id"]},{"required":["error_code"]}]}}},{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"PENDING"}}},"then":{"required":["ttl"],"not":{"anyOf":[{"required":["network_id"]},{"required":["error_code"]}]}}},{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"COMPLETED"}}},"then":{"required":["network_id"],"not":{"anyOf":[{"required":["ttl"]},{"required":["error_code"]}]}}},{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"ERROR"}}},"then":{"required":["error_code"],"not":{"anyOf":[{"required":["ttl"]},{"required":["network_id"]}]}}},{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"EXPIRED"}}},"then":{"required":["error_code"],"not":{"anyOf":[{"required":["ttl"]},{"required":["network_id"]}]}}}]},"MobileNetworkOperatorNotSupported":{"description":"The Mobile Network Operator (MNO) for the supplied phone number is not supported.","type":"object","unevaluatedProperties":false,"required":["type","title","status","detail","error_code"],"properties":{"type":{"description":"A URI reference [RFC 3986] that identifies the problem type.","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"error_code":{"description":"Machine-readable error code identifying this problem type.","type":"string","const":"mno_not_supported"}}},"NotMobileIp":{"description":"The IP address used to drive the verification redirect is not from a mobile cellular\nnetwork and cannot be routed to a mobile network operator.\n","type":"object","unevaluatedProperties":false,"required":["type","title","status","detail","error_code"],"properties":{"type":{"description":"A URI reference [RFC 3986] that identifies the problem type.","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"error_code":{"description":"Machine-readable error code identifying this problem type.","type":"string","const":"not_mobile_ip"}}},"RateLimitReached":{"description":"The API rate limit for the workspace has been exceeded. The `Retry-After` header carries\nthe number of seconds after which the caller can retry.\n","type":"object","unevaluatedProperties":false,"required":["type","title","status","detail","error_code"],"properties":{"type":{"description":"A URI reference [RFC 3986] that identifies the problem type.","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"error_code":{"description":"Machine-readable error code identifying the problem type.","type":"string"}}}},"parameters":{"digest":{"name":"digest","in":"header","description":"The body contents hashed with the algorithm identified in the `Authorization` header\nand then Base64 encoded (e.g. `SHA-256=base64(SHA256(body))`).\n","schema":{"type":"string"}},"date":{"name":"date","in":"header","description":"The date and time at which the message was originated.","schema":{"type":"string"}},"host":{"name":"host","in":"header","description":"The host and port number of the server to which the request is being sent.","schema":{"type":"string"}}},"headers":{"X-RateLimit-Limit":{"description":"Request limit per second.","schema":{"type":"integer"},"required":true},"X-RateLimit-Remaining":{"description":"Remaining requests for the rate limit period.","schema":{"type":"integer"},"required":true},"X-RateLimit-Reset":{"description":"Time left, in seconds, for `X-RateLimit-Remaining` to be reset.","schema":{"type":"integer"},"required":true}}},"paths":{"/v1/number-verification/discovery-checks":{"post":{"summary":"Create a Check","description":"Starts a Discovery flow. The response is always an `ACCEPTED` Check carrying the `url` for\nthe device to perform the verification. No phone number is supplied on create — the number is\ndiscovered from the device's network session.\n","operationId":"create-discovery-check-v1","tags":["discovery_check_v1"],"requestBody":{"description":"JSON payload to create a Check. All fields are optional.","required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryCheckCreatePayload"}}}},"callbacks":{"discoveryCheckEndStatus":{"{$request.body#/callback_url}":{"post":{"summary":"Check has reached a terminal status","description":"Sent once when the Check transitions to a terminal status (`COMPLETED`,\n`EXPIRED`, or `ERROR`).\n","parameters":[{"name":"x-idlayr-callback","in":"header","description":"Identifies the webhook source. Value is `discovery`.","required":true,"schema":{"description":"Constant identifier for the Discovery webhook source.","type":"string","const":"discovery"}},{"name":"Authorization","in":"header","description":"HTTP message signature. Format:\n`Signature keyId=\"<key_id>\",algorithm=\"rsa-sha256\",headers=\"(request-target) host date x-idlayr-callback digest\",signature=\"<base64>\"`.\n\n- `keyId` identifies the public key (fetch from the IDlayr JWKS endpoint).\n- `algorithm` is `rsa-sha256`.\n- `headers` lists the canonical components included in the signature\n  input: `(request-target)`, `host`, `date`, `x-idlayr-callback`,\n  `digest`.\n- `signature` is the base64-encoded RSA-SHA256 signature.\n\nSee [Signed HTTP Messages](/docs/authentication#signed).\n","required":true,"schema":{"description":"HTTP message signature for the callback.","type":"string"}},{"$ref":"#/components/parameters/digest"},{"$ref":"#/components/parameters/date"},{"$ref":"#/components/parameters/host"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryCheckCallbackBody"}}}},"responses":{"200":{"description":"The receiving server should return a 200 response to indicate it has\nprocessed the callback. Upon receipt of a non-200 response a retry process\nwill begin (1 immediate attempt + up to 6 retries at 10/20/30/40/50/60s\ngaps, ~3.5 min total).\n"}}}}}},"responses":{"201":{"description":"Check created. Always returned in the `ACCEPTED` state.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryCheck"}}}},"400":{"description":"Mobile Network Operator Not Supported","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/MobileNetworkOperatorNotSupported"}}}},"412":{"description":"Not a mobile IP","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotMobileIp"}}}},"429":{"description":"Rate Limit Reached","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RateLimitReached"}}}}}}}}}
```

## Get a Check

> Get the Check identified by \`check\_id\`.

```json
{"openapi":"3.1.0","info":{"title":"IDlayr Discovery API","version":"1.0.0"},"tags":[{"name":"discovery_check_v1","description":"Mobile number discovery. Create a Check, drive the device through the verification URL, then\nsubmit the resulting code to resolve the discovered phone number and network.\n"}],"servers":[{"url":"https://{data_residency}.api.idlayr.com","description":"For accounts with data residency in the EU or US.","variables":{"data_residency":{"default":"eu","enum":["eu","us"]}}}],"security":[{"ProjectBearerAuth":[]}],"components":{"securitySchemes":{"ProjectBearerAuth":{"description":"The IDlayr APIs expect the bearer token to be an [OAuth2 Access Token](https://tools.ietf.org/html/rfc6749#section-1.4).\nThe access token should be in the `Authorization` HTTP header,\ne.g. `Authorization: Bearer {access_token}`. See [Create an Access Token](/docs/reference/basics#operation/oauth2-token).\n\nThe token should be associated with an **IDlayr** Project. These are created using a Project's `client_id` and `client_secret`.\n","type":"http","scheme":"bearer"}},"headers":{"X-RateLimit-Limit":{"description":"Request limit per second.","schema":{"type":"integer"},"required":true},"X-RateLimit-Remaining":{"description":"Remaining requests for the rate limit period.","schema":{"type":"integer"},"required":true},"X-RateLimit-Reset":{"description":"Time left, in seconds, for `X-RateLimit-Remaining` to be reset.","schema":{"type":"integer"},"required":true}},"schemas":{"DiscoveryCheck":{"description":"A Check resource in any of its states, selected by `status`: `ACCEPTED`/`PENDING` carry\n`ttl`; `COMPLETED` carries `network_id`; `ERROR`/`EXPIRED` carry `error_code`. The\ndiscovered `phone_number` is delivered only on the code-submission response, not on reads.\n","type":"object","unevaluatedProperties":false,"required":["check_id","status","created_at"],"properties":{"check_id":{"description":"The unique ID of the Check resource.","$ref":"#/components/schemas/UUID"},"check_url":{"description":"Self-link URL for this Check resource. Present on the create response so the client\ncan drive the verification flow without composing the path itself.\n","type":"string","format":"uri"},"status":{"description":"The current state of the Check.","type":"string","enum":["ACCEPTED","PENDING","COMPLETED","ERROR","EXPIRED"]},"ttl":{"description":"Time-to-live, in seconds, before the Check transitions to `EXPIRED`.","type":"integer"},"network_id":{"description":"Network identifier resolved during the discovery.","$ref":"#/components/schemas/NetworkIDResponse"},"error_code":{"description":"Failure/expiry reason. `ERROR`: `not_mobile_ip`, `mno_not_supported`, `mno_timeout`,\n`mno_redirect_unsupported`. `EXPIRED`: `redirect_not_performed`, `incomplete_redirect`.\n","type":"string"},"created_at":{"description":"When the Check was created.","$ref":"#/components/schemas/ISODateTime"},"updated_at":{"description":"When the Check was last updated.","$ref":"#/components/schemas/ISODateTime"},"reference_id":{"description":"Caller-supplied reference, echoed from the create request.","type":"string"}},"allOf":[{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"ACCEPTED"}}},"then":{"required":["ttl"],"not":{"anyOf":[{"required":["network_id"]},{"required":["error_code"]}]}}},{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"PENDING"}}},"then":{"required":["ttl"],"not":{"anyOf":[{"required":["network_id"]},{"required":["error_code"]}]}}},{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"COMPLETED"}}},"then":{"required":["network_id"],"not":{"anyOf":[{"required":["ttl"]},{"required":["error_code"]}]}}},{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"ERROR"}}},"then":{"required":["error_code"],"not":{"anyOf":[{"required":["ttl"]},{"required":["network_id"]}]}}},{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"EXPIRED"}}},"then":{"required":["error_code"],"not":{"anyOf":[{"required":["ttl"]},{"required":["network_id"]}]}}}]},"UUID":{"description":"A Universally Unique IDentifier.","type":"string","format":"uuid","pattern":"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"},"NetworkIDResponse":{"description":"The ID of the Network resolved during the verification flow.","type":"string"},"ISODateTime":{"description":"A DateTime conforming to ISO 8601 specifications.","type":"string","format":"date-time"},"CheckNotFound":{"description":"The Check identified by `check_id` does not exist or is no longer retrievable.","type":"object","unevaluatedProperties":false,"required":["type","title","status","detail","error_code"],"properties":{"type":{"description":"A URI reference [RFC 3986] that identifies the problem type.","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"error_code":{"description":"Machine-readable error code identifying the problem type.","type":"string"}}},"RateLimitReached":{"description":"The API rate limit for the workspace has been exceeded. The `Retry-After` header carries\nthe number of seconds after which the caller can retry.\n","type":"object","unevaluatedProperties":false,"required":["type","title","status","detail","error_code"],"properties":{"type":{"description":"A URI reference [RFC 3986] that identifies the problem type.","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"error_code":{"description":"Machine-readable error code identifying the problem type.","type":"string"}}}}},"paths":{"/v1/number-verification/discovery-checks/{check_id}":{"get":{"summary":"Get a Check","description":"Get the Check identified by `check_id`.","operationId":"get-discovery-check-v1","tags":["discovery_check_v1"],"responses":{"200":{"description":"The Check, in whichever state it currently holds.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryCheck"}}}},"404":{"description":"Check Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/CheckNotFound"}}}},"429":{"description":"Rate Limit Reached","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RateLimitReached"}}}}}}}}}
```

## Submit the verification code

> Completes the Check identified by \`check\_id\` by submitting the \`code\` returned at the end of\
> the redirect chain. Until the code is submitted the Check stays \`PENDING\` and is eligible to\
> transition to \`EXPIRED\` after its TTL. On success the response carries a terminal Check —\
> either \`COMPLETED\` (with the discovered \`phone\_number\` and \`network\_id\`) or \`ERROR\`.<br>

```json
{"openapi":"3.1.0","info":{"title":"IDlayr Discovery API","version":"1.0.0"},"tags":[{"name":"discovery_check_v1","description":"Mobile number discovery. Create a Check, drive the device through the verification URL, then\nsubmit the resulting code to resolve the discovered phone number and network.\n"}],"servers":[{"url":"https://{data_residency}.api.idlayr.com","description":"For accounts with data residency in the EU or US.","variables":{"data_residency":{"default":"eu","enum":["eu","us"]}}}],"security":[{"ProjectBearerAuth":[]}],"components":{"securitySchemes":{"ProjectBearerAuth":{"description":"The IDlayr APIs expect the bearer token to be an [OAuth2 Access Token](https://tools.ietf.org/html/rfc6749#section-1.4).\nThe access token should be in the `Authorization` HTTP header,\ne.g. `Authorization: Bearer {access_token}`. See [Create an Access Token](/docs/reference/basics#operation/oauth2-token).\n\nThe token should be associated with an **IDlayr** Project. These are created using a Project's `client_id` and `client_secret`.\n","type":"http","scheme":"bearer"}},"schemas":{"DiscoveryCheckCodeSubmission":{"description":"Body used to submit the verification `code` returned at the end of the redirect chain, completing the Check.","type":"object","unevaluatedProperties":false,"required":["code"],"properties":{"code":{"description":"The verification code returned at the end of the redirect chain.","type":"string"}}},"DiscoveryCheckCodeResult":{"description":"Terminal Check returned on successful code submission. `COMPLETED` carries the discovered\n`phone_number` and `network_id`; `ERROR` carries `error_code`.\n","type":"object","unevaluatedProperties":false,"required":["check_id","status","created_at"],"properties":{"check_id":{"description":"The unique ID of the Check resource.","$ref":"#/components/schemas/UUID"},"check_url":{"description":"Self-link URL for this Check resource. Present on the create response so the client\ncan drive the verification flow without composing the path itself.\n","type":"string","format":"uri"},"status":{"description":"The current state of the Check.","type":"string","enum":["COMPLETED","ERROR"]},"phone_number":{"description":"The phone number discovered from the device's network session, in\n[E.164 format](https://www.itu.int/rec/T-REC-E.164-201011-I/en) (leading `+`).\n","type":"string","format":"E.164"},"network_id":{"description":"Network identifier resolved during the discovery.","$ref":"#/components/schemas/NetworkIDResponse"},"error_code":{"description":"Failure reason when `ERROR`: `not_mobile_ip`, `mno_not_supported`, `mno_timeout`,\n`mno_redirect_unsupported`.\n","type":"string"},"created_at":{"description":"When the Check was created.","$ref":"#/components/schemas/ISODateTime"},"updated_at":{"description":"When the Check was last updated.","$ref":"#/components/schemas/ISODateTime"},"reference_id":{"description":"Caller-supplied reference, echoed from the create request.","type":"string"}},"allOf":[{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"COMPLETED"}}},"then":{"required":["phone_number","network_id"],"not":{"anyOf":[{"required":["error_code"]}]}}},{"if":{"required":["status"],"properties":{"status":{"description":"Discriminator for the conditional state shape.","const":"ERROR"}}},"then":{"required":["error_code"],"not":{"anyOf":[{"required":["phone_number"]},{"required":["network_id"]}]}}}]},"UUID":{"description":"A Universally Unique IDentifier.","type":"string","format":"uuid","pattern":"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"},"NetworkIDResponse":{"description":"The ID of the Network resolved during the verification flow.","type":"string"},"ISODateTime":{"description":"A DateTime conforming to ISO 8601 specifications.","type":"string","format":"date-time"},"DiscoveryCheckCompletionBadRequest":{"description":"The submitted `code` is invalid for this Check (does not match the value issued at the\nend of the redirect chain, or the Check is no longer accepting submissions).\n","type":"object","unevaluatedProperties":false,"required":["type","title","status","detail","error_code"],"properties":{"type":{"description":"A URI reference [RFC 3986] that identifies the problem type.","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"error_code":{"description":"Machine-readable error code identifying this problem type.","type":"string","const":"bad_request"}}},"CheckNotFound":{"description":"The Check identified by `check_id` does not exist or is no longer retrievable.","type":"object","unevaluatedProperties":false,"required":["type","title","status","detail","error_code"],"properties":{"type":{"description":"A URI reference [RFC 3986] that identifies the problem type.","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"error_code":{"description":"Machine-readable error code identifying the problem type.","type":"string"}}},"DiscoveryCheckCompletionConflict":{"description":"The Check is not in a state that allows completion. Most commonly the device has not yet\nperformed the redirect; complete the verification flow before submitting the code.\n","type":"object","unevaluatedProperties":false,"required":["type","title","status","detail","error_code"],"properties":{"type":{"description":"A URI reference [RFC 3986] that identifies the problem type.","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"error_code":{"description":"Machine-readable error code identifying this problem type.","type":"string","const":"code_not_ready"}}},"RateLimitReached":{"description":"The API rate limit for the workspace has been exceeded. The `Retry-After` header carries\nthe number of seconds after which the caller can retry.\n","type":"object","unevaluatedProperties":false,"required":["type","title","status","detail","error_code"],"properties":{"type":{"description":"A URI reference [RFC 3986] that identifies the problem type.","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"error_code":{"description":"Machine-readable error code identifying the problem type.","type":"string"}}}},"headers":{"X-RateLimit-Limit":{"description":"Request limit per second.","schema":{"type":"integer"},"required":true},"X-RateLimit-Remaining":{"description":"Remaining requests for the rate limit period.","schema":{"type":"integer"},"required":true},"X-RateLimit-Reset":{"description":"Time left, in seconds, for `X-RateLimit-Remaining` to be reset.","schema":{"type":"integer"},"required":true}}},"paths":{"/v1/number-verification/discovery-checks/{check_id}/code":{"post":{"summary":"Submit the verification code","description":"Completes the Check identified by `check_id` by submitting the `code` returned at the end of\nthe redirect chain. Until the code is submitted the Check stays `PENDING` and is eligible to\ntransition to `EXPIRED` after its TTL. On success the response carries a terminal Check —\neither `COMPLETED` (with the discovered `phone_number` and `network_id`) or `ERROR`.\n","operationId":"submit-discovery-check-code-v1","tags":["discovery_check_v1"],"requestBody":{"description":"Body carrying the verification code returned at the end of the redirect chain.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryCheckCodeSubmission"}}}},"responses":{"200":{"description":"Check completed; response carries the terminal state (`COMPLETED` or `ERROR`).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryCheckCodeResult"}}}},"400":{"description":"Invalid Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/DiscoveryCheckCompletionBadRequest"}}}},"404":{"description":"Check Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/CheckNotFound"}}}},"409":{"description":"The Check is not in a state that allows code submission (e.g. the device has not yet\nperformed the redirect).\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/DiscoveryCheckCompletionConflict"}}}},"429":{"description":"Rate Limit Reached","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RateLimitReached"}}}}}}}}}
```

## Perform the verification step

> Performs the verification step for the Check identified by \`check\_id\`. The device must drive\
> this request over a cellular data connection so the network operator can attribute the\
> session to a phone number. Returns a 302 redirect; the result/error travels in the\
> \`Location\` query string when the customer supplied a \`redirect\_url\`.<br>

```json
{"openapi":"3.1.0","info":{"title":"IDlayr Discovery API","version":"1.0.0"},"tags":[{"name":"discovery_check_v1","description":"Mobile number discovery. Create a Check, drive the device through the verification URL, then\nsubmit the resulting code to resolve the discovered phone number and network.\n"}],"servers":[{"url":"https://{data_residency}.api.idlayr.com","description":"For accounts with data residency in the EU or US.","variables":{"data_residency":{"default":"eu","enum":["eu","us"]}}}],"paths":{"/v1/number-verification/discovery-checks/{check_id}/redirect":{"get":{"summary":"Perform the verification step","description":"Performs the verification step for the Check identified by `check_id`. The device must drive\nthis request over a cellular data connection so the network operator can attribute the\nsession to a phone number. Returns a 302 redirect; the result/error travels in the\n`Location` query string when the customer supplied a `redirect_url`.\n","operationId":"get-discovery-check-redirect-v1","tags":["discovery_check_v1"],"responses":{"302":{"description":"Redirects to the customer-supplied `redirect_url`; error info travels in the `Location` query string when applicable.","headers":{"Location":{"$ref":"#/components/headers/Location"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"404":{"description":"Check Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/CheckNotFound"}}}},"429":{"description":"Rate Limit Reached","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RateLimitReached"}}}}}}}},"components":{"headers":{"Location":{"description":"Used in 3xx redirect responses to point at the next URL.","schema":{"type":"string","format":"uri"}},"X-RateLimit-Limit":{"description":"Request limit per second.","schema":{"type":"integer"},"required":true},"X-RateLimit-Remaining":{"description":"Remaining requests for the rate limit period.","schema":{"type":"integer"},"required":true},"X-RateLimit-Reset":{"description":"Time left, in seconds, for `X-RateLimit-Remaining` to be reset.","schema":{"type":"integer"},"required":true}},"schemas":{"CheckNotFound":{"description":"The Check identified by `check_id` does not exist or is no longer retrievable.","type":"object","unevaluatedProperties":false,"required":["type","title","status","detail","error_code"],"properties":{"type":{"description":"A URI reference [RFC 3986] that identifies the problem type.","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"error_code":{"description":"Machine-readable error code identifying the problem type.","type":"string"}}},"RateLimitReached":{"description":"The API rate limit for the workspace has been exceeded. The `Retry-After` header carries\nthe number of seconds after which the caller can retry.\n","type":"object","unevaluatedProperties":false,"required":["type","title","status","detail","error_code"],"properties":{"type":{"description":"A URI reference [RFC 3986] that identifies the problem type.","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"error_code":{"description":"Machine-readable error code identifying the problem type.","type":"string"}}}}}}
```


---

# 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/api-reference/discovery-check/v1.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.
