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| Field | Type | Required | What it does |
|---|
phone | string | Required | The number, as digits or as an RFC 3966 tel: URI, so the uri from an earlier answer can be fed straight back in. |
|---|
default_country | string | Optional | ISO 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| Field | What it holds |
|---|
valid | Whether the number is valid for its country. |
|---|
possible | Whether the length is possible even when the number is not valid. |
|---|
reason | Why an invalid number was rejected. |
|---|
e164 | The E.164 form. Null for any number longer than the 15 digits E.164 allows. |
|---|
national | The national format, for valid numbers. |
|---|
international | The international format, for valid numbers. |
|---|
country | The country the number belongs to, for valid numbers. |
|---|
country_calling_code | The calling code. |
|---|
type | Mobile, landline, toll-free, premium rate, VoIP and so on, for valid numbers. |
|---|
extension | Any extension carried on the number. |
|---|
uri | The 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| Code | Status | Meaning |
|---|
phone_required | 400 | No phone was sent. |
|---|
invalid_phone | 400 | phone is not a string this parser reads. |
|---|
phone_too_long | 400 | phone is longer than the accepted length. |
|---|
invalid_default_country | 400 | default_country is not a supported region code. |
|---|
On every service
Scroll the table horizontally to see all fields.
Code / Status / Meaning| Code | Status | Meaning |
|---|
invalid_api_key | 401 | The authorization header is missing or the key is unknown. |
|---|
insufficient_credits | 402 | The balance is below this call's cost. The response carries credits_required and credits_remaining. |
|---|
rate_limit_exceeded | 429 | Free keys share 10 calls a minute across every service. The response carries limit and window_seconds. |
|---|
services_unavailable | 503 | The credit store could not be reached. Retry once after 30 seconds. |
|---|
4 worked examples
Examples
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