---
title: "Delete an SSL rule"
url: https://docs.corefinity.com/api/reference/domains/delete-site-cloudflare-ssl-rule
type: endpoint
last_updated: 2026-11-13
feature: cloudflare
related:
  - https://docs.corefinity.com/guides/sites/go-live/cloudflare-for-a-site.md
  - https://docs.corefinity.com/mcp/tools/corestack_site_cloudflare_ssl_rule_remove.md
---
# Delete an SSL rule

Takes the rule out of the Cloudflare zone, so its domains use the zone's own SSL mode again. A rule that was changed in Cloudflare afterwards is left there. A deleted site's rules can still be removed.

```http
DELETE /api/corestack/sites/{site}/cloudflare/ssl-rules/{rule}
```

- Scope: `write`
- Two-factor: required on your account (all)
- Rate limit: 6 a minute; 60 an hour for each company
- Try it in the console: off. It deletes data that cannot be brought back. Copy the request and run it yourself when you are sure.

## Path parameters

- `site` (integer, required): The id of a site row. A website's production site and each of its environments has its own id. Digits only.
- `rule` (integer, required): The id of one of the site's SSL rules. Digits only.

## Request

### curl

```bash
curl -X DELETE https://manage.corefinity.com/api/corestack/sites/1042/cloudflare/ssl-rules/318 \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
```

### PHP

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->delete('https://manage.corefinity.com/api/corestack/sites/1042/cloudflare/ssl-rules/318');

$data = $response->json();
```

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/cloudflare/ssl-rules/318', {
  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);
```

### Python

```python
import os
import requests

res = requests.delete(
    "https://manage.corefinity.com/api/corestack/sites/1042/cloudflare/ssl-rules/318",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
)

data = res.json() if res.content else None
```

## Responses

### 200 The rule, now `removed`. A rule that was already removed answers the same.

```json
{
  "rule": {
    "hosts": [
      "harbourandfinch.example.com",
      "www.harbourandfinch.example.com"
    ],
    "id": 318,
    "removed_at": "2026-11-03T10:02:11+00:00",
    "set_at": "2026-11-03T09:16:40+00:00",
    "site_id": 1042,
    "ssl": "full",
    "state": "removed",
    "state_reason": null,
    "zone": {
      "id": "zone-example-1",
      "name": "harbourandfinch.example.com"
    }
  }
}
```

### 401 No token, or a token that is not valid.

```json
{
  "message": "Unauthenticated."
}
```

### 403 The token lacks the scope (`scope_required`, with the `scope` to use), your company requires two-factor authentication and you have not set it up, or your account has no company that can use Managed Clusters, for example because the company was closed (`company_unavailable` or `company_not_enabled`, whichever the route checks first). For Managed Clusters routes; any other route uses `ForbiddenScopeOrTwoFactor`.

```json
{
  "code": "company_unavailable",
  "message": "Your company is unavailable.",
  "reason": "company_unavailable"
}
```

### 404 The site or the rule does not exist, the rule is another site's, or the feature is not on for your company (`feature_off`).

```json
{
  "code": "feature_off",
  "message": "Not found.",
  "reason": "feature_off"
}
```

### 409 A switch that is still running set the rule (`not_owner`), the rule was changed in Cloudflare and so was left (`rule_edited`, with the `rule`), the rule is being changed by another request (`busy`), Cloudflare is not connected (`not_connected`), the token no longer sees the zone (`no_zone`), or another control panel manages the site (`managed_elsewhere`).

```json
{
  "code": "busy",
  "message": "This SSL rule is being changed. Try again in a moment.",
  "reason": "busy"
}
```

### 422 The Cloudflare token may not change Configuration Rules (`rules_not_allowed`), or Cloudflare refused the stored token (`not_connected`). The rule is as it was.

```json
{
  "code": "rules_not_allowed",
  "message": "The Cloudflare token may not change Configuration Rules on harbourandfinch.example.com. Allow Zone > Config Rules > Edit on the token, then try again.",
  "reason": "rules_not_allowed"
}
```

### 429 Too many requests (`rate_limited`): the endpoint's request limit, or your company's 60 Cloudflare changes this hour, which the Control Panel and AI assistants spend too. Wait for `Retry-After`, which `retry_after_seconds` repeats.

```json
{
  "code": "rate_limited",
  "message": "Too many Cloudflare changes this hour. Try again later.",
  "reason": "rate_limited",
  "retry_after_seconds": 3600
}
```

### 502 Cloudflare did not answer or did not confirm the change (`unavailable`). `rule` is sent when a rule was recorded: read the list again to see where it stands.

```json
{
  "code": "unavailable",
  "message": "Cloudflare did not answer. Try again in a minute.",
  "reason": "unavailable"
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | 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. |
| 409 | `busy` | Another operation is running on the site. Wait for it to finish. |
| 409 | `managed_elsewhere` | This site is read-only here. Change it in the control panel that manages it. |
| 409 | `not_connected` | The outside account this needs is not connected for your company. Connect it first; the message names it. |
| 409 | `not_owner` | The Cloudflare rule belongs to another change, so it was left as it is. Wait for that change to finish. |
| 409 | `rule_edited` | The Cloudflare rule was changed in Cloudflare after the Control Panel set it, so it was left as it is. Change or remove it in Cloudflare. |
| 409 | `no_zone` | The site's domain is not in a connected Cloudflare zone, or Cloudflare is off for the site. Connect the Cloudflare account that holds the zone. |
| 422 | `rules_not_allowed` | The Cloudflare token may not change the zone's rules. Allow Zone, Config Rules, Edit on the token, or connect one that can. |
| 422 | `not_connected` | The outside account this needs is not connected for your company. Connect it first; the message names it. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |
| 502 | `unavailable` | This is not available for the site or environment, or not at the moment. Read the message; try again later where it says so, or contact support. |

## The same task elsewhere

- Guide: [Cloudflare for a site](https://docs.corefinity.com/guides/sites/go-live/cloudflare-for-a-site.md)
- MCP tool: [`corestack_site_cloudflare_ssl_rule_remove`](https://docs.corefinity.com/mcp/tools/corestack_site_cloudflare_ssl_rule_remove.md)
