---
title: "Validate and format a phone number"
method: POST
path: "/validate-phone"
tags: ["Validation"]
---

# Validate and format a phone number

`POST /validate-phone`

## Request

- Base URL: `https://api.cofferdock.com`
- URL: `https://api.cofferdock.com/validate-phone`
- Auth: API key in header `x-api-key`

Validates an international phone number and returns it in E.164 and international formats, with its country and type (mobile, fixed line...). Give `country` (2-letter code) for numbers without the + prefix.

Costs 1 credit per call.

## Request body

- object
  - `phone` string, required: The phone number to validate. Use the international format with the country code, e.g. "+34600000000".
  - `country` string: ISO 3166-1 alpha-2, e.g. "ES", "GB".

## Response `200`

Result.

- object
  - `success` boolean
  - `valid` boolean
  - `country` string, nullable
  - `type` string, nullable
  - `formatted_e164` string, nullable
  - `formatted_international` string, nullable
  - `meta` object
    - `used` integer: Credits used this month, after this call.
    - `remaining` integer, nullable: Credits left this month (null = unlimited).
    - `unlimited` boolean

## Other responses

- `400`: Invalid input (nothing is charged).
- `401`: Missing or invalid API key.
- `403`: Email not verified.
- `429`: Monthly credit limit reached, or too many requests per minute for this key (see Retry-After).
- `503`: Server busy (queue full). Retry after the seconds in the Retry-After header.

---

[API](https://skmtc.dev/cofferdock/apis/cofferdock-api.md) · [All operations](https://skmtc.dev/cofferdock/apis/cofferdock-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cofferdock/apis/cofferdock-api/revisions/b57aa000d33a?raw)
