corestack_ company_ client_ detach
Detach a client.
When to use it
Detach one of your agency's client companies, for example a client you no longer work for. Your people lose access to
the client's sites, tickets and billing at once, and you stop managing its sites. Only your agency's owners may detach a
client. Needs the write scope. The same as Detach client on the Organisations list in the Control Panel and
DELETE /api/company/clients/{client}.
What ends with the link: the client's sites you manage go back to the client, your people's SSH keys on its environments are removed, your firewall allowances stop applying to its sites, your people stop following its tickets, and its environments that deploy through your deployment connections lose that repository (the client is shown which ones need a new deployment connection). Linking again later does not bring back removed keys, repositories or subscriptions.
Detaching cannot be undone. First call without confirm_client: nothing changes, and the confirm_mismatch refusal
lists what would end in details.effects. Show that to the person, ask them, and only once they have agreed call again
with confirm_client set to the client's id.
Ask for it
Using the Corefinity MCP server, call corestack_company_client_detach with client_id 412. (Detach a client.) Tell me what it returned.Inputs
The client to detach, an id from corestack_company_clients_list. At least 1.
The same id again, sent only after the person agreed. Without it, or with another id, nothing changes. At least 1.
The answer is detached (agency_id, client_id) and effects: what ended, in the preview's shape.
Your assistant fills in a confirmation only after you agree.
Example call
{
"name": "corestack_company_client_detach",
"arguments": {
"client_id": 412,
"confirm_client": 412
}
}If it is refused
| Reason | What to do |
|---|---|
confirm_mismatch | confirm_client is missing or is not the client's id; field names it. Nothing changed. details.effects is what the detach would end, as counts only (the client's site and environment names are the client's): managed_sites, repositories, ssh_keys, firewall (stop_applying, stay_for_review), ticket_subscriptions, and summary, the same in plain sentences. |
forbidden | You are not one of your agency's owners, or your agency is archived. Nothing changed. |
tenant_mismatch | Your agency has no such client, or it was already detached. |
pin_refused | A token limited to some sites cannot change company-wide links. |
invalid_arguments | The arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
rate_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something went wrong on our side. Quote the trace id to support. |