---
title: "Change the site's speed settings (only the fields sent); applied to the running site with a restart (no rebuild)"
method: PATCH
path: "/projects/{projectId}/accelerator"
tags: ["Accelerator"]
---

# Change the site's speed settings (only the fields sent); applied to the running site with a restart (no rebuild)

`PATCH /projects/{projectId}/accelerator`

## Request

- Base URL: `https://hostingsurge.com/api/v1`
- URL: `https://hostingsurge.com/api/v1/projects/{projectId}/accelerator`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-hs_session`

## Path parameters

- `projectId` string, uuid, required

## Request body

- object
  - `compression` boolean
  - `browserCaching` boolean
  - `edgeCache` 'off' | 'smart' | 'everything': off: no shared cache; smart: files, and pages the site marks cacheable (every page of a static site); everything: also pages without cache headers, for visitors without cookies
  - `edgeTtlSeconds` integer
  - `images` boolean
  - `imageQuality` integer
  - `imageFormat` 'webp' | 'avif'
  - `imageMaxWidth` integer
  - `cdn` boolean

## Response `200`

Updated

- object
  - `projectId` string, uuid, required
  - `settings` object, required
    - `compression` boolean, required
    - `browserCaching` boolean, required
    - `edgeCache` 'off' | 'smart' | 'everything', required: off: no shared cache; smart: files, and pages the site marks cacheable (every page of a static site); everything: also pages without cache headers, for visitors without cookies
    - `edgeTtlSeconds` integer, required
    - `images` boolean, required
    - `imageQuality` integer, required
    - `imageFormat` 'webp' | 'avif', required
    - `imageMaxWidth` integer, required
    - `cdn` boolean, required
  - `supported` boolean, required
  - `staticSite` boolean, required
  - `edge` object, required
    - `available` boolean, required
    - `images` boolean, required
  - `protected` boolean, required
  - `cdn` object, required
    - `available` boolean, required
    - `provider` 'bunny' | 'null', nullable, required
    - `status` 'off' | 'active' | 'error', required
    - `cdnHostname` string, nullable, required
    - `hostnames` string[], required
    - `message` string, nullable, required
  - `engine` object, required
    - `status` 'applied' | 'pending_deploy' | 'not_configured' | 'error', required
    - `message` string, nullable, required
    - `appliedAt` string, nullable, required: ISO-8601 timestamp
  - `stats` object, nullable, required
    - `hours` integer, required
    - `hits` integer, required
    - `misses` integer, required
    - `stale` integer, required
    - `bypass` integer, required
    - `hitRatio` number, nullable, required
    - `bytesServed` integer, required
    - `bytesFromOrigin` integer, required
    - `images` integer, required
    - `imageBytesSaved` integer, required
  - `updatedAt` string, nullable, required: ISO-8601 timestamp

## Other responses

- `400`: Invalid request, e.g. a setting out of range (code invalid_request)
- `401`: Missing or invalid session/token (code unauthorized)
- `403`: Authenticated but not permitted (code forbidden)
- `404`: Not found or not visible to the caller (code not_found)

---

[API](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api.md) · [All operations](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/revisions/4d08337cdff1?raw)
