Sites
Move Site
Moves a site to another organization you administer.
PUT /api/sites/:site/moveMoves a site, with all its data, into another organization. You must administer both organizations. To hand a site to someone outside your organizations, use Create Site Transfer.
Moving a site also:
- removes per-member and per-team access grants for the site (the new organization's members reach it through their own roles)
- moves the site's own segments, annotations and import history with it (organization-wide ones stay)
- cancels any pending site transfer
- disconnects Google Search Console
Permissions: the admin role or above in the site's organization. API keys need the sites:write scope. You also need the admin or owner role in the target organization. The move is checked against your own memberships, so organization API keys are rejected with 401; use a personal key or a session.
Path Parameters
Prop
Type
Request Body
Prop
Type
Response
Prop
Type
Error Responses
Errors use the standard body { error, code, message, resolution }.
Prop
Type
curl -X PUT "https://app.rybbit.io/api/sites/123/move" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"organizationId": "org_456"
}'const response = await fetch(
'https://app.rybbit.io/api/sites/123/move',
{
method: 'PUT',
headers: {
'Authorization': 'Bearer your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
organizationId: 'org_456'
})
}
);
const data = await response.json();import requests
response = requests.put(
'https://app.rybbit.io/api/sites/123/move',
json={
'organizationId': 'org_456'
},
headers={
'Authorization': 'Bearer your_api_key_here'
}
)
data = response.json()$body = [
'organizationId' => 'org_456'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://app.rybbit.io/api/sites/123/move');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body));
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/move')
request = Net::HTTP::Put.new(uri)
request['Authorization'] = 'Bearer your_api_key_here'
request['Content-Type'] = 'application/json'
request.body = {
organizationId: 'org_456'
}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
data = JSON.parse(response.body)body := map[string]interface{}{
"organizationId": "org_456",
}
jsonBody, _ := json.Marshal(body)
req, _ := http.NewRequest("PUT", "https://app.rybbit.io/api/sites/123/move", bytes.NewBuffer(jsonBody))
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 body = serde_json::json!({
"organizationId": "org_456"
});
let client = reqwest::Client::new();
let res = client
.put("https://app.rybbit.io/api/sites/123/move")
.header("Authorization", "Bearer your_api_key_here")
.json(&body)
.send()
.await?;
let data: serde_json::Value = res.json().await?;String json = """
{
"organizationId": "org_456"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://app.rybbit.io/api/sites/123/move"))
.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());var body = new
{
organizationId = "org_456"
};
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer your_api_key_here");
var content = new StringContent(
JsonSerializer.Serialize(body),
Encoding.UTF8,
"application/json");
var response = await client.PutAsync("https://app.rybbit.io/api/sites/123/move", content);
var data = await response.Content.ReadAsStringAsync();{
"success": true,
"organizationId": "org_456"
}