---
updatedAt: 2025-12-15T02:40:27.000Z
agentTools:
  projectIndex: https://support.speedcurve.com/llms.txt
---

# Update a site

Update an existing site

**Usage notes:**

* `urls` is required. URLs without a `url_id` will be created as new URLs. Any existing URLs that are not present in the `urls` array will be deleted.
* When `settings` is not present, settings will not be modified.
* When `settings` is present, they will override all existing settings.
* `settings.synthetic.test_times` can be an empty array, which means the site will not have any scheduled testing.

**Example request body:**

```json
{
  "name": "Radio NZ",
  "type": "competitor",
  "category": "News",
  "color": "#ff00ff",
  "urls": [
    {
      "url_id": 116412,
      "url": "https://www.rnz.co.nz/",
      "label": "Home"
    },
    {
      "url": "https://www.rnz.co.nz/programmes/the-detail/story/2018837367/so-long-dr-ashley-bloomfield",
      "label": "Article"
    }
  ],
  "settings": {
    "synthetic": {
      "regions": [
        {
          "region_id": "ap-southeast-2",
        }
      ],
      "test_profiles": [
        {
          "name": "Desktop Slow"
        },
        {
          "name": "Firefox"
        },
        {
          "name": "Mobile Slow"
        }
      ],
      "test_times": [
        {
          "time": "02:40"
        },
        {
          "time": "12:10"
        }
      ],
      "test_runs": 5
    }
  }
}
```

<br />

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "speedcurve-api-v2-beta",
    "version": "2.1.0"
  },
  "servers": [
    {
      "url": "https://api.speedcurve.com/v2"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/accounts/{account_id}/sites/{site_id}/": {
      "patch": {
        "summary": "Copy of Create a site",
        "description": "Add a new site with URLs",
        "operationId": "post_accounts{account_id}sites-1",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "description": "Account ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "site_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Site name (must be unique for the team)"
                  },
                  "type": {
                    "type": "string",
                    "description": "Site type (production, staging, competitor, other)"
                  },
                  "urls": {
                    "properties": {
                      "": {
                        "properties": {
                          "url": {
                            "type": "string",
                            "description": "A valid URL (starting with http), f.i. https://www.speedcurve.com"
                          },
                          "label": {
                            "type": "string",
                            "description": "URL/page label"
                          },
                          "script": {
                            "type": "string",
                            "description": "Testing script"
                          },
                          "auth": {
                            "properties": {
                              "username": {
                                "type": "string",
                                "description": "HTTP Basic Auth username"
                              },
                              "password": {
                                "type": "string",
                                "description": "HTTP Basic Auth password"
                              }
                            },
                            "required": [],
                            "type": "object"
                          }
                        },
                        "required": [
                          "url",
                          "label"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [],
                    "type": "object"
                  }
                }
              },
              "examples": {
                "Example JSON request": {
                  "value": "{\n  \"name\": \"Radio NZ\",\n  \"type\": \"competitor\",\n  \"category\": \"News\",\n  \"color\": \"#ff00ff\",\n  \"urls\": [\n    {\n      \"url_id\": 116412,\n      \"url\": \"https://www.rnz.co.nz/\",\n      \"label\": \"Home\"\n    },\n    {\n      \"url\": \"https://www.rnz.co.nz/programmes/the-detail/story/2018837367/so-long-dr-ashley-bloomfield\",\n      \"label\": \"Article\"\n    }\n  ],\n  \"settings\": {\n    \"synthetic\": {\n      \"regions\": [\n        {\n          \"region_id\": \"ap-southeast-2\",\n        }\n      ],\n      \"test_profiles\": [\n        {\n          \"name\": \"Desktop Slow\"\n        },\n        {\n          \"name\": \"Firefox\"\n        },\n        {\n          \"name\": \"Mobile Slow\"\n        }\n      ],\n      \"test_times\": [\n        {\n          \"time\": \"02:40\"\n        },\n        {\n          \"time\": \"12:10\"\n        }\n      ],\n      \"test_runs\": 5\n    }\n  }\n}"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": ""
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "site_id": {
                          "type": "integer",
                          "example": 123,
                          "default": 0
                        },
                        "name": {
                          "type": "string",
                          "example": "SpeedCurve"
                        },
                        "type": {
                          "type": "string",
                          "example": "production"
                        },
                        "category": {},
                        "color": {},
                        "urls": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url_id": {
                                "type": "integer",
                                "example": 123,
                                "default": 0
                              },
                              "url": {
                                "type": "string",
                                "example": "https://www.speedcurve.com/about"
                              },
                              "label": {
                                "type": "string",
                                "example": "About"
                              }
                            }
                          }
                        },
                        "settings": {
                          "type": "object",
                          "properties": {
                            "synthetic": {
                              "type": "object",
                              "properties": {
                                "paused": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "regions": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "region_id": {
                                        "type": "string",
                                        "example": "ap-southeast-2"
                                      },
                                      "name": {
                                        "type": "string",
                                        "example": "Australia"
                                      }
                                    }
                                  }
                                },
                                "test_profiles": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "example": "Mobile Slow"
                                      }
                                    }
                                  }
                                },
                                "test_times": {
                                  "type": "array"
                                },
                                "test_runs": {
                                  "type": "integer",
                                  "example": 3,
                                  "default": 0
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```