Sites

Delete Site

Permanently deletes a site, its settings, saved reports, and session replays. Collected events and sessions are not deleted. Requires the admin or owner role.

DELETE /api/sites/:siteId

Permanently deletes a site. This cannot be undone. Requires the admin or owner role (the sites:delete permission).

What is deleted:

  • The site and its settings, including private link keys and exclusion lists.
  • Everything stored against it: goals, funnels, segments, annotations, dashboards, feature flags, experiments, the Search Console connection, member and team site access, pending transfers, import history, and identified-user profiles and aliases.
  • Session replay rows stored in ClickHouse. On Rybbit Cloud, replay event data kept in R2 object storage is not deleted.

Events and sessions already collected are not deleted from ClickHouse.

Returns 403 for a site that doesn't exist or that you can't access; 404 for a malformed ID or an unknown text site identifier.

Path Parameters

Prop

Type

Response

Prop

Type

Request
curl -X DELETE "https://app.rybbit.io/api/sites/123" \
  -H "Authorization: Bearer your_api_key_here"
Request
const response = await fetch(
  'https://app.rybbit.io/api/sites/123',
  {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer your_api_key_here'
    }
  }
);

const data = await response.json();
Request
import requests

response = requests.delete(
    'https://app.rybbit.io/api/sites/123',
    headers={
        'Authorization': 'Bearer your_api_key_here'
    }
)

data = response.json()
Request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://app.rybbit.io/api/sites/123');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer your_api_key_here'
]);

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
Request
require 'net/http'
require 'json'

uri = URI('https://app.rybbit.io/api/sites/123')
req = Net::HTTP::Delete.new(uri)
req['Authorization'] = 'Bearer your_api_key_here'

res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)
Request
req, _ := http.NewRequest("DELETE", "https://app.rybbit.io/api/sites/123", nil)
req.Header.Set("Authorization", "Bearer your_api_key_here")

client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()

var data map[string]interface{}
json.NewDecoder(resp.Body).Decode(&data)
Request
let client = reqwest::Client::new();
let res = client
    .delete("https://app.rybbit.io/api/sites/123")
    .header("Authorization", "Bearer your_api_key_here")
    .send()
    .await?;

let data: serde_json::Value = res.json().await?;
Request
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://app.rybbit.io/api/sites/123"))
    .header("Authorization", "Bearer your_api_key_here")
    .DELETE()
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
Request
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer your_api_key_here");

var response = await client.DeleteAsync("https://app.rybbit.io/api/sites/123");
var data = await response.Content.ReadAsStringAsync();
Response
{
  "success": true
}