CorefinityCorefinityDocs
Open the Control PanelControl Panel
Agencies and clients · 6 of 6

Preview detaching a client

What detaching the client from your agency would end, as counts: the names of a client's sites and environments are the client's. Nothing is changed. Any member of your agency may read it.

GET/api/company/clients/{client}/detach-preview

Path parameters

clientintegerRequired

The id of one of your agency's clients, as GET /company/clients lists it. Digits only. At least 1.

Returns

200 What the detach would end.

Fields of the 200 answer
client_idintegerRequired

At least 1.

effectsobjectRequired

What detaching a link ends. A client reads the names of its own sites and environments; an agency reads counts only.

Fields
firewallobjectRequired
Fields
stay_for_reviewintegerRequired

Allowances the agency's people added that belong to the client. They stay; review them.

stop_applyingintegerRequired

The agency's own firewall allowances that stop applying to the client's sites.

managed_sitesobjectRequired

The client's sites the agency manages. They go back to the client.

Fields
countintegerRequired
namesarray of strings

Their names. Only for the client.

repositoriesobjectRequired

The client's environments that deploy through one of the agency's deployment connections. Each needs a new connection before its next deployment.

Fields
countintegerRequired
environmentsarray of objects

The environments, by name. Only for the client.

Fields of each item
idintegerRequired

At least 1.

namestringRequired
other_environmentsinteger

Environments that are counted but not named. Only for the client.

sidestringRequired

Who is asking, the client or the agency.

clientagency
ssh_keysobjectRequired

SSH keys the agency's people added, which are removed.

Fields
countintegerRequired
summaryarray of stringsRequired

The same effects as sentences.

ticket_subscriptionsobjectRequired

Subscriptions of the agency's people to the client's tickets, which end.

Fields
countintegerRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403forbiddenThe person is not allowed to do this.
403scope_requiredUse a token with the scope named in scope.
404noneCheck the id. You see only what your account can reach.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/company/clients/1204/detach-preview \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "client_id": 1204,
  "effects": {
    "firewall": {
      "stay_for_review": 0,
      "stop_applying": 0
    },
    "managed_sites": {
      "count": 0
    },
    "repositories": {
      "count": 1
    },
    "side": "agency",
    "ssh_keys": {
      "count": 0
    },
    "summary": [
      "Your people lose access to this client's sites, tickets and billing at once.",
      "1 environment deploys through the agency's deployment connections. It will need a new deployment connection before its next deployment.",
      "Linking the agency again later does not bring back removed keys, repositories or subscriptions."
    ],
    "ticket_subscriptions": {
      "count": 0
    }
  }
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT