Skip to content
Start here

Bind mTLS Certificate

POST/accounts/{account_id}/hyperdrive/mtls/bind

Enables or disables an uploaded mTLS client or CA certificate for use by Hyperdrive. Enabling a certificate starts deploying it to the Cloudflare network so Hyperdrive configurations can reference it. A certificate cannot be disabled while a Hyperdrive configuration still references it; remove it from those configurations first. Requires Account SSL and Certificates Read in addition to Hyperdrive Write.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

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

Example:X-Auth-Email: user@example.com

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

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Account: SSL and Certificates ReadAccount: SSL and Certificates Write
Path ParametersExpand Collapse
account_id: string

Define configurations using a unique string identifier.

maxLength32
Body ParametersJSONExpand Collapse
enabled: boolean

Set to true to enable the certificate for Hyperdrive, or false to disable it.

mtls_certificate_id: string

Specifies the ID of the uploaded mTLS client or CA certificate.

formatuuid
ReturnsExpand Collapse
errors: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
messages: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
result: object { id, binding_status, mtls_certificate_id }
id: string

Defines the ID of the certificate.

binding_status: "active" or "inactive" or "pending_deployment" or 2 more

Defines the deployment status of the certificate for Hyperdrive.

One of the following:
"active"
"inactive"
"pending_deployment"
"pending_deletion"
"deleted"
mtls_certificate_id: string

Defines the ID of the certificate.

success: true

Return the status of the API call success.

Bind mTLS Certificate

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/hyperdrive/mtls/bind \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    -d '{
          "enabled": true,
          "mtls_certificate_id": "00000000-0000-0000-0000-000000000000"
        }'
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "id": "00000000-0000-0000-0000-000000000000",
    "binding_status": "pending_deployment",
    "mtls_certificate_id": "00000000-0000-0000-0000-000000000000"
  },
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "id": "00000000-0000-0000-0000-000000000000",
    "binding_status": "pending_deployment",
    "mtls_certificate_id": "00000000-0000-0000-0000-000000000000"
  },
  "success": true
}