---
title: "Rename a website"
method: PATCH
path: "/websites/{websiteId}"
tags: ["Websites"]
---

# Rename a website

`PATCH /websites/{websiteId}`

## Request

- Base URL: `https://api.cactal.ai/v1`
- URL: `https://api.cactal.ai/v1/websites/{websiteId}`
- Auth: HTTP bearer

Updates the website’s display name and, when supplied, its URL slug. The slug must be lowercase, URL-safe, unreserved, and unique among active websites in the organization.

## Path parameters

- `websiteId` string, required

## Request body

- object
  - `name` string, required
  - `slug` string

## Response `200`

The renamed website.

- object
  - `id` string, required: Unique website id.
  - `organizationId` string, required: Id of the organization that owns the website.
  - `name` string, required: Display name, 1–200 characters.
  - `slug` string, required: URL-safe identifier unique among active websites in the organization.
  - `customDomainsEnabled` boolean, required: Whether custom domains are enabled. Enabling is owner-only and makes the website a billable site; custom domains can only be attached while `true`.
  - `headVersion` integer, required: Latest draft source version number; starts at 1.
  - `publishedVersion` integer, nullable, required: Currently published version. `null` when the website is not published.
  - `createdAt` string, date-time, required: When the website was created.
  - `updatedAt` string, date-time, required: When the website was last modified.

## Other responses

- `400`: Validation failed. The response `message` names the first invalid field.
- `401`: Missing, invalid, expired, or revoked API key.
- `403`: The authenticated principal lacks the required capability.
- `404`: The resource does not exist or is outside the principal’s access scope.
- `409`: The request conflicts with the current state of the resource.
- `429`: Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.

---

[API](https://skmtc.dev/cactal/apis/cactal-api.md) · [All operations](https://skmtc.dev/cactal/apis/cactal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cactal/apis/cactal-api/revisions/9cd0fb5eacdd?raw)
