Update monitor
Update a monitor
Send a PATCH request with only the fields you want to change. Omitted fields keep their current values. This is a partial update — you don't need to re-send the entire monitor configuration.
PATCH
/v1/monitors/{id}bash
# Change frequency and enable full-page capture
curl -X PATCH https://api.snapshotarchive.com/v1/monitors/42 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"frequency_minutes": 360, "full_page": true}'$client = new \GuzzleHttp\Client();
$response = $client->patch('https://api.snapshotarchive.com/v1/monitors/42', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'frequency_minutes' => 360,
'full_page' => true,
],
]);
$data = json_decode($response->getBody(), true);import requests
response = requests.patch(
"https://api.snapshotarchive.com/v1/monitors/42",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
},
json={"frequency_minutes": 360, "full_page": True},
)
data = response.json()const response = await fetch("https://api.snapshotarchive.com/v1/monitors/42", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({ frequency_minutes: 360, full_page: true }),
});
const data = await response.json();require "net/http"
require "json"
uri = URI("https://api.snapshotarchive.com/v1/monitors/42")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
request.body = { frequency_minutes: 360, full_page: true }.to_json
response = http.request(request)
data = JSON.parse(response.body)payload := `{"frequency_minutes": 360, "full_page": true}`
req, _ := http.NewRequest("PATCH", "https://api.snapshotarchive.com/v1/monitors/42", strings.NewReader(payload))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Accept", "application/json")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()The request body accepts the same fields as Create Monitor. If you update frequency_minutes to a value your plan doesn't support, you'll get a frequency_not_allowed error.