---
title: "PATCH settings"
slug: "patch-settings"
abstract: "How to use the JSON patch format to update settings."
---
# PATCH settings

A `PATCH` query to the *settings* endpoint lets you use a JSON patch format for operations and content-type headers specified in [RFC6902](https://tools.ietf.org/html/rfc6902).

| Relative Route | `/settings` |
| --- | --- |
| `HTTP Verb` | `PATCH` |

## Headers

The following header is required:

| Name | Value |
| --- | --- |
| `Content-Type` | `application/json-patch+json` |

## Body

The body structure is as follows:

```json

  {
    "op":"replace",
    "path":"/contentcacheautoclear",
    "value":true
  },
  {
    "op":"replace",
    "path":"/contentcachettl",
    "value":"`00:15`:00"
  }
]

```

> [!important]
> The `replace` operation is the only one allowed.

## Patch settings

The settings available for patching are as follows:

- *Content cache time to live:* cache duration of a piece of content. Value format: timespan.

    ```csharp
    [
      {
        "op":"replace",
        "path":"/contentcachettl",
        "value":"`00:15`:00"
      }
    ]
    ```

- *Media cache time to live:* cache duration of media resources. Value format: timespan.

    ```csharp
    [
      {
        "op":"replace",
        "path":"/mediacachettl",
        "value":"`00:15`:00"
      }
    ]
    ```

- *Content cache auto-clear:* auto-clear content-specific caches on publishing end. Value format: boolean.

    ```csharp
    [
      {
        "op":"replace",
        "path":"/contentcacheautoclear",
        "value":true
      }
    ]
    ```

- *Media cache auto-clear:* auto-clear media caches on publishing end. Value format: boolean.

    ```csharp
    [
      {
        "op":"replace",
        "path":"/mediacacheautoclear",
        "value":true
      }
    ]
    ```

- *Tenant cache auto-clear:* auto-clear entire cache on publishing end. Value format: boolean.

    ```csharp
    [
      {
        "op":"replace",
        "path":"/tenantcacheautoclear",
        "value":true
      }
    ]
    ```

## Response

A `PATCH` query returns the tenant settings structured as follow:

```csharp
{
  "contentCacheTtl": "`04:00`:00",
  "contentCacheAutoClear": true,
  "mediaCacheTtl": "`04:00`:00",
  "mediaCacheAutoClear": true,
  "tenantCacheAutoClear": true
}

```

A successful query returns the *OK* status code (200).