Sites

Accept Site Transfer

Moves a transferred site into one of your organizations.

POST /api/site-transfers/:transferId/accept

Accepts a site transfer and moves the site, with its data, into the organization you choose. The move has the same effects as Move Site, and the site's private link is also removed.

Authentication: a signed-in dashboard session belonging to the recipient. API keys don't work here: the route names no site or organization to check a key against, so every API key (personal, scoped or organization) gets 401. The examples send the session cookie. The JavaScript example is for Node.js: browsers don't let scripts set a Cookie header. You must be an admin or owner of the target organization, and the person who sent the transfer must still be able to transfer the site.

Path Parameters

Prop

Type

Request Body

Prop

Type

Response

Prop

Type

Error Responses

Errors use the standard body { error, code, message, resolution }.

Prop

Type

A 403 is also returned when you aren't an admin or owner of the target organization, the target organization is at its plan's site limit, or the sender can no longer transfer the site (the transfer is then cancelled).

Request
curl -X POST "https://app.rybbit.io/api/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/accept" \
  -H "Cookie: __Secure-better-auth.session_token=YOUR_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "organizationId": "org_789"
  }'
Request
const response = await fetch(
  'https://app.rybbit.io/api/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/accept',
  {
    method: 'POST',
    headers: {
      'Cookie': '__Secure-better-auth.session_token=YOUR_SESSION_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      organizationId: 'org_789'
    })
  }
);

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

response = requests.post(
    'https://app.rybbit.io/api/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/accept',
    json={
        'organizationId': 'org_789'
    },
    headers={
        'Cookie': '__Secure-better-auth.session_token=YOUR_SESSION_TOKEN'
    }
)

data = response.json()
Request
$body = [
    'organizationId' => 'org_789'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://app.rybbit.io/api/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/accept');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Cookie: __Secure-better-auth.session_token=YOUR_SESSION_TOKEN',
    'Content-Type: application/json'
]);

$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/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/accept')
request = Net::HTTP::Post.new(uri)
request['Cookie'] = '__Secure-better-auth.session_token=YOUR_SESSION_TOKEN'
request['Content-Type'] = 'application/json'
request.body = {
  organizationId: 'org_789'
}.to_json

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end

data = JSON.parse(response.body)
Request
body := map[string]interface{}{
    "organizationId": "org_789",
}
jsonBody, _ := json.Marshal(body)

req, _ := http.NewRequest("POST", "https://app.rybbit.io/api/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/accept", bytes.NewBuffer(jsonBody))
req.Header.Set("Cookie", "__Secure-better-auth.session_token=YOUR_SESSION_TOKEN")
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)
Request
let body = serde_json::json!({
  "organizationId": "org_789"
});

let client = reqwest::Client::new();
let res = client
    .post("https://app.rybbit.io/api/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/accept")
    .header("Cookie", "__Secure-better-auth.session_token=YOUR_SESSION_TOKEN")
    .json(&body)
    .send()
    .await?;

let data: serde_json::Value = res.json().await?;
Request
String json = """
{
  "organizationId": "org_789"
}
""";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://app.rybbit.io/api/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/accept"))
    .header("Cookie", "__Secure-better-auth.session_token=YOUR_SESSION_TOKEN")
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString(json))
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
Request
var body = new
{
    organizationId = "org_789"
};

using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Cookie", "__Secure-better-auth.session_token=YOUR_SESSION_TOKEN");

var content = new StringContent(
    JsonSerializer.Serialize(body),
    Encoding.UTF8,
    "application/json");

var response = await client.PostAsync("https://app.rybbit.io/api/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/accept", content);
var data = await response.Content.ReadAsStringAsync();
Response
{
  "success": true,
  "siteId": 123,
  "organizationId": "org_789"
}