---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/13226#article
headline: "13226: Dial: Invalid country code"
url: https://www.twilio.com/docs/api/errors/13226
inLanguage: en
dateModified: 2026-06-08T11:38:30.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 13226: Dial: Invalid country code

Log Level: WARNING

## Description

You receive this warning when the phone number passed to `<Dial>` uses a country code that Twilio cannot identify. Destination numbers in `<Dial><Number>` should be valid phone numbers in E.164 format with a `+` and country code.

### Possible causes

* The value inside `<Dial><Number>` is not in E.164 format and does not include a recognizable country code.
* The number starts with an invalid country code, or it begins with `0`, which is not a valid first digit for an E.164 country code.
* An international destination was entered in local or national format instead of `+` followed by the country code and subscriber number. ([help.twilio.com](https://help.twilio.com/articles/223179888-How-do-I-dial-international-numbers-with-Twilio))

### Possible solutions

* Format the destination number in E.164 before you return `<Dial>` TwiML. Include `+`, a valid country code, the area code or national destination code, and the subscriber number. Keep the total length to 15 digits or fewer.
* If you are converting a local number to E.164, remove any national trunk prefix such as a leading `0` before adding the country code when required for that country. ([help.twilio.com](https://help.twilio.com/articles/223179888-How-do-I-dial-international-numbers-with-Twilio))
* Validate and normalize phone numbers with Twilio Lookup before you place the call or generate `<Dial><Number>`. Lookup can validate formatting and return invalid country code errors during validation.
* If you are not dialing a PSTN phone number, use the correct `<Dial>` noun. Use `<Client>` for a Voice SDK identity or `<Sip>` for a SIP endpoint instead of `<Number>`.

#### Additional resources

* [TwiML Voice: `<Number>`](/docs/voice/twiml/number)
* [What is E.164?](/docs/glossary/what-e164)
* [Lookup v2 API](/docs/lookup/v2-api)
