---
title: "Format Number"
method: POST
path: "/format-number.json"
tags: ["SMS"]
---

# Format Number

`POST /format-number.json`

In the majority of cases, mobile phone number data coming from external systems is not ideal for SMS delivery. For highest reliability and to be able to route correctly a mobile number should be formatted in international format E.164
Normally however a number is stored in a CRM or contact database in local format, with spaces, hyphens and other types of unwanted characters that can cause a delivery to fail. The format-number call is used to sanitise a number by combining the country and the number. eg.
> Australia 0438 333 061 will become 61438333061
> New Zealand 0212172782 will become 64212172782
> USA (281) 869-1226 will become 12818691226

## Response `200`

OK

- object
  - `number` object
    - `countrycode` integer — International dialling code for destination country
    - `nationalnumber` integer — Reformatted number without leading 0
    - `national_leading_zeroes` integer — Unused, currently returns as per national_number
    - `rawinput` string — Unused, always returns null
    - `international` integer — Reformatted number in international format
    - `type` integer — Returns numerical value depending on type of number. | VALUE | TYPE | |-------|----------------| | 0 | Landline | | 1 | Mobile Number | | 10 | Invalid number |
    - `isValid` boolean — Checks to see if number is valid. Returns true or false.
  - `error` object
    - `code` string
    - `description` string

---

[API](https://skmtc.net/kudosity/apis/transmit-sms-api.md) · [All operations](https://skmtc.net/kudosity/apis/transmit-sms-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kudosity/transmit-sms-api/versions/9f6c34b849af/schema)
