> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.docs.modulards.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.docs.modulards.com/_mcp/server.

# Update a website's uptime settings

PATCH https://api.modulards.com/api/public/v1/uptime-services/{site_preset_uptime}
Content-Type: application/json

Changes how one website is monitored. Send only the fields you want to change, and at least one.

`keyword` and `redirects` merge field by field over the stored section, so a partial object keeps the fields you do not send. `keyword.keys` is the only field replaced whole rather than merged.

It does not change the global configuration itself (interval, timeout): use "Update an uptime global configuration".

**Body**
- `status` (`enabled` or `disabled`, optional): turns monitoring on or pauses it. Enabling runs a check right away.
- `preset` (integer, optional): id of another Uptime Monitor global configuration to move the website to. The website keeps its status, unlike "Assign websites to an uptime global configuration", which always switches it on.
- `keyword` (object, optional):
  - `status` (`enabled` or `disabled`, optional): turns the keyword check on or off. An enabled keyword check needs at least one keyword.
  - `type` (`some` or `every`, optional): plan-dependent.
  - `keys` (array of strings, optional): the keywords.
- `path` (string or `null`, optional): path checked on the website, for example `/status`; `null` checks the website root.
- `redirects` (object, optional):
  - `status` (`enabled` or `disabled`, optional): turns the redirect check on or off.
  - `max_redirects` (integer, optional): 1 to 10.
  - `expected_url` (URL or `null`, optional): the URL the redirects must end on; `null` accepts any.

**Errors**
- **422**: no field is sent, or `redirects.expected_url` is not a valid URL.

Reference: https://api.docs.modulards.com/modular-ds-public-api/uptime-monitor/uptime-settings/update-a-website-s-uptime-settings

## Authentication

- `Authorization` header (bearer token, required) — Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints.

## Request

### Path parameters

- `site_preset_uptime` (string, required)

### Query parameters

- `include` (string, optional) — Relations to add to the answer, comma separated: `preset` (the global configuration the website uses) and `current_change` (the current status change). Without `include` both are answered; an `include` narrows the answer to the ones it names, and an empty `include=` answers none. Any other name, including the camelCase `currentChange`, answers 400.

### Body (application/json)

This endpoint expects an object.

- `redirects` (ApiPublicV1UptimeServicesSitePresetUptimePatchRequestBodyContentApplicationJsonSchemaRedirects, optional)

## Response

### 200

200 - Uptime service updated

- `data` (ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaData, optional)
- `included` (list of ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaIncludedItems, optional)
- `jsonapi` (ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaJsonapi, optional)

## Errors

### 422 Unprocessable Entity Error

422 - Nothing to change

- `errors` (list of ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaErrorsItems, optional)
- `jsonapi` (ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaJsonapi, optional)

## Types

### ApiPublicV1UptimeServicesSitePresetUptimePatchRequestBodyContentApplicationJsonSchemaRedirects

- `status` (string, optional)

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaData

- `attributes` (ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataAttributes, optional)
- `id` (string, optional)
- `links` (ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataLinks, optional)
- `relationships` (ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataRelationships, optional)
- `type` (string, optional)

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaIncludedItems

- `attributes` (ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaIncludedItemsAttributes, optional)
- `id` (string, optional)
- `links` (ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaIncludedItemsLinks, optional)
- `type` (string, optional)

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaJsonapi

- `version` (string, optional)

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaErrorsItems

- `detail` (string, optional)
- `source` (ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaErrorsItemsSource, optional)
- `status` (string, optional)
- `title` (string, optional)

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataAttributes

- `created_at` (string, optional)
- `keyword` (ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataAttributesKeyword, optional, nullable) — Keyword check: the monitor looks for these words in the page.
- `next_request` (string, optional)
- `path` (string, optional, nullable) — Path the monitor checks; null for the website root.
- `redirects` (ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataAttributesRedirects, optional, nullable) — Redirect check.
- `site_status` (enum, optional, nullable) — The website's last known reachability. Read only.
  - Allowed values: `up`, `down`, `unknown`
