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

# How to update a site

> Update site meta-data and settings.

To update the meta data of an existing site you will need to provide the new parameter values in a similar way as when creating a new site.
Below is an example of how to change the name of the site that was created with the solar [example](/api-guides/create-site-solar).

To retrieve the meta data of an existing site see [here](/api-guides/get-site-info).

```python Update site theme={null}
import requests

api_key = "Your API key" # Set your API key
site_id = "a923653c-26f1-1b29-955d-ffde5d182276" # Set the site ID

payload = {
	"type": "wind",
	"name": "My new solar site", # The new site name
	"latitude": 52.5,
	"longitude": 13.4,
	"settings": {
		"model_resolution": "1h",
		"usePhysicalModels": True,
		"trainNearTermModels": False,
		"trainLongTermModels": False
	},
	"assets": [
		{
			"azimuth": 180,
			"tilt": 30,
			"capacity": 1000,
			"install_date": "2020-01-01"
		}
	]
}

url = f"https://api.rebase.energy/platform/v2/sites/{site_id}"
headers = {"Authorization": api_key, "Content-Type": "application/json"}

response = requests.put(url, headers=headers, json=payload)
response.raise_for_status()
response = response.json()
```

```python Response example theme={null}
{
    "message": "Site updated successfully"
}
```
