apyhub
Back
▣ DATA VALIDATION · DEVELOPER TOOLS

Detect Phones Numbers API

What it does

Phone Number Detector finds phone numbers in text and returns the detected results asynchronously. Send a content string, get back a job_id, then poll the job status endpoint until the job completes.

Use it when you need to scan user-generated text, notes, tickets, chat logs, or imported documents for phone numbers without building your own parsing logic. The submitted content is the only input for the detection job, so it fits cleanly into automated validation or enrichment workflows.

When the job finishes, the status response includes a data object with attributes.status and attributes.result. Each result item contains parsed_number and detected_number, letting you compare the normalized number with the original value that was found in the text.

Phone Number Detector is a good fit for contact cleanup, lead processing, compliance checks, and any workflow where phone numbers need to be identified from free-form text before further processing.

▣ ENDPOINT 01 / 02
POST
Submit Detect Phone Numbers job
https://api.eu.apyhub.com/sharpapi/detect-phone-numbers

QUICKSTART

GUIDE

Quickstart

Submit text containing phone numbers to start an asynchronous detection job.

curl -X POST "https://api.eu.apyhub.com/sharpapi/detect-phone-numbers" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"Call me at +1 415 555 0134 or +44 20 7946 0958."}'

What you'll get back

Returns a JSON object with a job_id string — the UUID of the submitted job. Poll the job status endpoint with this id to retrieve the result.

{
  "job_id": "7cc14d8f-f0c6-4104-98c1-1f521a5f3438"
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Provide the content from where mobile number needs to be detected.

About this endpoint

What it does

Submits an asynchronous job to detect phone numbers from the provided content. The response returns the job identifier.

Request Body

ParameterTypeDescription
contentStringProvide the content from where mobile number needs to be detected.

Response

Returns a JSON object with a job_id string — the UUID of the submitted job. Poll the job status endpoint with this id to retrieve the result.

ParameterTypeDescription
job_idStringIdentifier of the submitted asynchronous job. Format: UUID.

Notes

This endpoint kicks off an async job and returns immediately with a job identifier; the actual work runs in the background. Pair this call with the corresponding job_check endpoint — poll that until the status reaches a terminal state to retrieve the result. Extract the job identifier from job_id.

▣ ENDPOINT 02 / 02
GET
Get Detect Phone Numbers job status
https://api.eu.apyhub.com/sharpapi/detect-phone-numbers/job/status/:job_id

QUICKSTART

GUIDE

Quickstart

Check the status of a phone-number detection job by its job ID.

curl -X GET "https://api.eu.apyhub.com/sharpapi/detect-phone-numbers/job/status/:job_id" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data object. Inside data, id and type are strings, and attributes is an object containing type (string), status (string), and result (an array of objects with parsed_number and detected_number strings).

{
  "data": {
    "id": "job_123",
    "type": "job",
    "attributes": {
      "type": "phone-number-detection",
      "status": "completed",
      "result": [
        {
          "parsed_number": "+14155552671",
          "detected_number": "+14155552671"
        }
      ]
    }
  }
}
TRY ITLIVE · 1 ATOM
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns the current status of a Detect Phone Numbers job identified by job_id. The response includes a data object with the job identifier, job type, and an attributes object that contains the job status and any parsed phone-number results when available.

Path Parameter(s)

AttributeTypeDescription
job_idStringJob identifier, UUID format.

Response

Returns a JSON object with a data object. data contains the job id and type fields, plus an attributes object with its own type, status, and result fields.

AttributeTypeDescription
dataObjectJob payload wrapper. Contains id, type, and attributes.
data.idStringJob identifier.
data.typeStringJob type.
data.attributesObjectJob attributes wrapper. Contains type, status, and result.
data.attributes.typeStringAttribute type.
data.attributes.statusStringJob status.
data.attributes.resultObject ArrayArray of detected phone-number result objects. Each item contains parsed_number and detected_number.
data.attributes.result[].parsed_numberStringParsed phone number.
data.attributes.result[].detected_numberStringDetected phone number.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.