---
title: "Update the zone's SSL mode"
url: https://docs.corefinity.com/api/reference/domains/update-site-cloudflare-ssl-mode
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_set.md
---
# Update the zone's SSL mode

Sets the SSL/TLS mode of the site's Cloudflare zone to Full or Full (strict). The mode applies to every
hostname in that zone.

```http
PUT /api/corestack/sites/{site}/cloudflare-zone/ssl
```

- 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 has not been cleared for the console. 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.

## Body

- `value` (string, required) One of `full`, `strict`.

## Request

### curl

```bash
curl -X PUT https://manage.corefinity.com/api/corestack/sites/1042/cloudflare-zone/ssl \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "strict"
  }'
```

### PHP

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

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->put('https://manage.corefinity.com/api/corestack/sites/1042/cloudflare-zone/ssl', [
        'value' => 'strict',
    ]);

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

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/cloudflare-zone/ssl', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    value: 'strict',
  }),
});

// 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.put(
    "https://manage.corefinity.com/api/corestack/sites/1042/cloudflare-zone/ssl",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
    json={
        "value": "strict",
    },
)

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

## Responses

### 200 The zone with its new mode.

```json
{
  "zone": {
    "dns01": null,
    "id": "023e105f4ecef8ad9ca31a8372d0c353",
    "name": "harbourandfinch.example.com",
    "permissions": {
      "cache_purge": true,
      "dns_edit": true,
      "zone_settings": true
    },
    "plan": "Free",
    "refreshed_at": "2026-11-06T09:19:48Z",
    "sites": [
      {
        "mapping": "auto",
        "site": {
          "domain": "harbourandfinch.example.com",
          "id": 1042
        }
      }
    ],
    "ssl_mode": "strict",
    "ssl_ok": true,
    "ssl_recommended": "strict",
    "status": "active"
  }
}
```

### 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 id does not exist or is something you cannot see, or the feature is not on for your company (`feature_off`).

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

### 409 `no_zone` (the site has no zone to set), `not_connected`, `busy` (another zone change is being made), `deleted`, `provisioning` or `managed_elsewhere`.

```json
{
  "code": "busy",
  "message": "Another change to a Cloudflare zone is being made just now. Try again in a minute.",
  "reason": "busy"
}
```

### 422 The value is not `full` or `strict`, or the token may not change zone settings.

```json
{
  "code": "invalid",
  "errors": {
    "value": [
      "Choose Full or Full (strict)"
    ]
  },
  "field": "value",
  "message": "Choose Full or Full (strict)",
  "reason": "invalid"
}
```

### 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 refused the change. The mode is unchanged as far as the Control Panel knows. Try again in a minute.

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

## 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 | `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 | `invalid` | Fix the field named in `field`; `errors` says why. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |
| 502 |  | Read the message; it says what happened. |

## 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_set`](https://docs.corefinity.com/mcp/tools/corestack_site_cloudflare_ssl_set.md)
