> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skyfree.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Invalid Country Code

> A message failed because the phone number has no valid country code.

## What is this?

WhatsApp needs the full international number — **country code first, then the number**. If the number has no valid country code, the platform **refuses to send** and never reaches WhatsApp. The message is saved as **Failed** with this reason:

> This phone number has no valid country code, so the message was not sent. Fix the number (country code first, no +, 00 or 0 before it) and send again.

The platform never guesses a country code for you, because a wrong guess would message the wrong person.

## What can I do here?

* Recognize the error wherever it appears — inbox, campaigns, API and webhooks
* Fix one number or many at once
* Prevent it at the source

## How to use it

### What a correct number looks like

Digits only: **country code, then the number**. Examples: `919876543210` (India — `91` + 10 digits), `971501234567` (UAE), `14155550123` (USA). A leading `+`, `00` or `0` is removed automatically, but a missing country code can't be added for you.

| Looks like | Problem |
| - | - |
| `9876543210` | No country code (a local 10-digit number) |
| `09876543210` | Starts with `0` — a local format, no country code |
| `+91 98765 43210` | Fine — the `+` and spaces are not the problem; the digits include `91` |

### Where you'll see it

| Where | What you see | Fix |
| - | - | - |
| **Inbox** | The message shows a red **Failed** mark; click it for the **Reason** above. The contact has the label **Invalid Country Code** | Edit the contact's phone (it's editable while it carries that label), or use **Fix Invalid Phone Numbers** |
| **Campaigns** | Those recipients show as failed with the same reason | Fix the numbers in **Contacts**, then send to them again |
| **Workspace API** | The request answers **`422`** with `"error": "INVALID_COUNTRY_CODE"` and the message above | Send `to` as digits with the country code, for example `"to": "919876543210"` |
| **Webhooks and integrations** (a form, store or CRM calling your automation) | The contact is created with the label **Invalid Country Code**, and the WhatsApp step fails | Make the sender pass the number **with** its country code — in the source form, store or CRM, or map the field correctly |
| **Contact import** | The row is rejected | Add the country code in your file |

Example API failure:

```json theme={null}
{
  "success": false,
  "error": "INVALID_COUNTRY_CODE",
  "message": "This phone number has no valid country code, so the message was not sent. Fix the number (country code first, no +, 00 or 0 before it) and send again."
}
```

### Fix one contact

1. Open the contact — in the Inbox contact panel or the [Contact Profile](https://docs.skyfree.io/workspace/contacts/contact-profile.md).
2. Edit the **phone** so it starts with the country code.
3. Save and send again. Once valid, the **Invalid Country Code** label is removed and the **Country Code** field is filled in.

### Fix many contacts at once

1. Go to **Contacts** and click **Fix Invalid Phone Numbers**.
2. Enter the **Country calling code to add** (digits only: `91` for India, `971` for the UAE).
3. Click **Fix numbers**. It strips any `+`, `00` or `0` at the start and puts your code in front, only on contacts marked **Invalid Country Code**. Numbers that are still invalid stay marked.
4. If some were **skipped because the fixed number already belongs to another contact**, click **Review and merge the skipped** to merge the duplicates.

See [Contacts](https://docs.skyfree.io/workspace/contacts/overview.md#phone-numbers-and-country-codes) for the full rules.

> [!WARNING]
>
> Only use **Fix Invalid Phone Numbers** when **all** the affected numbers belong to the same country. A local number can also be a valid number of another country (for example `9544102909` reads as a Myanmar number), and nothing can catch that for you.

## Troubleshooting / Technical Notes

* **The number looks right but still fails.** Check there are no letters or extra digits, and that the country code matches the country (an Indian number is `91` + exactly 10 digits).
* **Customers on Instagram, Facebook, Telegram or TikTok.** They have no phone number, so this error doesn't apply to them.
* **A WhatsApp username (BSUID) contact.** It has no phone and is messaged through its WhatsApp user ID — this error doesn't apply.
* **It keeps coming back from my form or store.** Fix it at the source so numbers are saved with the country code (many forms have a country-code phone field).
* **Incoming messages created a second contact.** A number stored without its country code can split into two contacts; fix and merge them.

## Related docs

* [Troubleshoot overview](https://docs.skyfree.io/troubleshoot/overview.md)
* [Contacts](https://docs.skyfree.io/workspace/contacts/overview.md)
* [API and webhook problems](https://docs.skyfree.io/troubleshoot/api-and-webhooks.md)
* [Webhooks](https://docs.skyfree.io/workspace/integrations/webhooks.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.