---
updatedAt: 2025-09-18T22:01:55.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# Update Sites

This API call updates a site with a new URL and/or title, using the "Site ID". Please note that the "Site ID cannot be changed.

> 📘 Clearing attribute values
>
> To unset or clear an attribute, set its value to `NULL`.

<br />

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "management-api-2",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.kevel.co"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "X-Adzerk-ApiKey",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/site/{SiteID}": {
      "put": {
        "summary": "Update Sites",
        "description": "This API call updates a site with a new URL and/or title, using the \"Site ID\". Please note that the \"Site ID cannot be changed.",
        "operationId": "update-sites",
        "parameters": [
          {
            "name": "SiteID",
            "in": "path",
            "description": "ID of the Site",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "Id",
                  "Title",
                  "Url"
                ],
                "properties": {
                  "Id": {
                    "type": "string",
                    "description": "The id of the Site. Cannot be changed."
                  },
                  "Title": {
                    "type": "string",
                    "description": "Update the friendly name title if needed"
                  },
                  "Url": {
                    "type": "string",
                    "description": "Update the URL in format `https://path of URL` if needed"
                  },
                  "IsDeleted": {
                    "type": "boolean",
                    "description": "If want to delete, set to `true`"
                  }
                }
              },
              "examples": {
                "JSON": {
                  "value": {
                    "Id": 12345,
                    "Url": "http://www.example.com",
                    "Title": "New Title",
                    "IsDeleted": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"Id\":12345,\n  \"Title\":\"New Title\",\n  \"Url\":\"http://www.example.com\",\n  \"NetworkMargin\":null,\n  \"IsDeleted\":false\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "Id": {
                      "type": "integer",
                      "example": 12345,
                      "default": 0
                    },
                    "Title": {
                      "type": "string",
                      "example": "New Title"
                    },
                    "Url": {
                      "type": "string",
                      "example": "http://www.example.com"
                    },
                    "NetworkMargin": {},
                    "IsDeleted": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -X PUT -H \"X-Adzerk-ApiKey:$ADZERK_API_KEY\" -H \"Content-Type:application/json\" \"https://api.kevel.co/v1/site/12345\" --data-binary '{\"Id\":12345,\"Url\":\"http://www.example.com\",\"Title\":\"New Title\"}'"
            },
            {
              "language": "javascript",
              "code": "const Adzerk = require('@adzerk/management-sdk');\nconst apiKey = process.env.ADZERK_API_KEY;\n\nasync function updateSite() {\n  let specifications = await Adzerk.fetchSpecifications();\n  let client = await Adzerk.buildClient({apiKey, specifications});\n\n  let site = await client.run(\"site\", \"update\", {id: 12345, title: \"New Title\"});\n  console.log(site);\n}\n\nupdateSite();"
            },
            {
              "language": "ruby",
              "code": "require \"adzerk\"\n\ndef update_site()\n    client = Adzerk::Client.new(ENV[\"ADZERK_API_KEY\"])\n    id = 12345\n    data = client.sites.get(id)\n    data[:title] = \"Updated Site Title\"\n    pp client.sites.update(data)\nend\nupdate_site()"
            }
          ],
          "samples-languages": [
            "curl",
            "javascript",
            "ruby"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "X-Adzerk-Sdk-Version",
        "value": "Readme.io:ManagementAPI2"
      }
    ],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```