Attest tools · phone_parse

Phone number check

a task needs to know whether a phone number is valid for its country, what kind of number it is (mobile, landline, toll-free, premium rate, VoIP) and its E.164, national and international formats.

1 credit per successful callPOST /api/v1/phone/parse

Bearer key · JSON

POST /api/v1/phone/parse

curl -s -X POST https://getattest.com.au/api/v1/phone/parse \
  -H "authorization: Bearer $ATTEST_API_KEY" \
  -H "content-type: application/json" \
  -d '{"phone":"+61 7 3000 0000"}'

Send the key as a bearer token in the authorization header. One key and one credit balance cover every service, including Attest Capture. A failed call is refunded automatically. No key yet? POST /api/v1/keys issues one with 25 free credits and no signup — see the key guide.

Captured 2026-09-21

Example

This request was run against the running service on 2026-09-21 and the response below is what came back, unedited.

Request JSON

{
  "phone": "+61 7 3000 0000"
}

Captured response JSON

{
  "call_id": "eed12a60-8046-41d8-b814-50addb0e5fa9",
  "input_country": null,
  "valid": true,
  "possible": true,
  "reason": null,
  "e164": "+61730000000",
  "national": "(07) 3000 0000",
  "international": "+61 7 3000 0000",
  "country": "AU",
  "country_calling_code": "61",
  "type": "FIXED_LINE",
  "extension": null,
  "uri": "tel:+61730000000",
  "checked_at": "2026-09-20T16:55:57.220Z",
  "source": "libphonenumber-js (MIT) using phone numbering metadata from Google libphonenumber (Apache-2.0)",
  "note": "Checked offline against libphonenumber metadata; carrier and live-line status are not checked.",
  "credits_charged": 1,
  "credits_remaining": 9994
}

For agents

Use when

Use this when a task needs to know whether a phone number is valid for its country, what kind of number it is (mobile, landline, toll-free, premium rate, VoIP) and its E.164, national and international formats. Formats, country and type are only returned for valid numbers; an invalid number keeps its E.164 form only when its length is possible, and e164 is null for any number longer than the 15 digits E.164 allows. The phone input may be a plain number or an RFC 3966 tel: URI, so the uri from an earlier answer can be fed straight back in. Checked offline: no carrier or live-line lookup.

2 fields

Input

Scroll the table horizontally to see all fields.

Field / Type / Required / What it does
FieldTypeRequiredWhat it does
phonestringRequiredThe number, as digits or as an RFC 3966 tel: URI, so the uri from an earlier answer can be fed straight back in.
default_countrystringOptionalISO 3166-1 alpha-2 region code to read a national-format number against.

HTTP 200

Response

Every successful response also carries call_id (your receipt for the charge), credits_charged and credits_remaining.

Scroll the table horizontally to see all fields.

Field / What it holds
FieldWhat it holds
validWhether the number is valid for its country.
possibleWhether the length is possible even when the number is not valid.
reasonWhy an invalid number was rejected.
e164The E.164 form. Null for any number longer than the 15 digits E.164 allows.
nationalThe national format, for valid numbers.
internationalThe international format, for valid numbers.
countryThe country the number belongs to, for valid numbers.
country_calling_codeThe calling code.
typeMobile, landline, toll-free, premium rate, VoIP and so on, for valid numbers.
extensionAny extension carried on the number.
uriThe RFC 3966 tel: URI for the number.

Machine-readable failures

Errors

Errors return JSON such as {"error":"invalid_api_key"}. A failed call is refunded automatically.

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
phone_required400No phone was sent.
invalid_phone400phone is not a string this parser reads.
phone_too_long400phone is longer than the accepted length.
invalid_default_country400default_country is not a supported region code.

On every service

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
invalid_api_key401The authorization header is missing or the key is unknown.
insufficient_credits402The balance is below this call's cost. The response carries credits_required and credits_remaining.
rate_limit_exceeded429Free keys share 10 calls a minute across every service. The response carries limit and window_seconds.
services_unavailable503The credit store could not be reached. Retry once after 30 seconds.

Where the answer comes from

Source and scope

libphonenumber-js (MIT) using phone numbering metadata from Google libphonenumber (Apache-2.0). Checked offline: no carrier or live-line lookup.

Attest reports what it read, with the source it read it from. It is general information, not advice, and not a legal record.

All Attest tools · Service list as JSON · OpenAPI

Same key as every Attest tool

One key. One balance. 1 credit a call.

Issue a free key, then use it here, on Attest Capture and on every other tool in the box.

Get a free key