Move the customer under another managing organization (reseller or
distributor) by rewriting its custom_data.createdBy, in Logto and
locally. Allowed to the Owner organization and to distributors, for a
customer inside their hierarchy (403 otherwise). An unusable target is
a 400 on key organization_id with message not_in_hierarchy or
not_a_manager (not a reseller or distributor).
Systems, users, backups and alert history stay with the customer and follow it: visibility, rebranding and the alerting tenant derive from the manager. What belongs to the manager it leaves goes away: add-ons bought by that side stop renewing (they stay valid until they expire), its silences on the customer's systems are removed, alerts assigned to its users are released. The response carries the applied counters.
Responses
-
Customer transferred
-
Bad request - validation error
-
Unauthorized - invalid or missing token
-
Forbidden - insufficient permissions
-
Resource not found
-
The customer cannot be transferred in its current state.
data.typeisvalidation_error, on keytransfer, with stablemessagecodes:customer_is_suspended(reactivate it first),customer_not_synced(no Logto organization yet),same_organization(already managed by the target),target_is_suspended,transfer_in_progress(another transfer of the same customer is running).
curl \
--request PATCH 'https://my.nethesis.it/backend/api/customers/{id}/transfer' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"organization_id": "5j8k2m4n6p8q"
}'
{
"organization_id": "5j8k2m4n6p8q"
}
{
"code": 200,
"message": "customer transferred successfully",
"data": {
"customer": {
"id": "5j8k2m4n6p8q",
"name": "ACME Reseller",
"type": "reseller"
},
"from": {
"id": "5j8k2m4n6p8q",
"name": "ACME Reseller",
"type": "reseller"
},
"to": {
"id": "5j8k2m4n6p8q",
"name": "ACME Reseller",
"type": "reseller"
},
"systems_count": 4,
"users_count": 2,
"addons": [
{
"system_id": "0f6e6a3a-2f7e-4a64-9a4c-0d1d2c3b4a59",
"system_name": "fw-headquarters",
"entitlement": "nsec-blacklist",
"display_name": "Advanced Threat Shield",
"scope": "string",
"valid_until": "2026-05-04T09:42:00Z",
"purchased_by_organization_name": "ACME Reseller",
"renewal": "continues"
}
],
"renewals_stopping": 1,
"silences_count": 2,
"assignments_count": 1,
"warnings": [
"string"
]
}
}
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}
{
"code": 401,
"message": "invalid token",
"data": {}
}
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}
{
"code": 409,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "transfer",
"message": "same_organization"
}
]
}
}