---
title: "[USES 11 UNITS PER NAME] Infer the likely country and phone prefix, of up to 100 personal names, detecting automatically the local context given a name and formatted / unformatted phone number."
method: POST
path: "/api2/json/phoneCodeBatch"
tags: ["social"]
---

# [USES 11 UNITS PER NAME] Infer the likely country and phone prefix, of up to 100 personal names, detecting automatically the local context given a name and formatted / unformatted phone number.

`POST /api2/json/phoneCodeBatch`

## Request body

- BatchFirstLastNamePhoneNumberIn
  - `personalNamesWithPhoneNumbers` FirstLastNamePhoneNumberIn[]
    - `id` string
    - `firstName` string
    - `lastName` string
    - `phoneNumber` string

## Response `200`

A list of genderized names.

- BatchFirstLastNamePhoneCodedOut — Represents the output of inferring the LIKELY country and phone code of personal names+phones.
  - `personalNamesWithPhoneNumbers` FirstLastNamePhoneCodedOut[] — Classified phone-coded names
    - `script` string
    - `id` string
    - `explanation` string
    - `firstName` string — The first name (also known as given name)
    - `lastName` string — The last name (also known as family name, or surname)
    - `internationalPhoneNumberVerified` string — The normalized phone number, verified using libphonenumber.
    - `phoneCountryIso2Verified` string — The phone ISO2 country code, verified using libphonenumber.
    - `phoneCountryCode` integer — The phone country code of the phone number, verified using libphonenumber.
    - `phoneCountryCodeAlt` integer — The best alternative phone country code of the phone number.
    - `phoneCountryIso2` string — The likely country of the phone number.
    - `phoneCountryIso2Alt` string — The best alternative country of the phone number.
    - `originCountryIso2` string — The likely country of origin of the name.
    - `originCountryIso2Alt` string — The best alternative country of origin of the name.
    - `phoneNumber` string — The input phone number.
    - `verified` boolean — Indicates if the phone number could be positively verified using libphonenumber.
    - `score` number, double — Higher score is better, but score is not normalized. Use calibratedProbability if available.
    - `countryIso2` string

## Other responses

- `400` — Bad request (ex. too many names)
- `401` — Missing or incorrect API Key
- `403` — Email not Verified, or API Limit Reached, or API Key Disabled
- `429` — Too Many Requests

---

[API](https://skmtc.net/namsor/apis/namsor-api-v2.md) · [All operations](https://skmtc.net/namsor/apis/namsor-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/namsor/namsor-api-v2/revisions/305e4f6eeaf5/schema)
