---
title: "Update Website Content"
method: PUT
path: "/websites/{website_id}/content"
tags: ["websites"]
---

# Update Website Content

`PUT /websites/{website_id}/content`

## Request

- Base URL: `https://api.moda.app/v1`
- URL: `https://api.moda.app/v1/websites/{website_id}/content`
- Auth: HTTP bearer

Replace the site's page content with new HTML.

Content changes do NOT auto-republish: a live site keeps serving its last
published artifact until POST .../publish runs again (the returned
``has_unpublished_changes`` signals the gap).

## Path parameters

- `website_id` string, uuid, required

## Headers

- `Moda-Version` '2026-04-12' | '2026-05-01'

## Request body

- WebsiteContentUpdateRequest
  - `html` string, required: Replacement HTML for the site's page.
  - `title` string, nullable: New site title (unchanged when omitted).
  - `expected_version` integer, nullable: Optimistic-concurrency pin: when set, the update is rejected with 409 website_version_conflict unless the site's current version matches. Read the version from any prior response on this surface.

## Response `200`

Successful Response

- object

## Other responses

- `401`: Authentication required.
- `402`: Insufficient credits for a metered operation.
- `403`: Permission denied for this scope.
- `404`: Resource not found.
- `409`: Conflict (idempotency / resource state).
- `422`: Request validation failed.
- `429`: Rate limit exceeded.
- `500`: Internal error.

## Changes

- **2026-11-03** `9ac6a3abc0f8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/moda/apis/moda-public-api/changes/websites/:website_id/content/put.md)

---

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