Sites

Decline Site Transfer

Turns down a site transfer sent to you.

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

Declines a site transfer. The transfer is deleted and the site stays where it is.

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.

Path Parameters

Prop

Type

Response

Prop

Type

Error Responses

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

Prop

Type

Request
curl -X POST "https://app.rybbit.io/api/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/decline" \
  -H "Cookie: __Secure-better-auth.session_token=YOUR_SESSION_TOKEN"
Request
const response = await fetch(
  'https://app.rybbit.io/api/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/decline',
  {
    method: 'POST',
    headers: {
      'Cookie': '__Secure-better-auth.session_token=YOUR_SESSION_TOKEN'
    }
  }
);

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

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

data = response.json()
Request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://app.rybbit.io/api/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/decline');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Cookie: __Secure-better-auth.session_token=YOUR_SESSION_TOKEN'
]);

$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/decline')
request = Net::HTTP::Post.new(uri)
request['Cookie'] = '__Secure-better-auth.session_token=YOUR_SESSION_TOKEN'

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

data = JSON.parse(response.body)
Request
req, _ := http.NewRequest("POST", "https://app.rybbit.io/api/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/decline", nil)
req.Header.Set("Cookie", "__Secure-better-auth.session_token=YOUR_SESSION_TOKEN")

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
    .post("https://app.rybbit.io/api/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/decline")
    .header("Cookie", "__Secure-better-auth.session_token=YOUR_SESSION_TOKEN")
    .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/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/decline"))
    .header("Cookie", "__Secure-better-auth.session_token=YOUR_SESSION_TOKEN")
    .POST(HttpRequest.BodyPublishers.noBody())
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
Request
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Cookie", "__Secure-better-auth.session_token=YOUR_SESSION_TOKEN");

var response = await client.PostAsync("https://app.rybbit.io/api/site-transfers/q3Zt8xK2mVb7Lp0RfY1nWc4sHd9eJg6a/decline", null);
var data = await response.Content.ReadAsStringAsync();
Response
{
  "success": true
}