- `status` (string, optional)
- `updated_at` (string, optional)

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataLinks

- `self` (string, optional)

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataRelationships

- `current_change` (ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataRelationshipsCurrentChange, optional)
- `preset` (ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataRelationshipsPreset, optional)

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaIncludedItemsAttributes

- `created_at` (string, optional)
- `duration` (any, optional, nullable)
- `ended_at` (any, optional, nullable)
- `interval` (double, optional)
- `is_default` (boolean, optional)
- `method` (string, optional)
- `name` (string, optional)
- `region` (string, optional)
- `started_at` (string, optional)
- `status` (string, optional)
- `status_codes` (list of string, optional)
- `timeout` (double, optional)
- `updated_at` (string, optional)

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaIncludedItemsLinks

- `self` (string, optional)

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaErrorsItemsSource

- `parameter` (string, optional)

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataAttributesKeyword

Keyword check: the monitor looks for these words in the page.

- `keys` (list of string, optional) — Keywords to look for.
- `status` (enum, optional) — Whether the keyword check is on.
  - Allowed values: `enabled`, `disabled`
- `type` (string, optional, nullable) — some when at least one keyword must appear, every when all of them must (plan-gated); none while no keyword check is set.

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataAttributesRedirects

Redirect check.

- `expected_url` (string, optional, nullable) — Address the redirects must end on; null when any is accepted.
- `max_redirects` (integer, optional) — Redirects the monitor follows before it gives up.
- `status` (enum, optional) — Whether the redirect check is on.
  - Allowed values: `enabled`, `disabled`

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataRelationshipsCurrentChange

- `data` (ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataRelationshipsCurrentChangeData, optional)

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataRelationshipsPreset

- `data` (ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataRelationshipsPresetData, optional)

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataRelationshipsCurrentChangeData

- `id` (string, optional)
- `type` (string, optional)

### ApiPublicV1UptimeServicesSitePresetUptimePatchResponsesContentApplicationJsonSchemaDataRelationshipsPresetData

- `id` (string, optional)
- `type` (string, optional)

## Examples

### 200 - Uptime service updated

**Response**

```json
{
  "data": {
    "attributes": {
      "created_at": "2026-09-01T08:30:00.000000Z",
      "keyword": {
        "keys": [],
        "status": "disabled",
        "type": null
      },
      "next_request": "2026-09-17T10:08:00.000000Z",
      "path": null,
      "redirects": {
        "expected_url": "https://example.com/end",
        "max_redirects": 3,
        "status": "disabled"
      },
      "site_status": "up",
      "status": "enabled",
      "updated_at": "2026-09-17T10:03:10.000000Z"
    },
    "id": "553",
    "links": {
      "self": "https://api.modulards.com/api/public/v1/uptime-services/553"
    },
    "relationships": {
      "current_change": {
        "data": {
          "id": "231",
          "type": "uptime-changes"
        }
      },
      "preset": {
        "data": {
          "id": "9",
          "type": "preset-uptimes"
        }
      }
    },
    "type": "site-preset-uptimes"
  },
  "included": [
    {
      "attributes": {
        "created_at": "2026-09-17T09:12:44.000000Z",
        "interval": 300,
        "is_default": false,
        "method": "HEAD",
        "name": "Shops",
        "region": "eu-west-1",
        "status": "enabled",
        "status_codes": [
          "2xx"
        ],
        "timeout": 30000,
        "updated_at": "2026-09-17T09:12:44.000000Z"
      },
      "id": "9",
      "links": {
        "self": "https://api.modulards.com/api/public/v1/preset-uptimes/9"
      },
      "type": "preset-uptimes"
    },
    {
      "attributes": {
        "created_at": "2026-09-10T06:15:00.000000Z",
        "duration": null,
        "ended_at": null,
        "started_at": "2026-09-10T06:15:00.000000Z",
        "status": "up",
        "updated_at": "2026-09-10T06:15:00.000000Z"
      },
      "id": "231",
      "type": "uptime-changes"
    }
  ],
  "jsonapi": {
    "version": "1.1"
  }
}
```

