> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Error Messages

## Article: Error Messages

## Article Link: https://dev.wix.com/docs/api-reference/account-level/domains/connected-domains/error-messages.md

## Article Content:

# Connected Domains API: Errors

This article outlines error messages that might be issued when calling endpoints of the Connected Domains API.

## Create Connected Domain Errors

The [Create Connected Domain](https://dev.wix.com/docs/api-reference/account-level/domains/connected-domains/connected-domain-v1/create-connected-domain.md) endpoint might issue the following error messages:

| <div style="width:200px">HTTP status</div> | <div style="width:250px">Error code</div> | <div style="width:280px">Error message </div> | <div style="width:300px">Troubleshooting </div> |
| --------------------------- | ----------------------------------- | ------------------------------------------------------------ | ------------------------------ |
| `INVALID_ARGUMENT (400)` | `Invalid domain` | Unable to connect domain `<domainName>`, it's available for purchase. | You must purchase the domain before you can connect it to a Wix site. |
| `INVALID_ARGUMENT (400)` | `Invalid domain` | Domain `<domainName>` is Wix restricted. | Not all TLDs are supported for Wix sites. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for a list of supported TLDs and then try connecting a domain that's supported. |
| `INVALID_ARGUMENT (400)` | `Invalid connection type` | Invalid connection type `<connectionType>`. | Choose a connection type that's supported for the domain. To connect a root domain, you can only connect via `POINTING` or `NAMESERVERS`. For subdomains, you aren't allowed to pass any connection type. |
| `INVALID_ARGUMENT (400)` | `DOMAINS_GUID_NOT_VALID` | Wix site id and/or Wix account ID is invalid. | Check that the site and account ID are correct. |
| `ALREADY_EXISTS (409)` | `DOMAINS_ALREADY_EXISTS` | Domain `<domainName>` with different settings is already connected. | Make sure to connect the domain only once to the relevant account or site. |
| `ALREADY_EXISTS (409)` | `DOMAINS_ALREADY_EXISTS` | Domain `<domainName>` with different connection type is already connected. | Make sure to connect the domain only with the relevant connection type to the account or site. |
| `PERMISSION_DENIED (403)` | `DOMAINS_PERMISSION_DENIED` | Permission denied for account ID `<accountId>`. | Check that the account ID is correct and that you have permissions to access it. |
| `PERMISSION_DENIED (403)` | `DOMAINS_DOMAIN_NOT_PERMITTED` | Domain `<domain>` isn't permitted for the account. | Make sure that you have permissions to access the account. |
| `PERMISSION_DENIED (403)` | `INVALID_DOMAINS_PREVIEW_RECORDS` | Missing A, and/or CName, and/or NS preview records for domain `<domainName>`. | Make sure to pass the relevant DNS records. |
| `PERMISSION_DENIED (403)` | `DOMAINS_GUID_NOT_FOUND` | - | Make sure to pass a valid account ID. |
| `PERMISSION_DENIED (403)` | `NON_PREMIUM_SITE` | Domain `<domain>` can't be assigned to free Wix site `<siteId>`. | Make sure to [assign a Premium Plan](https://dev.wix.com/docs/rest/account-level/resellers/packages-and-product-instances/create-package-v2.md) to the site before connecting the domain. |


## Get Connected Domain Errors

The [Get Connected Domain](https://dev.wix.com/docs/api-reference/account-level/domains/connected-domains/connected-domain-v1/get-connected-domain.md) endpoint might issue the following error messages:

| <div style="width:200px">HTTP status</div> | <div style="width:250px">Error code</div> | <div style="width:280px">Error message </div> | <div style="width:300px">Troubleshooting </div> |
| --------------------------- | ----------------------------------- | ------------------------------------------------------------ | ------------------------------ |
| `INVALID_ARGUMENT (400)` | `DOMAINS_GUID_NOT_VALID` | Wix site and/or account ID are invalid. | Check that the site and account ID are correct. |
| `NOT_FOUND (404)` | `NOT_FOUND` | Domain name `<domainName>` wasn't found. | Make sure to pass the correct domain name. |
| `PERMISSION_DENIED (403)` | `DOMAINS_PERMISSION_DENIED` | Permission denied for account ID `<accountId>`. | Check that the account ID is correct and that you have permissions to access it. |
| `PERMISSION_DENIED (403)` | `DOMAINS_DOMAIN_NOT_PERMITTED` | Domain `<domain>` isn't permitted for the account. | Make sure that you have permissions to access the account. |
| `PERMISSION_DENIED (403)` | `DOMAINS_GUID_NOT_FOUND` | - | Make sure to pass a valid account ID. |

## Get Connected Domain Setup Info Errors

The [Get Connected Domain Setup Info](https://dev.wix.com/docs/api-reference/account-level/domains/connected-domains/connected-domain-setup-info-v1/get-connected-domain-setup-info.md) endpoint might issue the following error messages:

| <div style="width:200px">HTTP status</div> | <div style="width:250px">Error code</div> | <div style="width:280px">Error message </div> | <div style="width:300px">Troubleshooting </div> |
| --------------------------- | ----------------------------------- | ------------------------------------------------------------ | ------------------------------ |
| `INVALID_ARGUMENT (400)` | `DOMAINS_GUID_NOT_VALID` | Wix site and/or account ID are invalid. | Check that the site and account ID are correct. |
| `PERMISSION_DENIED (403)` | `DOMAINS_PERMISSION_DENIED` | Permission denied for account ID `<accountId>`. | Check that the account ID is correct and that you have permissions to access it. |
| `PERMISSION_DENIED (403)` | `DOMAINS_DOMAIN_NOT_PERMITTED` | Domain `<domain>` isn't permitted for the account. | Make sure that you have permissions to access the account. |
| `PERMISSION_DENIED (403)` | `DOMAINS_GUID_NOT_FOUND` | - | Make sure to pass a valid account ID. |