---
title: "Set or clear the website favicon"
method: PUT
path: "/websites/{websiteId}/favicon"
tags: ["Websites"]
---

# Set or clear the website favicon

`PUT /websites/{websiteId}/favicon`

## Request

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

Sets the website’s current favicon to a ready PNG, SVG, or ICO image from the same website asset library. Send `assetId: null` to clear it. The change applies immediately to every site host and is independent of source drafts and publishing. Read the current favicon from the `faviconUrl` field on `GET /websites` and `GET /websites/find`.

## Path parameters

- `websiteId` string, required

## Request body

- object
  - `assetId` string, nullable, required

## Response `200`

The current website favicon after the update.

- object
  - `websiteId` string, required: Id of the website.
  - `favicon` object, nullable, required: The current favicon, or `null` when no available favicon is configured.
    - `assetId` string, required: Id of the website asset used as the favicon.
    - `filename` string, required: Original filename of the asset.
    - `mimeType` string, required: MIME type of the asset (PNG, SVG, or ICO).
    - `url` string, required: Stable public CDN URL serving the favicon.
    - `fallbackUrl` string, nullable, required: For an SVG favicon, the stable public CDN URL of its rasterized PNG, served to browsers that ignore SVG icons and as the Apple touch icon. `null` otherwise.

## 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.
- `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)