**SDK Code**

```python 200 - Uptime service updated
import requests

url = "https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime"

headers = {"Authorization": "Bearer <token>"}

response = requests.patch(url, headers=headers)

print(response.json())
```

```javascript 200 - Uptime service updated
const url = 'https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 200 - Uptime service updated
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime"

	req, _ := http.NewRequest("PATCH", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 200 - Uptime service updated
require 'uri'
require 'net/http'

url = URI("https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java 200 - Uptime service updated
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php 200 - Uptime service updated
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp 200 - Uptime service updated
using RestSharp;

var client = new RestClient("https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift 200 - Uptime service updated
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Update a website's uptime settings

**Request**

```json
{
  "redirects": {
    "status": "disabled"
  }
}
```

**Response**

```json
{
  "data": {
    "attributes": {
      "created_at": "2026-09-01T08:30:00.000000Z",
      "keyword": {
        "keys": [],
        "status": "disabled",
        "type": null
      },
      "next_request": "2026-09-17T10:08:00.000000Z",
      "path": null,
      "redirects": {
        "expected_url": "https://example.com/end",
        "max_redirects": 3,
        "status": "disabled"
      },
      "site_status": "up",
      "status": "enabled",
      "updated_at": "2026-09-17T10:03:10.000000Z"
    },
    "id": "553",
    "links": {
      "self": "https://api.modulards.com/api/public/v1/uptime-services/553"
    },
    "relationships": {
      "current_change": {
        "data": {
          "id": "231",
          "type": "uptime-changes"
        }
      },
      "preset": {
        "data": {
          "id": "9",
          "type": "preset-uptimes"
        }
      }
    },
    "type": "site-preset-uptimes"
  },
  "included": [
    {
      "attributes": {
        "created_at": "2026-09-17T09:12:44.000000Z",
        "interval": 300,
        "is_default": false,
        "method": "HEAD",
        "name": "Shops",
        "region": "eu-west-1",
        "status": "enabled",
        "status_codes": [
          "2xx"
        ],
        "timeout": 30000,
        "updated_at": "2026-09-17T09:12:44.000000Z"
      },
      "id": "9",
      "links": {
        "self": "https://api.modulards.com/api/public/v1/preset-uptimes/9"
      },
      "type": "preset-uptimes"
    },
    {
      "attributes": {
        "created_at": "2026-09-10T06:15:00.000000Z",
        "duration": null,
        "ended_at": null,
        "started_at": "2026-09-10T06:15:00.000000Z",
        "status": "up",
        "updated_at": "2026-09-10T06:15:00.000000Z"
      },
      "id": "231",
      "type": "uptime-changes"
    }
  ],
  "jsonapi": {
    "version": "1.1"
  }
}
```

**SDK Code**

```python Update a website's uptime settings
import requests

url = "https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime"

payload = { "redirects": { "status": "disabled" } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Update a website's uptime settings
const url = 'https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"redirects":{"status":"disabled"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Update a website's uptime settings
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime"

	payload := strings.NewReader("{\n  \"redirects\": {\n    \"status\": \"disabled\"\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Update a website's uptime settings
require 'uri'
require 'net/http'

url = URI("https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"redirects\": {\n    \"status\": \"disabled\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Update a website's uptime settings
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"redirects\": {\n    \"status\": \"disabled\"\n  }\n}")
  .asString();
```

```php Update a website's uptime settings
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime', [
  'body' => '{
  "redirects": {
    "status": "disabled"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Update a website's uptime settings
using RestSharp;

var client = new RestClient("https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"redirects\": {\n    \"status\": \"disabled\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Update a website's uptime settings
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["redirects": ["status": "disabled"]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/uptime-services/site_preset_uptime")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```