# Validate and format a phone number

Get Mobile Phone Validate and format phone number data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Treg, pass parameters such as telephone_number, and retrieve structured data including returned credits spent field, returned error field, returned original network field, and returned request parameters field for application integration and result review, and integration reference.

Documentation: https://openany.si/mobile-phone/mobile-phone-validate-and-format-a-phone-number/93b165d0-f51e-4af3-a059-677a623f0d0c/
API ID: 93b165d0-f51e-4af3-a059-677a623f0d0c
Provider: treg
Contract revision: 4
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/treg/call/hlrlookup.people.phone.validate
Page update time: 2026-12-03T02:49:47.754Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: application/json
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
The published contract currently has no usage charge. Authentication and service limits still apply.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:49:46.532Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Mobile Phone Validate and format a phone number API

Retrieve validate and format a phone number with the Mobile phone API. Provide telephone\_number in body. Read the response using the field paths below, preserving identifiers and the declared value types when mapping results.

## What You Can Build

- **Application integration and result review**: Keep the request context attached to available returned results.
- **Integration reference**: Use the selected request format and keep source identifiers with the returned result.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `results[].credits_spent` | Returned credits spent field |
| `results[].detected_telephone_number` | Returned detected telephone number field |
| `results[].error` | Returned error field |
| `results[].formatted_telephone_number` | Returned formatted telephone number field |
| `results[].original_network` | Returned original network field |
| `results[].original_network_details` | Returned original network details field |
| `results[].request_parameters` | Returned request parameters field |
| `results[].telephone_number_type` | Returned telephone number type field |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Validate and format a phone number request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {}
    },
    "headers": {
      "type": "object",
      "properties": {}
    },
    "body": {
      "additionalProperties": false,
      "properties": {
        "input_format": {
          "description": "ISO3 country code when telephone_number is in national format, e.g. GBR.",
          "type": "string"
        },
        "output_format": {
          "description": "Format of formatted_telephone_number: E164, PLUS_E164, NATIONAL, or an ISO3 country code.",
          "type": "string"
        },
        "telephone_number": {
          "description": "International E.164 digits without the leading +, or a national number with input_format.",
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "telephone_number"
      ],
      "type": "object",
      "description": "Validates the number and returns number type, issuing network and formatted output without a live HLR lookup. Formatting and number-range information only; no live network reachability."
    }
  },
  "required": [
    "path",
    "query",
    "headers",
    "body"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "credits_spent": {
            "type": "integer"
          },
          "detected_telephone_number": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "formatted_telephone_number": {
            "type": "string"
          },
          "original_network": {
            "type": "string"
          },
          "original_network_details": {
            "type": "object",
            "properties": {
              "area": {
                "type": "string"
              },
              "country_iso3": {
                "type": "string"
              },
              "country_name": {
                "type": "string"
              },
              "country_prefix": {
                "type": "string"
              },
              "mccmnc": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "request_parameters": {
            "type": "object",
            "properties": {
              "input_format": {
                "type": "string"
              },
              "output_format": {
                "type": "string"
              },
              "telephone_number": {
                "type": "string"
              }
            }
          },
          "telephone_number_type": {
            "type": "string"
          },
          "timestamp": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Official example · TREG catalog reference (HTTP assumed)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/treg/call/hlrlookup.people.phone.validate' \
  -X POST \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "telephone_number": "447540822872"
}'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Configured HTTP 200; actual status is unverified.
```json
{
  "results": [
    {
      "credits_spent": 0,
      "detected_telephone_number": "447540822872",
      "error": "NONE",
      "formatted_telephone_number": "",
      "original_network": "AVAILABLE",
      "original_network_details": {
        "area": "United Kingdom",
        "country_iso3": "GBR",
        "country_name": "United Kingdom",
        "country_prefix": "44",
        "mccmnc": "23410",
        "name": "Telefonica UK Limited"
      },
      "request_parameters": {
        "input_format": "",
        "output_format": "",
        "telephone_number": "447540822872"
      },
      "telephone_number_type": "MOBILE",
      "timestamp": "2026-10-07T19:51:24Z",
      "uuid": "00000000-0000-4000-8000-000000000000"
    }
  ]
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Which inputs identify this request?
Provide telephone_number in body (string). Keep identifiers and URLs in the formats documented for this implementation.

### How should I structure the JSON body?
Send the body according to its root JSON schema. Do not add a second body wrapper around the documented properties, and preserve the declared types of nested values.

### How should I map the returned fields?
Use the documented response paths with their returned types. Keep null, empty collections, false and zero distinct, and retain the identifiers needed to match results to the request.

### Can I reuse request parameters from another endpoint?
Use the selected implementation schema. Similar operation names, providers or versions do not establish identical input locations, types or response fields.

### Which API key should I use?
Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

### Where can I check the current request price?
Check the pricing area for the selected API implementation. Follow its billing unit, quantity and any request-dependent rules before sending the request.

## Available implementations
- treg: https://openany.si/mobile-phone/mobile-phone-validate-and-format-a-phone-number/93b165d0-f51e-4af3-a059-677a623f0d0c/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
