Disconnect Cloudflare
Removes your company's Cloudflare connection and its stored token. The token still exists at Cloudflare until you delete it there.
Returns
200 The connection, now not_connected.
Fields of the 200 answer
A company's Cloudflare connection. The token is never part of it.
Fields
Fields
At least 1.
A link to Cloudflare's token form and the steps to follow.
Fields
Who connected it. Null when it is not known. Corefinity staff read as Corefinity support with a null id.
The permissions the token needs (required) and those it lacks (missing).
Fields
not_connectedverifyingconnectedinvalidneeds_reauthThe last four characters of the token.
Sites whose domain is in none of the zones, each with id and domain.
Format: date-time.
Fields of each item
Cloudflare's id for the zone. Send it as zone_id.
What the token may do in the zone.
Fields
Format: date-time.
The sites mapped to the zone.
Fields of each item
Whether the Control Panel matched the zone to the site or you chose it.
automanualFields
At least 1.
If it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | company_unavailable | Your company is unavailable. |
403 | scope_required | Use a token with the scope named in scope. |
403 | two_factor_required | Turn on two-factor on your account, then send again. |
404 | feature_off | This feature is not on for your organisation yet. |
429 | rate_limited | Wait 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/corestack/company/cloudflare \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json"use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->delete('https://manage.corefinity.com/api/corestack/company/cloudflare');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/company/cloudflare', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
},
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.delete(
"https://manage.corefinity.com/api/corestack/company/cloudflare",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"connection": {
"can_change": true,
"company": {
"id": 1204,
"name": "Harbour & Finch"
},
"connect": {
"instructions": [
"Delete the token in Cloudflare as well. The Control Panel cannot revoke it."
],
"url": "https://dash.cloudflare.com/profile/api-tokens"
},
"connected_by": null,
"last_error": null,
"method": "api_token",
"scopes": {
"missing": [],
"required": [
"Zone:Read",
"DNS:Edit",
"Cache Purge:Purge",
"Zone Settings:Read",
"Zone Settings:Edit"
]
},
"status": "not_connected",
"status_label": "Not connected",
"token_id": null,
"token_last4": null,
"unmapped_sites": [
{
"domain": "harbourandfinch.example.com",
"id": 1042
}
],
"verified_at": null,
"zones": []
}
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}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.