ZAPINNER
API RecipesBy Zapinner1 min read

Normalize a Phone Number

Turn a phone number in any local format into a consistent E.164 string with one API call.

Problem

Phone numbers arrive as "(704) 555-1234", "704.555.1234", or "+1 704 555 1234". You want one canonical E.164 string so lookups, dialing, and dedupe all work.

Request

bash
curl -X POST https://zapinner.com/api/v1/normalize \
  -H "Authorization: Bearer $ZAPINNER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "records": [{ "phone": "(704) 555-1234" }],
    "types": { "phone": "phone" }
  }'

Output

json
{ "data": [{ "phone": "+17045551234" }] }

Explanation

Declaring the field type as phone tells Normalize to parse and format to E.164 deterministically — the same input always yields the same output, so results are safe to cache and compare.

Error handling

An unparseable value is surfaced rather than silently corrupted. Handle the structured error (error.code, error.message, request_id) and route unfixable records to review.

Production considerations

  • Numbers without a country code may be ambiguous — normalize as close to capture as possible, where you know the region.
  • Normalize before matching or dedupe so comparisons are apples-to-apples.

Related APIs

Repair (runs normalize internally), Dedupe (compare normalized numbers).

Fix messy data before it breaks your workflow.

Start free with 1,000 credits a month across every capability — no credit card required.