---
title: "Apply a previewed settings change"
method: POST
path: "/v1/projects/{projectId}/settings-changes/apply"
tags: ["Settings changes"]
---

# Apply a previewed settings change

`POST /v1/projects/{projectId}/settings-changes/apply`

## Request

- Base URL: `https://hootlens-api-368877148687.us-east1.run.app`
- URL: `https://hootlens-api-368877148687.us-east1.run.app/v1/projects/{projectId}/settings-changes/apply`
- Auth: HTTP bearer

Commits exactly the change the token was made for. Refused with 409 (settings_changed) when the settings differ from what they were at preview, 410 (preview_expired) after 10 minutes, and 400 (invalid_change_token) for a token made for another site or person. The change is logged in the site's activity log, as made by the connected app when an agent applied it. At most 20 a minute.

Required token scopes are listed in x-hootlens-scopes. A signed-in person needs the matching permission on the site instead (the viewer and editor roles are presets of the permissions).

## Path parameters

- `projectId` string, required: An identifier: 1 to 80 letters, digits, underscores or hyphens.

## Request body

- SettingsApply
  - `token` string, required

## Response `200`

The applied change.

- SettingsApplyResult
  - `applied` boolean, required
  - `appliedAt` integer: Epoch milliseconds.
  - `diff` object[], required
    - `area` string, required
    - `action` string, required
    - `summary` string, required
  - `areas` string[]
  - `loggedAs` string
  - `message` string

## Other responses

- `400`: The request fields are invalid.
- `401`: The credential is missing, expired or revoked.
- `403`: The credential or the person's permissions on the site do not permit this action.
- `404`: The site, or the record inside it, does not exist or the caller is not a member (a non-member cannot tell the two apart).
- `409`: The request conflicts with the current state of the record.
- `410`: The thing asked for existed but has expired, such as a settings change preview.
- `429`: A rate limit or a per-site limit was reached.

---

[API](https://skmtc.dev/hootlens/apis/hoot-lens-api.md) · [All operations](https://skmtc.dev/hootlens/apis/hoot-lens-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hootlens/apis/hoot-lens-api/revisions/f64f8dc7b84e?raw)
