CorefinityCorefinityDocs
Open the Control PanelControl Panel
Organisation · 6 of 6

corestack_company_client_detach

Detach a client.

Scope writeAsks you to confirmNo secrets returned
On this page

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

Prompt
Using the Corefinity MCP server, call corestack_company_client_detach with client_id 412. (Detach a client.) Tell me what it returned.

Inputs

client_idintegerRequired

The client to detach, an id from corestack_company_clients_list. At least 1.

confirm_clientintegerConfirmation

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

tools/call
{
  "name": "corestack_company_client_detach",
  "arguments": {
    "client_id": 412,
    "confirm_client": 412
  }
}

If it is refused

ReasonWhat to do
confirm_mismatchconfirm_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.
forbiddenYou are not one of your agency's owners, or your agency is archived. Nothing changed.
tenant_mismatchYour agency has no such client, or it was already detached.
pin_refusedA token limited to some sites cannot change company-wide links.
invalid_argumentsThe 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_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
rate_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT