Preview owned-resource counts for a cross-organization user transfer (SuperAdmin only)
curl --request POST \
--url https://your-instance.example.com/api/organizations/transfer/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "5f7b1c2e8a1d4e0012c3b4a6",
"targetOrganizationId": "5f7b1c2e8a1d4e0012c3b401"
}
'import requests
url = "https://your-instance.example.com/api/organizations/transfer/preview"
payload = {
"userId": "5f7b1c2e8a1d4e0012c3b4a6",
"targetOrganizationId": "5f7b1c2e8a1d4e0012c3b401"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userId: '5f7b1c2e8a1d4e0012c3b4a6',
targetOrganizationId: '5f7b1c2e8a1d4e0012c3b401'
})
};
fetch('https://your-instance.example.com/api/organizations/transfer/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-instance.example.com/api/organizations/transfer/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'userId' => '5f7b1c2e8a1d4e0012c3b4a6',
'targetOrganizationId' => '5f7b1c2e8a1d4e0012c3b401'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.example.com/api/organizations/transfer/preview"
payload := strings.NewReader("{\n \"userId\": \"5f7b1c2e8a1d4e0012c3b4a6\",\n \"targetOrganizationId\": \"5f7b1c2e8a1d4e0012c3b401\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your-instance.example.com/api/organizations/transfer/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"5f7b1c2e8a1d4e0012c3b4a6\",\n \"targetOrganizationId\": \"5f7b1c2e8a1d4e0012c3b401\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/organizations/transfer/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"5f7b1c2e8a1d4e0012c3b4a6\",\n \"targetOrganizationId\": \"5f7b1c2e8a1d4e0012c3b401\"\n}"
response = http.request(request)
puts response.read_body{
"contacts": 1240,
"conversations": 3580,
"assigneeConversations": 412,
"automations": 7,
"workflows": 3,
"webchatConfigurations": 2,
"acquiredItems": 18,
"emailAccounts": 1,
"calendarConnections": 1,
"calendarToolConfigurations": 1,
"googleSheetsTokens": 0,
"unfiredReminders": 22,
"promptCount": 15,
"voicePhoneNumbers": 2,
"automationKeys": 4
}{
"error": "Organization not found",
"details": "No organization exists with the provided id"
}{
"error": "Organization not found",
"details": "No organization exists with the provided id"
}{
"error": "Organization not found",
"details": "No organization exists with the provided id"
}Organizations
Preview owned-resource counts for a cross-organization user transfer (SuperAdmin only)
Returns aggregate counts of items currently owned by the user (contacts, conversations, assignee-only conversations, automations, workflows, webchat configurations, acquired items, integrations, voice numbers, prompts, automation keys, etc.) so the operator can review what would be moved. Does not mutate state.
POST
/
api
/
organizations
/
transfer
/
preview
Preview owned-resource counts for a cross-organization user transfer (SuperAdmin only)
curl --request POST \
--url https://your-instance.example.com/api/organizations/transfer/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "5f7b1c2e8a1d4e0012c3b4a6",
"targetOrganizationId": "5f7b1c2e8a1d4e0012c3b401"
}
'import requests
url = "https://your-instance.example.com/api/organizations/transfer/preview"
payload = {
"userId": "5f7b1c2e8a1d4e0012c3b4a6",
"targetOrganizationId": "5f7b1c2e8a1d4e0012c3b401"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userId: '5f7b1c2e8a1d4e0012c3b4a6',
targetOrganizationId: '5f7b1c2e8a1d4e0012c3b401'
})
};
fetch('https://your-instance.example.com/api/organizations/transfer/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-instance.example.com/api/organizations/transfer/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'userId' => '5f7b1c2e8a1d4e0012c3b4a6',
'targetOrganizationId' => '5f7b1c2e8a1d4e0012c3b401'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.example.com/api/organizations/transfer/preview"
payload := strings.NewReader("{\n \"userId\": \"5f7b1c2e8a1d4e0012c3b4a6\",\n \"targetOrganizationId\": \"5f7b1c2e8a1d4e0012c3b401\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your-instance.example.com/api/organizations/transfer/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"5f7b1c2e8a1d4e0012c3b4a6\",\n \"targetOrganizationId\": \"5f7b1c2e8a1d4e0012c3b401\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/organizations/transfer/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"5f7b1c2e8a1d4e0012c3b4a6\",\n \"targetOrganizationId\": \"5f7b1c2e8a1d4e0012c3b401\"\n}"
response = http.request(request)
puts response.read_body{
"contacts": 1240,
"conversations": 3580,
"assigneeConversations": 412,
"automations": 7,
"workflows": 3,
"webchatConfigurations": 2,
"acquiredItems": 18,
"emailAccounts": 1,
"calendarConnections": 1,
"calendarToolConfigurations": 1,
"googleSheetsTokens": 0,
"unfiredReminders": 22,
"promptCount": 15,
"voicePhoneNumbers": 2,
"automationKeys": 4
}{
"error": "Organization not found",
"details": "No organization exists with the provided id"
}{
"error": "Organization not found",
"details": "No organization exists with the provided id"
}{
"error": "Organization not found",
"details": "No organization exists with the provided id"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Preview counts returned