---
title: "Update Comments settings"
method: PATCH
path: "/v1/spaces/{spaceId}/collaboration"
tags: ["Spaces"]
---

# Update Comments settings

`PATCH /v1/spaces/{spaceId}/collaboration`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/spaces/{spaceId}/collaboration`
- Auth: HTTP bearer

Changes only the settings you send, and they apply right away, no republish needed. Send the `revision` you last read as `expectedRevision`: if someone changed the settings since, you get a 409 with the current ones.

## Path parameters

- `spaceId` string, required

## Request body

- object
  - `expectedRevision` integer, required: The `revision` from your last read of these settings. If someone changed them since, the update returns 409 with the current settings.
  - `settings` object, required: Only the settings to change. Omitted settings keep their values.
    - `spamFilterEnabled` boolean
    - `surface` 'off' | 'previews' | 'everywhere': Where Comments are on: `off`, `previews` (Version URLs only), or `everywhere` (Version URLs and the live Space). Applies right away, without a republish.
    - `embedOrigins` string[]: Exact https origins allowed to embed this Space's Comments.
    - `notificationPreferences` object: Merged key by key: a key you leave out keeps its value.
      - `newThreads` boolean
      - `newReplies` boolean
      - `statusChanges` boolean

## Response `200`

Response for status 200

- object
  - `$schema` string, uri: Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
  - `data` object, required
    - `spaceId` string, required
    - `revision` integer, required
    - `castResourceId` string, nullable, required
    - `castResourceKey` string, nullable, required
    - `settings` object, required
      - `spamFilterEnabled` boolean
      - `surface` 'off' | 'previews' | 'everywhere', required
      - `embedOrigins` string[], required
      - `notificationPreferences` object
        - `newThreads` boolean
        - `newReplies` boolean
        - `statusChanges` boolean
    - `createdAt` string, date-time, nullable, required
    - `updatedAt` string, date-time, nullable, required

## Other responses

- `default`: Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.

---

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