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

# Update a Website — POST /api/websites/{websiteId}

> Modify a website's name, domain, public share token, or session replay and heatmap recording configuration. Only fields you include are updated.

Use this endpoint to change a website's name, domain, sharing settings, or session recording configuration. You only need to include the fields you want to change — any field you omit remains unchanged. The response returns the full updated website object so you can confirm every value.

`POST /api/websites/{websiteId}`

## Request

### Headers

**Authorization** `string` *required*

Bearer token. Pass your API key: `Authorization: Bearer <api-key>`

**Content-Type** `string` *required*

Must be `application/json`.

### Path Parameters

**websiteId** `string` *required*

The unique UUID of the website to update.

### Body Parameters

**name** `string`

New display name for the website.

**domain** `string`

New domain to associate with this website, e.g. `"newdomain.com"`.

**shareId** `string | null`

New public share token. Set to `null` to disable public sharing, or provide a unique string to enable or change the share link.

**replayConfig** `object`

Session replay and heatmap recording settings to update. All sub-fields are optional.

**replayConfig.replayEnabled** `boolean`

Enable or disable session replay recording.

**replayConfig.heatmapEnabled** `boolean`

Enable or disable heatmap data capture.

**replayConfig.sampleRate** `number`

Fraction of sessions to record, from `0.0` (none) to `1.0` (all).

**replayConfig.heatmapSampleRate** `number`

Fraction of sessions from which heatmap data is captured.

**replayConfig.maskLevel** `string`

Privacy masking level: `"strict"`, `"moderate"`, or `"none"`.

**replayConfig.blockSelector** `string`

CSS selector targeting DOM elements to exclude from recordings.

**replayConfig.maxDuration** `number`

Maximum session recording length in seconds. Use `0` for no limit.

## Response

**200 – Success**

Returns the full updated website object.

**id** `string` *required*

UUID of the website.

**name** `string` *required*

Updated display name.

**domain** `string | null` *required*

Updated domain.

**shareId** `string | null` *required*

Updated public share token, or `null`.

**teamId** `string | null` *required*

UUID of the assigned team, unchanged by this operation.

**userId** `string | null` *required*

UUID of the owning user.

**createdBy** `string | null` *required*

UUID of the user who created the website.

**recorderEnabled** `boolean` *required*

Whether recording is currently active.

**replayConfig** `object` *required*

The updated session replay and heatmap recording configuration.

**resetAt** `string | null` *required*

Timestamp of the last analytics data reset.

**createdAt** `string | null` *required*

ISO 8601 timestamp when the website was originally created.

**updatedAt** `string | null` *required*

ISO 8601 timestamp of this update.

**deletedAt** `string | null` *required*

ISO 8601 timestamp when the website was deleted, or `null` if it is active.

**user** `object`

Embedded owner information.

**user.id** `string`

UUID of the owning user.

**user.username** `string`

Username of the owning user.

```json 200 Response theme={null}
{
  "id": "b8d3a1f0-1c2d-4e5f-8a9b-0c1d2e3f4a5b",
  "name": "My Rebranded Site",
  "domain": "newdomain.com",
  "shareId": "public-dashboard-2024",
  "teamId": null,
  "userId": "123e4567-e89b-12d3-a456-426614174000",
  "createdBy": "123e4567-e89b-12d3-a456-426614174000",
  "recorderEnabled": true,
  "replayConfig": {
    "replayEnabled": true,
    "heatmapEnabled": true,
    "sampleRate": 0.05,
    "heatmapSampleRate": 0.1,
    "maskLevel": "strict",
    "blockSelector": ".payment-form",
    "maxDuration": 1800
  },
  "resetAt": null,
  "createdAt": "2024-03-01T10:00:00Z",
  "updatedAt": "2024-09-01T08:45:00Z",
  "deletedAt": null,
  "user": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "username": "alice"
  }
}
```

## Code Sample

```bash theme={null}
curl -X POST 'https://api.umami.is/v1/websites/b8d3a1f0-1c2d-4e5f-8a9b-0c1d2e3f4a5b' \
  -H 'Authorization: Bearer <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "My Rebranded Site",
    "domain": "newdomain.com",
    "shareId": "public-dashboard-2024"
  }'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.