Skip to content

Commit 337e5fa

Browse files
committed
Add set cert to in-use API call
1 parent 6ef9396 commit 337e5fa

File tree

1 file changed

+26
-1
lines changed
  • src/content/docs/cloudflare-one/connections/connect-devices/user-side-certificates

1 file changed

+26
-1
lines changed

src/content/docs/cloudflare-one/connections/connect-devices/user-side-certificates/index.mdx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Each Zero Trust account can generate a new root certificate a maximum of three t
5959
## Activate a root certificate
6060

6161
:::note
62-
Zero Trust accounts using the Cloudflare certificate prior to 2024-10-17 will need to redeploy and activate the newly generated certificate. Zero Trust accounts created during or after 2024-10-17 will use an available certificate by default.
62+
Zero Trust accounts using the default Cloudflare certificate prior to 2024-10-17 will need to redeploy and activate the newly generated certificate. Zero Trust accounts created during or after 2024-10-17 will use an available certificate by default.
6363
:::
6464

6565
Once a certificate is generated in or uploaded to Zero Trust, you need to activate it. Activating a certificate deploys it across the Cloudflare network. You can have up to 25 available certificates at once.
@@ -91,9 +91,34 @@ The status of the certificate will change to **Pending** while it deploys. Once
9191

9292
Once you deploy and install your certificate, you can turn it on for use in inspection:
9393

94+
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
95+
9496
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Settings** > **Resources**.
9597
2. In **Certificates**, select **Manage**.
9698
3. Select the certificate you want to turn on.
9799
4. In **Basic information**, select **Confirm and turn on certificate**.
98100

101+
</TabItem>
102+
103+
<TabItem label="API">
104+
105+
Send a `PUT` request to the [Update Zero Trust account configuration](/api/resources/zero_trust/subresources/gateway/subresources/configurations/methods/update/) endpoint. For example:
106+
107+
```sh
108+
curl --request PUT \
109+
'https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/configuration' \
110+
--header "Content-Type: application/json" \
111+
--header "Authorization: Bearer <API_TOKEN>" \
112+
--data '{
113+
"settings": {
114+
"certificate": {
115+
"id": "d1b364c5-1311-466e-a194-f0e943e0799f",
116+
"in_use": true
117+
}
118+
}
119+
}'
120+
```
121+
122+
</TabItem> </Tabs>
123+
99124
You can set multiple certificates to **Available**, but you can only turn on one certificate for use in inspection at a time. Setting a certificate as **In-Use** will set any other turned on certificates as **Available** and prevent them from being used for inspection until turned on again.

0 commit comments

Comments
 (0)