CorefinityCorefinityDocs
Open the Control PanelControl Panel
Repository connections · 2 of 4

Delete a company's repository connection

Removes a connection of a company you may act for. Only an owner can remove one (for a client, an owner of the agency that manages it), and only while no environment deploys through it. Removing cannot be undone, so send the connection's id as confirm_connection.

DELETE/api/companies/{company}/deployment-connections/{connection}

Path parameters

companyintegerRequired

The id of a company you belong to or manage. Digits only. At least 1.

connectionintegerRequired

The id of a connection, as the list answers it. Digits only. At least 1.

Body

confirm_connectioninteger or stringRequired

The id of the connection being removed, as a number or a string of digits.

Returns

200 The connection that was removed. Nothing else is deleted.

Fields of the 200 answer
removedobjectRequired
Fields
idintegerRequired

At least 1.

providerstringRequired

The git provider.

githubgitlabbitbucketgitlab_self_hosted
usernamestringRequired

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.
403two_factor_requiredTurn on two-factor on your account, then send again.
404noneCheck the id. You see only what your account can reach.
409connection_in_useThis connection is still used by 1 environment: Harbour & Finch trade / production (environment 1311). Choose another connection in its deployment settings first; nothing was removed.
422confirm_mismatchSend the confirmation exactly as the field named in field asks for it.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X DELETE https://manage.corefinity.com/api/companies/1204/deployment-connections/4217 \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "confirm_connection": 4217
  }'
{
  "removed": {
    "id": 4217,
    "provider": "gitlab",
    "username": "daniel-reyes"
  }
}
Try it

Try it is off for this endpointIt deletes data that cannot be brought back. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT