---
title: "Validate phone number"
method: GET
path: "/v1/validations/phone-numbers"
tags: ["validations"]
---

# Validate phone number

`GET /v1/validations/phone-numbers`

This endpoint validates a phone number. 
If optional 2-letter country code `country` is not specified, the `phoneNumber` should be formatted according to E164, which means it is expected to be in the international format with a leading `"+"` and no spaces or dashes, e.g. `+4930120765890`. Otherwise it may have leading zero instead of country code, e.g. `030120765890`.

The endpoint will return a status `HTTP 200` which means the `phoneNumber` is successfully validated.
The endpoint will return a status `HTTP 400` which means the `phoneNumber` is missing or invalid.

Example curl:
```
curl https://{host}/v{X}/validations/phone-numbers?phoneNumber=030120765890&country=IT
```

Example response:
```
{
  "errorMessage": "phoneNumber is invalid: 030120765890, country specified is: IT",
  "errorType": "PHONE_NUMBER_INVALID"
}
```

## Query parameters

- `phoneNumber` string, required
- `country` string

## Response `200`

Phone number validated successfully

## Other responses

- `400` — Bad request

---

[API](https://skmtc.net/quandoo/apis/quandooapidocumentation.md) · [All operations](https://skmtc.net/quandoo/apis/quandooapidocumentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/quandoo/quandooapidocumentation/revisions/6863a5956792/schema)
