Sites
Update Site Config
Updates site configuration settings. All fields are optional - only include the fields you want to update. Requires admin or owner role.
PUT /api/sites/:siteId/configUpdates site configuration settings. All fields are optional - only include the fields you want to update. Requires admin or owner role.
Path Parameters
Prop
Type
Request Body
Prop
Type
Response
Prop
Type
curl -X PUT "https://app.rybbit.io/api/sites/123/config" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"public": true, "blockBots": true, "excludedCountries": ["CN", "RU"]}'const response = await fetch(
'https://app.rybbit.io/api/sites/123/config',
{
method: 'PUT',
headers: {
'Authorization': 'Bearer your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
public: true,
blockBots: true,
excludedCountries: ['CN', 'RU']
})
}
);
const data = await response.json();import requests
response = requests.put(
'https://app.rybbit.io/api/sites/123/config',
json={
'public': True,
'blockBots': True,
'excludedCountries': ['CN', 'RU']
},
headers={
'Authorization': 'Bearer your_api_key_here'
}
)
data = response.json()$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://app.rybbit.io/api/sites/123/config');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'public' => true,
'blockBots' => true,
'excludedCountries' => ['CN', 'RU']
]));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer your_api_key_here',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);require 'net/http'
require 'json'
uri = URI('https://app.rybbit.io/api/sites/123/config')
req = Net::HTTP::Put.new(uri)
req['Authorization'] = 'Bearer your_api_key_here'
req['Content-Type'] = 'application/json'
req.body = { public: true, blockBots: true, excludedCountries: ['CN', 'RU'] }.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)body := bytes.NewBuffer([]byte(`{"public": true, "blockBots": true, "excludedCountries": ["CN", "RU"]}`))
req, _ := http.NewRequest("PUT", "https://app.rybbit.io/api/sites/123/config", body)
req.Header.Set("Authorization", "Bearer your_api_key_here")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
var data map[string]interface{}
json.NewDecoder(resp.Body).Decode(&data)let client = reqwest::Client::new();
let res = client
.put("https://app.rybbit.io/api/sites/123/config")
.header("Authorization", "Bearer your_api_key_here")
.json(&serde_json::json!({
"public": true,
"blockBots": true,
"excludedCountries": ["CN", "RU"]
}))
.send()
.await?;
let data: serde_json::Value = res.json().await?;HttpClient client = HttpClient.newHttpClient();
String json = "{\"public\": true, \"blockBots\": true, \"excludedCountries\": [\"CN\", \"RU\"]}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://app.rybbit.io/api/sites/123/config"))
.header("Authorization", "Bearer your_api_key_here")
.header("Content-Type", "application/json")
.PUT(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer your_api_key_here");
var content = new StringContent(
"{\"public\": true, \"blockBots\": true, \"excludedCountries\": [\"CN\", \"RU\"]}",
Encoding.UTF8,
"application/json"
);
var response = await client.PutAsync("https://app.rybbit.io/api/sites/123/config", content);
var data = await response.Content.ReadAsStringAsync();{
"success": true,
"message": "Site configuration updated successfully",
"config": {
"public": true,
"saltUserIds": false,
"blockBots": true,
"excludedIPs": [],
"excludedCountries": ["CN", "RU"],
"sessionReplay": true,
"webVitals": true,
"trackErrors": true,
"trackOutbound": true,
"trackUrlParams": false
}
}