> For the complete documentation index, see [llms.txt](https://docs.ecwid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ecwid.com/api-reference/rest-api/domains/update-store-domains.md). Agents can also search and read this documentation through its [MCP server](https://docs.ecwid.com/~gitbook/mcp).

# Update store domains

<mark style="color:purple;">`PUT`</mark> `https://app.ecwid.com/api/v3/{storeId}/domains`&#x20;

### Required access scopes

Your app must have the following **access scopes** to make this request: `update_store_profile`, `buy_domains`

### Path params

All path params are required.

| Param   | Type   | Description     |
| ------- | ------ | --------------- |
| storeId | number | Ecwid store ID. |

### Headers

The **Authorization** header is required.

<table><thead><tr><th>Header</th><th width="252">Format</th><th>Description</th></tr></thead><tbody><tr><td>Authorization</td><td><code>Bearer secret_ab***cd</code></td><td>Access token of the application.</td></tr></tbody></table>

### Request JSON

A JSON object with the following fields:

| Field             | Type                                                   | Description                                             |
| ----------------- | ------------------------------------------------------ | ------------------------------------------------------- |
| instantSiteDomain | object [instantSiteDomain](#instantsitedomain)         | Details for the currently enabled store domain.         |
| purchasedDomains  | array of objects [purchasedDomains](#purchaseddomains) | List with details for each domain bought for the store. |

#### instantSiteDomain

| Field                  | Type   | Description                                                                                                               |
| ---------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| ecwidSubdomain         | string | Subdomain of the default Instant Site URL.                                                                                |
| thirdPartyVendorDomain | string | Custom domain specified in the Control Panel settings. Has the same value as the `customDomain` in the Instant Site Info. |

#### purchasedDomains

| Field                  | Type    | Description                                                                          |
| ---------------------- | ------- | ------------------------------------------------------------------------------------ |
| connectedToInstantSite | boolean | Shows if this domain is connected to Instant Site. Available values: `true`, `false` |
| primaryDomain          | boolean | Shows if this domain is the main one. Available values: `true`, `false`              |
| autorenew              | boolean | Shows if automatic renewal charge is enabled. Available values: `true`, `false`      |

### Response JSON

A JSON object with the following fields:

| Field       | Type   | Description                                                                                                                                                                             |
| ----------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| updateCount | number | <p>The number of updated items that defines if the request was successful.<br><br>One of:<br><code>1</code> if the item was updated,<br><code>0</code> if the item was not updated.</p> |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ecwid.com/api-reference/rest-api/domains/update-store-domains.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
