> For the complete documentation index, see [llms.txt](https://developers.getafile.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.getafile.io/domains/update.md).

# Update a Domain

**Please note:** Offensive domain names will be replaced with \*\*\*\*

<mark style="color:orange;">`PUT`</mark> `https://{region}.getafile.io/api/v1/teams/:team_id/domain/:id`

This endpoint allows you to update a Domain.

#### Path Parameters

| Name | Type    | Description       |
| ---- | ------- | ----------------- |
| id   | integer | ID of the Domain. |

#### Request Body

| Name                                                             | Type   | Description                                                                                       |
| ---------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------- |
| domain<mark style="color:red;">\*</mark>                         | string | The Domain you wish to use: eg test.getafile.online                                               |
| name<mark style="color:red;">\*</mark>                           | string | Reference name for the Domain                                                                     |
| google\_analytics\_id\_consent<mark style="color:red;">\*</mark> | number | <p>Specify if this is your own domain, or a subdomain of getafile.online<br>1 = Yes<br>0 = No</p> |
| google\_analytics\_id                                            | string | The google analytics ID tied to the domain (required if google\_analytics\_id\_consent = 0)       |
| google\_analytics\_id\_secret                                    | string | The google analytics secret tied to the domain (required if google\_analytics\_id\_consent = 0)   |

{% tabs %}
{% tab title="200 Domain successfully updated." %}

```
{
    "active": 1,
    "name": "Testing",
    "domain": "testing",
    "google_analytics_id_consent": 0,
    "google_analytics_id": null,
    "google_analytics_id_secret": null
}
```

{% endtab %}

{% tab title="404 Could not find a Domain matching this query." %}

```
{    "message": "Ain't no domain like that."}
```

{% endtab %}
{% endtabs %}

#### Example Request

```json
{
    "active": 1,
    "name": "Testing",
    "domain": "testing",
    "google_analytics_id_consent": 0,
    "google_analytics_id": null,
    "google_analytics_id_secret": null
}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.getafile.io/domains/update.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
