Skip to main content

Update Website

Update the name, domain, or share ID of an existing website.

Endpoint

POST /api/websites/{websiteId}

Headers

Authorization
string
required
Bearer token for authentication

Path Parameters

websiteId
string
required
Website UUID

Request Body

name
string
Updated website name (max 100 characters)
domain
string
Updated website domain (max 500 characters)
shareId
string
Updated share ID (max 50 characters, alphanumeric with hyphens). Set to null to remove public sharing.
All fields are optional. Only include fields you want to update.

Response

id
string
Website UUID
name
string
Updated website name
domain
string
Updated website domain
shareId
string
Updated share ID
updatedAt
string
ISO 8601 timestamp of update

Example Request

curl -X POST https://your-umami-instance.com/api/websites/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Website Name",
    "domain": "newdomain.com"
  }'

Example Response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Updated Website Name",
  "domain": "newdomain.com",
  "shareId": "abc123def456",
  "userId": "660e8400-e29b-41d4-a716-446655440001",
  "teamId": null,
  "updatedAt": "2024-03-15T16:45:00.000Z"
}

Removing Share ID

To disable public sharing, set shareId to null:
curl
curl -X POST https://your-umami-instance.com/api/websites/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"shareId": null}'

Error Responses

400
error
Bad Request - Share ID already taken by another website
401
error
Unauthorized - You don’t have permission to update this website
You must be the website owner or have update permissions to modify website settings.

Build docs developers (and LLMs) love