---
title: Edit Keyless SSL Configuration
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Keyless Certificates](https://developers.cloudflare.com/api/go/resources/keyless_certificates)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Edit Keyless SSL Configuration

client.KeylessCertificates.Edit(ctx, keylessCertificateID, params) (\*[KeylessCertificate](<https://developers.cloudflare.com/api/go/resources/keyless_certificates#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)>), error)

PATCH/zones/{zone\_id}/keyless\_certificates/{keyless\_certificate\_id}

This will update attributes of a Keyless SSL. Consists of one or more of the following: host,name,port.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`SSL and Certificates Write`

##### ParametersExpand Collapse

keylessCertificateID string

Keyless certificate identifier tag.

maxLength32

[Link to this property](<#(resource)%20keyless_certificates%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20keyless_certificate_id%20%3E%20(schema)>)

<details>

<summary>

params KeylessCertificateEditParams

</summary>

ZoneID param.Field\[string]

Path param: Identifier.

maxLength32

<a href="#(resource)%20keyless_certificates%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20zone_id">Link to this property</a>

DeprecatedEnabled param.Field\[bool]Optional

Body param: Whether or not the Keyless SSL is on or off.

<a href="#(resource)%20keyless_certificates%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20enabled">Link to this property</a>

Host param.Field\[string]Optional

Body param: The keyless SSL name.

formathostname

maxLength253

<a href="#(resource)%20keyless_certificates%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20host">Link to this property</a>

Name param.Field\[string]Optional

Body param: The keyless SSL name.

maxLength180

<a href="#(resource)%20keyless_certificates%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20name">Link to this property</a>

Port param.Field\[float64]Optional

Body param: The keyless SSL port used to communicate between Cloudflare and the client’s Keyless SSL server.

maxLength65535

<a href="#(resource)%20keyless_certificates%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20port">Link to this property</a>

Tunnel param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/keyless_certificates#(resource)%20keyless_certificates%20%3E%20(model)%20tunnel%20%3E%20(schema)">Tunnel</a>]Optional

Body param: Configuration for using Keyless SSL through a Cloudflare Tunnel.

<a href="#(resource)%20keyless_certificates%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20tunnel">Link to this property</a>

</details>

[Link to this property](<#(resource)%20keyless_certificates%20%3E%20(method)%20edit%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type KeylessCertificate struct{…}

</summary>

ID string

Keyless certificate identifier tag.

maxLength32

<a href="#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

CreatedOn Time

When the Keyless SSL was created.

formatdate-time

<a href="#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

Enabled bool

Whether or not the Keyless SSL is on or off.

<a href="#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

Host string

The keyless SSL name.

formathostname

maxLength253

<a href="#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)%20%3E%20(property)%20host">Link to this property</a>

ModifiedOn Time

When the Keyless SSL was last modified.

formatdate-time

<a href="#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

Name string

The keyless SSL name.

maxLength180

<a href="#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

Permissions \[]string

Available permissions for the Keyless SSL for the current user requesting the item.

<a href="#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)%20%3E%20(property)%20permissions">Link to this property</a>

Port float64

The keyless SSL port used to communicate between Cloudflare and the client’s Keyless SSL server.

maxLength65535

<a href="#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)%20%3E%20(property)%20port">Link to this property</a>

<details>

<summary>

Status KeylessCertificateStatus

Status of the Keyless SSL.

</summary>

One of the following:

const KeylessCertificateStatusActive KeylessCertificateStatus = "active"

<a href="#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

const KeylessCertificateStatusDeleted KeylessCertificateStatus = "deleted"

<a href="#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

<details>

<summary>

Tunnel <a href="https://developers.cloudflare.com/api/go/resources/keyless_certificates#(resource)%20keyless_certificates%20%3E%20(model)%20tunnel%20%3E%20(schema)">Tunnel</a>Optional

Configuration for using Keyless SSL through a Cloudflare Tunnel.

</summary>

PrivateIP string

Private IP of the Key Server Host.

<a href="#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)%20%3E%20(property)%20tunnel%20%2B%20(resource)%20keyless_certificates%20%3E%20(model)%20tunnel%20%3E%20(schema)%20%3E%20(property)%20private_ip">Link to this property</a>

VnetID string

Cloudflare Tunnel Virtual Network ID.

<a href="#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)%20%3E%20(property)%20tunnel%20%2B%20(resource)%20keyless_certificates%20%3E%20(model)%20tunnel%20%3E%20(schema)%20%3E%20(property)%20vnet_id">Link to this property</a>

</details>

<a href="#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)%20%3E%20(property)%20tunnel">Link to this property</a>

</details>

[Link to this property](<#(resource)%20keyless_certificates%20%3E%20(model)%20keyless_certificate%20%3E%20(schema)>)

### Edit Keyless SSL Configuration

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/keyless_certificates"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  keylessCertificate, err := client.KeylessCertificates.Edit(
    context.TODO(),
    "4d2844d2ce78891c34d0b6c0535a291e",
    keyless_certificates.KeylessCertificateEditParams{
      ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", keylessCertificate.ID)
}
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "4d2844d2ce78891c34d0b6c0535a291e",
    "created_on": "2014-01-01T05:20:00Z",
    "enabled": false,
    "host": "example.com",
    "modified_on": "2014-01-01T05:20:00Z",
    "name": "example.com Keyless SSL",
    "permissions": [
      "#ssl:read",
      "#ssl:edit"
    ],
    "port": 24008,
    "status": "active",
    "tunnel": {
      "private_ip": "10.0.0.1",
      "vnet_id": "7365377a-85a4-4390-9480-531ef7dc7a3c"
    }
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "4d2844d2ce78891c34d0b6c0535a291e",
    "created_on": "2014-01-01T05:20:00Z",
    "enabled": false,
    "host": "example.com",
    "modified_on": "2014-01-01T05:20:00Z",
    "name": "example.com Keyless SSL",
    "permissions": [
      "#ssl:read",
      "#ssl:edit"
    ],
    "port": 24008,
    "status": "active",
    "tunnel": {
      "private_ip": "10.0.0.1",
      "vnet_id": "7365377a-85a4-4390-9480-531ef7dc7a3c"
    }
  }
}
```